[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH 1/2] target-xtensa: fix extui shift amount
From: |
Richard Henderson |
Subject: |
Re: [Qemu-stable] [PATCH 1/2] target-xtensa: fix extui shift amount |
Date: |
Thu, 20 Sep 2012 17:02:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
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~