On 09/20/2012 03:59 PM, Max Filippov wrote:
> +                if (shiftimm) {
> +                    tcg_gen_shri_i32(tmp, cpu_R[RRR_T], shiftimm);
> +                } else {
> +                    tcg_gen_mov_i32(tmp, cpu_R[RRR_T]);
> +                }

tcg_gen_shri_i32 will perform this conditional already.

> +                switch (maskimm) {
> +                case 0xff:
> +                    tcg_gen_ext8u_i32(cpu_R[RRR_R], tmp);
> +                    break;
> +
> +                case 0xffff:
> +                    tcg_gen_ext16u_i32(cpu_R[RRR_R], tmp);
> +                    break;

And while this optimization happens eventually, we should
change tcg-op.h to make sure it happens in tcg_gen_andi.


r~

Reply via email to