From patchwork Wed Apr 14 18:07:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 51205 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5ED31B7D2D for ; Thu, 29 Apr 2010 05:18:55 +1000 (EST) Received: from localhost ([127.0.0.1]:47009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7Cma-0004jY-Lo for incoming@patchwork.ozlabs.org; Wed, 28 Apr 2010 15:18:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7C1o-0000P9-W1 for qemu-devel@nongnu.org; Wed, 28 Apr 2010 14:30:33 -0400 Received: from [140.186.70.92] (port=46685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7C1a-0000HS-0j for qemu-devel@nongnu.org; Wed, 28 Apr 2010 14:30:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7C1S-0004SK-22 for qemu-devel@nongnu.org; Wed, 28 Apr 2010 14:30:17 -0400 Received: from are.twiddle.net ([75.149.56.221]:36487) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7C1R-0004Qp-S1 for qemu-devel@nongnu.org; Wed, 28 Apr 2010 14:30:10 -0400 Received: by are.twiddle.net (Postfix, from userid 5000) id 6648B1074; Wed, 28 Apr 2010 11:30:06 -0700 (PDT) Message-Id: In-Reply-To: References: From: Richard Henderson Date: Wed, 14 Apr 2010 11:07:27 -0700 To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 16/22] tcg-i386: Tidy setcc. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Define and use OPC_SETCC. Signed-off-by: Richard Henderson Acked-by: Aurelien Jarno --- tcg/i386/tcg-target.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 27e9e9e..0c1a53a 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -189,6 +189,7 @@ static inline int tcg_target_const_match(tcg_target_long val, #define OPC_PUSH_Iv (0x68) #define OPC_PUSH_Ib (0x6a) #define OPC_RET (0xc3) +#define OPC_SETCC (0x90 | P_EXT) /* ... plus condition code */ #define OPC_SHIFT_1 (0xd1) #define OPC_SHIFT_Ib (0xc1) #define OPC_SHIFT_cl (0xd3) @@ -600,8 +601,7 @@ static void tcg_out_setcond(TCGContext *s, TCGCond cond, TCGArg dest, TCGArg arg1, TCGArg arg2, int const_arg2) { tcg_out_cmp(s, arg1, arg2, const_arg2); - /* setcc */ - tcg_out_modrm(s, 0x90 | tcg_cond_to_jcc[cond] | P_EXT, 0, dest); + tcg_out_modrm(s, OPC_SETCC | tcg_cond_to_jcc[cond], 0, dest); tcg_out_ext8u(s, dest, dest); }