[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 22/31] target/arm: Implement SVE2 integer add/subtract long w
From: |
Laurent Desnogues |
Subject: |
Re: [PATCH 22/31] target/arm: Implement SVE2 integer add/subtract long with carry |
Date: |
Mon, 13 Apr 2020 18:18:23 +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 a0995d95c7..aa330f75c3 100644
> --- a/target/arm/sve_helper.c
> +++ b/target/arm/sve_helper.c
[...]
> +void HELPER(sve2_adcl_d)(void *vd, void *va, void *vn, void *vm, uint32_t
> desc)
> +{
> + intptr_t i, opr_sz = simd_oprsz(desc);
> + int sel = extract32(desc, SIMD_DATA_SHIFT, 1) * 32;
> + uint64_t inv = -(uint64_t)extract32(desc, SIMD_DATA_SHIFT + 1, 1);
> + uint64_t *d = vd, *a = va, *n = vn, *m = vm;
> +
> + for (i = 0; i < opr_sz / 8; i += 2) {
> + Int128 e1 = int128_make64(a[i]);
> + Int128 e2 = int128_make64(n[i + sel] ^ inv);
> + Int128 c = int128_make64(m[i + 1] & 1);
> + Int128 r = int128_add(int128_add(e1, e2), c);
> + d[i + 0] = int128_getlo(r);
> + d[i + 1] = int128_gethi(r);
> + }
> +}
sel should not be multiplied by 32.
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 22/31] target/arm: Implement SVE2 integer add/subtract long with carry,
Laurent Desnogues <=