From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGWij-0007lJ-O0 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 11:43:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGWid-0003Kz-UO for qemu-devel@nongnu.org; Thu, 20 Feb 2014 11:43:33 -0500 Received: from mail-qc0-x22c.google.com ([2607:f8b0:400d:c01::22c]:46127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGWid-0003Kk-P7 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 11:43:27 -0500 Received: by mail-qc0-f172.google.com with SMTP id w7so1310759qcr.17 for ; Thu, 20 Feb 2014 08:43:26 -0800 (PST) Sender: Richard Henderson Message-ID: <530630A3.904@twiddle.net> Date: Thu, 20 Feb 2014 10:43:15 -0600 From: Richard Henderson MIME-Version: 1.0 References: <1391179418-13422-1-git-send-email-rth@twiddle.net> <1391179418-13422-5-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] tcg/i386: Use ANDN instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Aurelien Jarno On 02/20/2014 10:25 AM, Peter Maydell wrote: > On 31 January 2014 14:43, Richard Henderson 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);