Hi Philippe,

On Sun, Nov 5, 2017 at 7:23 AM, Philippe Mathieu-Daudé <[email protected]> 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