Received: from eggs.gnu.org ([208.118.235.92]:58220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFM5e-0004gc-4k for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:33:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFM5a-0000Yk-1o for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:33:34 -0400 Received: from hall.aurel32.net ([88.191.126.93]:54602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFM5Z-0000Yg-QU for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:33:29 -0400 Date: Sat, 22 Sep 2012 11:33:26 +0200 From: Aurelien Jarno Message-ID: <20120922093326.GB23250@ohm.aurel32.net> References: <1348256016-5077-1-git-send-email-aurelien@aurel32.net> <1348256016-5077-4-git-send-email-aurelien@aurel32.net> <505CF4D5.3080102@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <505CF4D5.3080102@twiddle.net> Subject: Re: [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr helpers to TCG List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , qemu-devel@nongnu.org On Fri, Sep 21, 2012 at 04:14:29PM -0700, Richard Henderson wrote: > On 09/21/2012 12:33 PM, Aurelien Jarno wrote: > > +static void gen_sar(TCGv dest, TCGv t0, TCGv t1) > > +{ > > + TCGv tmp1, tmp2, tmp3; > > + tmp1 = tcg_temp_new_i32(); > > + tcg_gen_andi_i32(tmp1, t1, 0xff); > > + tmp2 = tcg_const_i32(0x1f); > > + tmp3 = tcg_const_i32(0); > > + tcg_gen_movcond_i32(TCG_COND_GTU, tmp1, tmp1, tmp2, tmp2, tmp1); > > + tcg_temp_free_i32(tmp3); > > + tcg_temp_free_i32(tmp2); > > + tcg_gen_andi_i32(tmp1, tmp1, 0x1f); > > + tcg_gen_sar_i32(dest, t0, tmp1); > > + tcg_temp_free_i32(tmp1); > > +} > > tmp3 is unused in this version. > Good catch, fix locally. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net