From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkeZY-0001eq-Lx for qemu-devel@nongnu.org; Thu, 06 Jun 2013 14:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkeZT-0000y4-Kq for qemu-devel@nongnu.org; Thu, 06 Jun 2013 14:06:04 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:47907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkeZT-0000xs-Cs for qemu-devel@nongnu.org; Thu, 06 Jun 2013 14:05:59 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa11so1911361pad.5 for ; Thu, 06 Jun 2013 11:05:58 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 6 Jun 2013 11:05:43 -0700 Message-Id: <1370541947-909-2-git-send-email-rth@twiddle.net> In-Reply-To: <1370541947-909-1-git-send-email-rth@twiddle.net> References: <1370541947-909-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 1/5] tcg: Allow non-constant control macros List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net This allows TCG_TARGET_HAS_* to be a variable rather than a constant, which allows easier support for differing ISA levels for the host. Signed-off-by: Richard Henderson --- tcg/tcg-opc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h index 4246e9c..db5e6e5 100644 --- a/tcg/tcg-opc.h +++ b/tcg/tcg-opc.h @@ -40,7 +40,7 @@ DEF(set_label, 0, 0, 1, TCG_OPF_BB_END) DEF(call, 0, 1, 2, TCG_OPF_CALL_CLOBBER) /* variable number of parameters */ DEF(br, 0, 0, 1, TCG_OPF_BB_END) -#define IMPL(X) (X ? 0 : TCG_OPF_NOT_PRESENT) +#define IMPL(X) (__builtin_constant_p(X) && !(X) ? TCG_OPF_NOT_PRESENT : 0) #if TCG_TARGET_REG_BITS == 32 # define IMPL64 TCG_OPF_64BIT | TCG_OPF_NOT_PRESENT #else -- 1.8.1.4