From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCQb-0003aP-Nr for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:14:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFCQa-0005Xa-QX for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:14:33 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:64865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCQa-0005Wb-JC for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:14:32 -0400 Received: by pbbrp12 with SMTP id rp12so8663782pbb.4 for ; Fri, 21 Sep 2012 16:14:31 -0700 (PDT) Sender: Richard Henderson Message-ID: <505CF4D5.3080102@twiddle.net> Date: Fri, 21 Sep 2012 16:14:29 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1348256016-5077-1-git-send-email-aurelien@aurel32.net> <1348256016-5077-4-git-send-email-aurelien@aurel32.net> In-Reply-To: <1348256016-5077-4-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Aurelien Jarno Cc: Peter Maydell , qemu-devel@nongnu.org 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. r~