Hello,

Paolo asked me to test and submit the below patch to fix compilation and
link with clang.

Paolo reduced the issue to a clang bug where dead code is not properly
eliminated before linktime. (the clang bug ID: 17882)

Thanks,
Andreas


Signed-off-by: Andreas Tobler <address@hidden>


diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 864c80e..6d3e5fd 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2196,7 +2196,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, 
uint32_t count,
         *ebx = 0;
         *ecx = 0;
         *edx = 0;
-        if (!(env->features[FEAT_1_ECX] & CPUID_EXT_XSAVE) || !kvm_enabled()) {
+        if (!kvm_enabled() || !(env->features[FEAT_1_ECX] & CPUID_EXT_XSAVE)) {
             break;
         }
         kvm_mask =

Reply via email to