[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 07/82] target/arm: Implement SVE2 integer halving add/subt
From: |
Peter Maydell |
Subject: |
Re: [PATCH v6 07/82] target/arm: Implement SVE2 integer halving add/subtract (predicated) |
Date: |
Tue, 11 May 2021 09:45:51 +0100 |
On Fri, 30 Apr 2021 at 21:33, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/arm/helper-sve.h | 54 ++++++++++++++++++++++++++++++++++++++
> target/arm/sve.decode | 11 ++++++++
> target/arm/sve_helper.c | 39 +++++++++++++++++++++++++++
> target/arm/translate-sve.c | 8 ++++++
> 4 files changed, 112 insertions(+)
> diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
> index 7eff204c3b..3703b96eb4 100644
> --- a/target/arm/sve_helper.c
> +++ b/target/arm/sve_helper.c
> @@ -639,6 +639,45 @@ DO_ZPZZ(sve2_uqrshl_zpzz_h, uint16_t, H1_2, do_uqrshl_h)
> DO_ZPZZ(sve2_uqrshl_zpzz_s, uint32_t, H1_4, do_uqrshl_s)
> DO_ZPZZ_D(sve2_uqrshl_zpzz_d, uint64_t, do_uqrshl_d)
>
> +#define DO_HADD_BHS(n, m) (((int64_t)n + m) >> 1)
> +#define DO_HADD_D(n, m) ((n >> 1) + (m >> 1) + (n & m & 1))
> +
> +DO_ZPZZ(sve2_shadd_zpzz_b, int8_t, H1_2, DO_HADD_BHS)
> +DO_ZPZZ(sve2_shadd_zpzz_h, int16_t, H1_2, DO_HADD_BHS)
> +DO_ZPZZ(sve2_shadd_zpzz_s, int32_t, H1_4, DO_HADD_BHS)
> +DO_ZPZZ_D(sve2_shadd_zpzz_d, int64_t, DO_HADD_D)
More dubious use of H1_2 in the _b forms.
otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v6 07/82] target/arm: Implement SVE2 integer halving add/subtract (predicated),
Peter Maydell <=