[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/31] target/arm: Implement SVE2 integer add/subtract wide
From: |
Laurent Desnogues |
Subject: |
Re: [PATCH 13/31] target/arm: Implement SVE2 integer add/subtract wide |
Date: |
Mon, 13 Apr 2020 18:11:37 +0200 |
On Fri, Mar 27, 2020 at 12:17 AM Richard Henderson
<address@hidden> wrote:
[...]
> diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
> index 7d7a59f620..44503626e4 100644
> --- a/target/arm/sve_helper.c
> +++ b/target/arm/sve_helper.c
> @@ -1131,6 +1131,36 @@ DO_ZZZ_TB(sve2_uabdl_d, uint64_t, uint32_t, DO_ABD)
>
> #undef DO_ZZZ_TB
>
> +#define DO_ZZZ_WTB(NAME, TYPE, TYPEN, OP) \
> +void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \
> +{ \
> + intptr_t i, opr_sz = simd_oprsz(desc); \
> + int sel2 = (simd_data(desc) & 1) * sizeof(TYPE); \
> + for (i = 0; i < opr_sz; i += sizeof(TYPE)) { \
> + TYPE nn = *(TYPE *)(vn + i); \
> + TYPE mm = (TYPEN)(*(TYPE *)(vm + i) >> sel2); \
> + *(TYPE *)(vd + i) = OP(nn, mm); \
> + } \
> +}
For sel2 the multiplicand should be the number of bits of TYPEN.
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 13/31] target/arm: Implement SVE2 integer add/subtract wide,
Laurent Desnogues <=