[Top][All Lists]

[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 16:03:10 -0800

On Sun, Nov 5, 2017 at 3:43 PM, Max Filippov <address@hidden> wrote:
>> 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.

Oh, I've got it, replace cpu_R[arg[1]] with a temporary:

TCGv_i32 c = tcg_const_i32(arg[1]);
tcg_gen_deposit_i32(cpu_R[arg[0]], c, cpu_R[arg[0]], 16, 16);

-- Max

reply via email to

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