On Tue, Sep 25, 2012 at 02:57:20PM +0100, Peter Maydell wrote:
> On 21 September 2012 20:33, 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);
> > +tm
On 21 September 2012 20:33, 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_movc
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);
> > +tmp
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_i
Now that the movcond TCG op is available, it's possible to replace
shl and shr helpers by TCG code. The code generated by TCG is slightly
longer than the code generated by GCC for the helper but is still worth
it as this avoid all the consequences of using an helper: globals saved
back to memory, n