From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLKT2-0008NL-LX for qemu-devel@nongnu.org; Thu, 17 Dec 2009 12:48:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLKT1-0008Lv-T9 for qemu-devel@nongnu.org; Thu, 17 Dec 2009 12:48:48 -0500 Received: from [199.232.76.173] (port=40786 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLKT1-0008LV-Dp for qemu-devel@nongnu.org; Thu, 17 Dec 2009 12:48:47 -0500 Received: from are.twiddle.net ([75.149.56.221]:48561) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLKT1-0008KH-2p for qemu-devel@nongnu.org; Thu, 17 Dec 2009 12:48:47 -0500 Message-ID: <4B2A6EFD.7070000@twiddle.net> Date: Thu, 17 Dec 2009 09:48:45 -0800 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes References: <4B2A655A.3050406@twiddle.net> In-Reply-To: <4B2A655A.3050406@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On 12/17/2009 09:07 AM, Richard Henderson wrote: >> + case TCG_COND_NE: >> + if (const_arg2) { >> + if ((uint16_t) arg2 == arg2) { >> + tcg_out32 (s, XORI | RS (arg1) | RA (0) | arg2); >> + } >> + else { >> + tcg_out_movi (s, TCG_TYPE_I32, 0, arg2); >> + tcg_out32 (s, XOR | SAB (arg1, 0, 0)); >> + } >> + } >> + else { >> + tcg_out32 (s, XOR | SAB (arg1, 0, arg2)); >> + } >> + >> + tcg_out32 (s, ADDIC | RT (arg0) | RA (0) | 0xffff); >> + tcg_out32 (s, SUBFE | TAB (arg0, arg0, 0)); >> + return; > > Heh, you know a trick that gcc doesn't for powerpc. It just adds an xor > at the end of the EQ sequence. Ah, gcc does know the trick, it just thinks it's only a win on old Power systems. r~