Received: from eggs.gnu.org ([2001:4830:134:3::10]:35258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrwhZ-00072V-0d for qemu-devel@nongnu.org; Wed, 26 Jun 2013 16:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrwhW-0000m8-RW for qemu-devel@nongnu.org; Wed, 26 Jun 2013 16:52:28 -0400 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:56123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrwhW-0000lp-LR for qemu-devel@nongnu.org; Wed, 26 Jun 2013 16:52:26 -0400 Received: by mail-pa0-f47.google.com with SMTP id kl14so71548pab.20 for ; Wed, 26 Jun 2013 13:52:25 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Wed, 26 Jun 2013 13:52:05 -0700 Message-Id: <1372279929-28836-6-git-send-email-rth@twiddle.net> In-Reply-To: <1372279929-28836-1-git-send-email-rth@twiddle.net> References: <1372279929-28836-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v2 5/9] tcg: Allow non-constant control macros List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, claudio.fontana@huawei.com, 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 12967fb..c94e255 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