Received: from eggs.gnu.org ([208.118.235.92]:45295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM3tT-0000vk-R1 for qemu-devel@nongnu.org; Sat, 30 Mar 2013 18:05:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UM3tM-0001cD-Pn for qemu-devel@nongnu.org; Sat, 30 Mar 2013 18:04:59 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:44218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM3tM-0001bv-JL for qemu-devel@nongnu.org; Sat, 30 Mar 2013 18:04:52 -0400 Date: Sat, 30 Mar 2013 23:04:50 +0100 From: Aurelien Jarno Message-ID: <20130330220450.GE22106@hall.aurel32.net> References: <1364657589-16123-1-git-send-email-aurelien@aurel32.net> <51570C28.7010706@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <51570C28.7010706@twiddle.net> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/2] tcg-ia64: implement mulu2_i32/i64 and muls2_i32/i64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Sat, Mar 30, 2013 at 09:00:40AM -0700, Richard Henderson wrote: > On 03/30/2013 08:33 AM, Aurelien Jarno wrote: > > + if (const_arg1 && arg1 != 0) { > > + opc2 = tcg_opc_a5(TCG_REG_P0, OPC_ADDL_A5, > > + TCG_REG_R2, arg1, TCG_REG_R0); > > + } else if (is_signed) { > > + opc2 = tcg_opc_i29(TCG_REG_P0, OPC_SXT4_I29, TCG_REG_R2, arg1); > > + } else { > > + opc2 = tcg_opc_i29(TCG_REG_P0, OPC_ZXT4_I29, TCG_REG_R2, arg1); > > + } > > + if (const_arg2 && arg2 != 0) { > > + opc3 = tcg_opc_a5(TCG_REG_P0, OPC_ADDL_A5, > > + TCG_REG_R3, arg2, TCG_REG_R0); > > + } else if (is_signed) { > > + opc3 = tcg_opc_i29(TCG_REG_P0, OPC_SXT4_I29, TCG_REG_R3, arg2); > > + } else { > > + opc3 = tcg_opc_i29(TCG_REG_P0, OPC_ZXT4_I29, TCG_REG_R3, arg2); > > + } > > + > > Why the check form arg[12] != 0? Seems like a wasted test, especially if > the optimizer is enabled and we ought never see it. It comes from copy and paste from other code, dating from before the optimizer pass. It looks like some code can be removed. > I would have said you shouldn't bother implementing the _i32 versions for > ia64, because the generic fallback would produce the same code. But in > this case it's more about doing the job with fewer bundles. Yes, the code would be basically the same, but with more bundles, so I still think it make sense to implement it. > Otherwise, the code looks correct, > > Reviewed-by: Richard Henderson -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net