From patchwork Wed Jun 26 20:52:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 254862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 016C92C008E for ; Thu, 27 Jun 2013 06:53:09 +1000 (EST) Received: from localhost ([::1]:43375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrwiA-0007Uh-Q8 for incoming@patchwork.ozlabs.org; Wed, 26 Jun 2013 16:53:07 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=vikG4AfbuQ/fL2WlGtMQ5DhxHlpJ2hM4p/CzF5Hbbl4=; b=AHHXAhDoxKx60k00WfU/XdbXtIFQfGkJu/T/DZsweQSBkQaCVM+ekKZ+mh/C+pr/Ec uIO9P+FUGi09NwEIr5VLeg8r36fZ5MBcig7IMeNek19Xexx+6MtRMNZwrjq4zhADkumL XqnsGLkIoHTt9G6y6vEMCHINoN3JcvEbtIJoL7YfPou/8uZcpPMO1EGmlYAmSRy7s+eT BauDFdcXSdtBYVj5RoIDjiF4atgBwXAjpOz090bU2Wf50glciBilfTWLQSgzKXgJtiIK xS50WbGv2QdAD1wUYpVt4Ku2G+qyF9pqGv9UKgcR0GJRhWF/BEBuCoUejmnyxwImu75z TKyw== X-Received: by 10.66.162.9 with SMTP id xw9mr2531440pab.64.1372279945840; Wed, 26 Jun 2013 13:52:25 -0700 (PDT) Received: from fremont.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id ix3sm29805715pbc.37.2013.06.26.13.52.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Jun 2013 13:52:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Jun 2013 13:52:05 -0700 Message-Id: <1372279929-28836-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372279929-28836-1-git-send-email-rth@twiddle.net> References: <1372279929-28836-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22f Cc: blauwirbel@gmail.com, claudio.fontana@huawei.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v2 5/9] tcg: Allow non-constant control macros X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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