From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51596 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFOkz-0003pj-0A for qemu-devel@nongnu.org; Fri, 21 May 2010 05:43:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFOkJ-0006rs-TW for qemu-devel@nongnu.org; Fri, 21 May 2010 05:43:04 -0400 Received: from hall.aurel32.net ([88.191.82.174]:46111) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFOkJ-0006rm-O0 for qemu-devel@nongnu.org; Fri, 21 May 2010 05:42:23 -0400 Date: Fri, 21 May 2010 11:42:10 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 19/22] tcg-i386: Tidy xchg. Message-ID: <20100521094210.GK1950@volta.aurel32.net> References: <294e088bc1f9d054fc9045b1196d70876f1e8ad6.1272479073.git.rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <294e088bc1f9d054fc9045b1196d70876f1e8ad6.1272479073.git.rth@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Wed, Apr 14, 2010 at 11:32:24AM -0700, Richard Henderson wrote: > Define and use OPC_XCHG_ax_r32. > > Signed-off-by: Richard Henderson Acked-by: Aurelien Jarno > --- > tcg/i386/tcg-target.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c > index 020faf0..bf3c0d6 100644 > --- a/tcg/i386/tcg-target.c > +++ b/tcg/i386/tcg-target.c > @@ -197,6 +197,7 @@ static inline int tcg_target_const_match(tcg_target_long val, > #define OPC_SHIFT_Ib (0xc1) > #define OPC_SHIFT_cl (0xd3) > #define OPC_TESTL (0x85) > +#define OPC_XCHG_ax_r32 (0x90) > > #define OPC_GRP3_Ev (0xf7) > #define OPC_GRP5 (0xff) > @@ -793,7 +794,8 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, > break; > case 3: > if (data_reg == TCG_REG_EDX) { > - tcg_out_opc(s, 0x90 + TCG_REG_EDX); /* xchg %edx, %eax */ > + /* xchg %edx, %eax */ > + tcg_out_opc(s, OPC_XCHG_ax_r32 + TCG_REG_EDX); > tcg_out_mov(s, data_reg2, TCG_REG_EAX); > } else { > tcg_out_mov(s, data_reg, TCG_REG_EAX); > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net