qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 15/16] target/xtensa: implement const16


From: Max Filippov
Subject: Re: [Qemu-devel] [PATCH 15/16] target/xtensa: implement const16
Date: Sun, 5 Nov 2017 15:43:06 -0800

Hi Philippe,

On Sun, Nov 5, 2017 at 7:23 AM, Philippe Mathieu-Daudé <address@hidden> wrote:
>> +static void translate_const16(DisasContext *dc, const uint32_t arg[],
>> +                             const uint32_t par[])
>> +{
>> +    if (gen_window_check1(dc, arg[0])) {
>> +        TCGv_i32 v = tcg_temp_new_i32();
>> +
>> +        tcg_gen_shli_i32(v, cpu_R[arg[0]], 16);
>> +        tcg_gen_ori_i32(cpu_R[arg[0]], v, arg[1] & 0xffff);
>
> this is missing:
>
>              tcg_temp_free_i32(v);

Indeed, thank you.

>> +    }
>
> however I think this can be simplified in 1 instr on target supporting
> deposit32:
>
>     tcg_gen_deposit_i32(cpu_R[arg[0]], cpu_R[arg[1]], cpu_R[arg[0]], 16, 16)

arg[1] is an immediate argument, not a register index, so probably not.

-- 
Thanks.
-- Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]