[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~
- Re: [PATCH v2 06/15] tcg/arm: Implement minimal vector operations, (continued)
- [PATCH v2 08/15] tcg/arm: Implement TCG_TARGET_HAS_shi_vec, Richard Henderson, 2021/02/07
- [PATCH v2 13/15] tcg/arm: Implement TCG_TARGET_HAS_shv_vec, Richard Henderson, 2021/02/07
- [PATCH v2 09/15] tcg/arm: Implement TCG_TARGET_HAS_mul_vec, Richard Henderson, 2021/02/07
- [PATCH v2 12/15] tcg/arm: Implement TCG_TARGET_HAS_bitsel_vec, Richard Henderson, 2021/02/07
- [PATCH v2 15/15] tcg/arm: Implement TCG_TARGET_HAS_rotv_vec, Richard Henderson, 2021/02/07
- [PATCH v2 10/15] tcg/arm: Implement TCG_TARGET_HAS_sat_vec, Richard Henderson, 2021/02/07
- [PATCH v2 11/15] tcg/arm: Implement TCG_TARGET_HAS_minmax_vec, Richard Henderson, 2021/02/07
- [PATCH v2 14/15] tcg/arm: Implement TCG_TARGET_HAS_roti_vec, Richard Henderson, 2021/02/07