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: 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



reply via email to

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