[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 37/82] target/arm: Implement SVE2 complex integer multiply
From: |
Peter Maydell |
Subject: |
Re: [PATCH v6 37/82] target/arm: Implement SVE2 complex integer multiply-add |
Date: |
Wed, 12 May 2021 16:20:23 +0100 |
On Fri, 30 Apr 2021 at 22:00, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> v2: Fix do_sqrdmlah_d (laurent desnogues)
> ---
> @@ -1448,6 +1448,48 @@ DO_SQDMLAL(sve2_sqdmlsl_zzzw_d, int64_t, int32_t,
> , H1_4,
>
> #undef DO_SQDMLAL
>
> +#define DO_CMLA(NAME, TYPE, H, OP) \
> +void HELPER(NAME)(void *vd, void *vn, void *vm, void *va, uint32_t desc) \
> +{ \
> + intptr_t i, opr_sz = simd_oprsz(desc) / sizeof(TYPE); \
> + int rot = simd_data(desc); \
> + int sel_a = rot & 1, sel_b = sel_a ^ 1; \
> + bool sub_r = rot == 1 || rot == 2; \
> + bool sub_i = rot >= 2; \
> + TYPE *d = vd, *n = vn, *m = vm, *a = va; \
> + for (i = 0; i < opr_sz; i += 2) { \
> + TYPE elt1_a = n[H(i + sel_a)]; \
> + TYPE elt2_a = m[H(i + sel_a)]; \
> + TYPE elt2_b = m[H(i + sel_b)]; \
> + d[H(i)] = OP(elt1_a, elt2_a, a[H(i)], sub_r); \
> + d[H(i + 1)] = OP(elt1_a, elt2_b, a[H(i + 1)], sub_i); \
> + } \
> +}
> +
> +#define do_cmla(N, M, A, S) (A + (N * M) * (S ? -1 : 1))
Could we rename this just so it's not different-in-case-only to
the other macro ?
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v6 37/82] target/arm: Implement SVE2 complex integer multiply-add,
Peter Maydell <=