[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr hel
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr helpers to TCG |
Date: |
Fri, 21 Sep 2012 16:14:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
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~
- [Qemu-devel] [PATCH v2 0/5] target-arm: misc optimizations, Aurelien Jarno, 2012/09/21
- [Qemu-devel] [PATCH v2 5/5] target-arm: use deposit instead of hardcoded version, Aurelien Jarno, 2012/09/21
- [Qemu-devel] [PATCH v2 2/5] target-arm: convert add_cc and sub_cc helpers to TCG, Aurelien Jarno, 2012/09/21
- [Qemu-devel] [PATCH v2 3/5] target-arm: convert sar, shl and shr helpers to TCG, Aurelien Jarno, 2012/09/21
- [Qemu-devel] [PATCH v2 1/5] target-arm: use globals for CC flags, Aurelien Jarno, 2012/09/21
- [Qemu-devel] [PATCH v2 4/5] target-arm: mark a few integer helpers const and pure, Aurelien Jarno, 2012/09/21
- Re: [Qemu-devel] [PATCH v2 0/5] target-arm: misc optimizations, Peter Maydell, 2012/09/25