All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c
@ 2013-11-11 20:10 Andreas Tobler
  2013-11-11 21:02 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2013-11-11 20:10 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

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>



[-- Attachment #2: target-i386.diff --]
[-- Type: text/plain, Size: 490 bytes --]

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 =

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-11 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 20:10 [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c Andreas Tobler
2013-11-11 21:02 ` Peter Maydell
2013-11-11 21:12   ` Andreas Tobler
2013-11-11 21:14     ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.