[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: |
Peter Maydell |
Subject: |
Re: [PATCH v2 12/15] tcg/arm: Implement TCG_TARGET_HAS_bitsel_vec |
Date: |
Mon, 8 Feb 2021 19:55:49 +0000 |
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.
> + tcg_out_vreg3(s, INSN_VBSL, q, 0, a0, a2, a3);
> + }
> + return;
> +
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v2 06/15] tcg/arm: Implement minimal vector operations, (continued)
- [PATCH v2 06/15] tcg/arm: Implement minimal vector operations, Richard Henderson, 2021/02/07
- [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
- Re: [PATCH v2 12/15] tcg/arm: Implement TCG_TARGET_HAS_bitsel_vec,
Peter Maydell <=
- [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