diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-06-07 09:40:19 -0500 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-06-12 21:08:38 -0700 |
commit | 899f08ad1d1231dbbfa67298413f05ed2679fb02 (patch) | |
tree | df55220a0c9484355a33486f32e3b9c529f11ebb /accel | |
parent | a050901d4b40092dc356b59912c6df39e389c7b9 (diff) |
tcg: Fix typos in helper_gvec_sar{8,32,64}v
The loop is written with scalars, not vectors.
Use the correct type when incrementing.
Fixes: 5ee5c14cacd
Reported-by: Laurent Vivier <lvivier@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/tcg-runtime-gvec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c index 3b6052fe97..51cb29ca79 100644 --- a/accel/tcg/tcg-runtime-gvec.c +++ b/accel/tcg/tcg-runtime-gvec.c @@ -874,7 +874,7 @@ void HELPER(gvec_sar8v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec8)) { + for (i = 0; i < oprsz; i += sizeof(int8_t)) { uint8_t sh = *(uint8_t *)(b + i) & 7; *(int8_t *)(d + i) = *(int8_t *)(a + i) >> sh; } @@ -898,7 +898,7 @@ void HELPER(gvec_sar32v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec32)) { + for (i = 0; i < oprsz; i += sizeof(int32_t)) { uint8_t sh = *(uint32_t *)(b + i) & 31; *(int32_t *)(d + i) = *(int32_t *)(a + i) >> sh; } @@ -910,7 +910,7 @@ void HELPER(gvec_sar64v)(void *d, void *a, void *b, uint32_t desc) intptr_t oprsz = simd_oprsz(desc); intptr_t i; - for (i = 0; i < oprsz; i += sizeof(vec64)) { + for (i = 0; i < oprsz; i += sizeof(int64_t)) { uint8_t sh = *(uint64_t *)(b + i) & 63; *(int64_t *)(d + i) = *(int64_t *)(a + i) >> sh; } |