All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Tobler <andreast@FreeBSD.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c
Date: Mon, 11 Nov 2013 21:10:51 +0100	[thread overview]
Message-ID: <528139CB.7080502@FreeBSD.org> (raw)

[-- 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 =

             reply	other threads:[~2013-11-11 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 20:10 Andreas Tobler [this message]
2013-11-11 21:02 ` [Qemu-devel] [PATCH] fix compilation/link with clang, target-i386/cpu.c Peter Maydell
2013-11-11 21:12   ` Andreas Tobler
2013-11-11 21:14     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528139CB.7080502@FreeBSD.org \
    --to=andreast@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.