summaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-04-06 00:53:38 +0000
committerRichard Henderson <richard.henderson@linaro.org>2018-04-06 23:08:50 +1000
commit6cb1d3b8517572031a22675280ec642972cdb395 (patch)
treee347a211fb9445c73284d1ca8fe2d6e1abf1a529 /accel
parent0e87fdc966d05f4e5ad868034fcd8ee2a08ca62d (diff)
downloadqemu-6cb1d3b8517572031a22675280ec642972cdb395.zip
tcg: Fix out-of-line generic vector compares
A mistake in the type passed to sizeof, that happens to work when the out-of-line fallback itself is using host vectors, but fails when using only the base types. Tested-by: Emilio G. Cota <cota@braap.org> Reported-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/tcg-runtime-gvec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c
index 8bf8d63912..90340e56e0 100644
--- a/accel/tcg/tcg-runtime-gvec.c
+++ b/accel/tcg/tcg-runtime-gvec.c
@@ -705,7 +705,7 @@ void HELPER(NAME)(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(TYPE)) { \
*(TYPE *)(d + i) = DO_CMP0(*(TYPE *)(a + i) OP *(TYPE *)(b + i)); \
} \
clear_high(d, oprsz, desc); \