qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/15] tcg/arm: Implement TCG_TARGET_HAS_bitsel_vec


From: Richard Henderson
Subject: Re: [PATCH v2 12/15] tcg/arm: Implement TCG_TARGET_HAS_bitsel_vec
Date: Mon, 8 Feb 2021 14:27:00 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 2/8/21 11:55 AM, Peter Maydell wrote:
> On Mon, 8 Feb 2021 at 04:02, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> NEON has 3 instructions implementing this 4 argument operation,
>> with each insn overlapping a different logical input onto the
>> destination register.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> @@ -2899,6 +2904,18 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode 
>> opc,
>>          }
>>          return;
>>
>> +    case INDEX_op_bitsel_vec:
>> +        a3 = args[3];
>> +        if (a0 == a3) {
>> +            tcg_out_vreg3(s, INSN_VBIT, q, 0, a0, a2, a1);
>> +        } else if (a0 == a2) {
>> +            tcg_out_vreg3(s, INSN_VBIF, q, 0, a0, a3, a1);
>> +        } else {
>> +            tcg_out_mov(s, type, a0, a1);
> 
> Side note: aarch64 tcg guards this tcg_out_mov with "if (a0 != a1)",
> which if I understand correctly is superfluous and could be removed.

Yep, tcg_out_mov already does that test.


r~



reply via email to

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