qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/5] tcg/i386: Use ANDN instruction


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 4/5] tcg/i386: Use ANDN instruction
Date: Thu, 20 Feb 2014 10:43:15 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/20/2014 10:25 AM, Peter Maydell wrote:
> On 31 January 2014 14:43, Richard Henderson <address@hidden> wrote:
>> Note that the optimizer cannot simplify ANDC X,Y,C to AND X,Y,~C
>> so we must handle constants in the implementation of andc.
> 
> Unfortunately I failed to notice before I applied this,
> but this breaks the build for w32:
> 
>   LINK  aarch64-softmmu/qemu-system-aarch64.exe
> tcg/tcg.o: In function `tcg_target_init':
> /home/petmay01/linaro/qemu-for-merges/tcg/i386/tcg-target.c:2263:
> undefined reference to `___get_cpuid_max'
> /home/petmay01/linaro/qemu-for-merges/tcg/i386/tcg-target.c:2266:
> undefined reference to `___cpuid'
> /home/petmay01/linaro/qemu-for-merges/tcg/i386/tcg-target.c:2282:
> undefined reference to `___cpuid_count'
> collect2: ld returned 1 exit status
> 
> 
> Can you provide a reasonably quick fix, or should I
> just revert commits 9d2eec20 and 6399ab33 for the moment?

Can you try this?


r~


diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index fef1717..dc52e0d 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -2295,6 +2295,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)

 static void tcg_target_init(TCGContext *s)
 {
+#ifdef CONFIG_CPUID_H
     unsigned a, b, c, d;
     int max = __get_cpuid_max(0, 0);

@@ -2323,6 +2324,7 @@ static void tcg_target_init(TCGContext *s)
         have_bmi2 = (b & bit_BMI2) != 0;
 #endif
     }
+#endif /* CONFIG_CPUID_H */

     if (TCG_TARGET_REG_BITS == 64) {
         tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]