Skip to contentSkip to conversation

target/arm: Copy the entire vector in DO_ZIP

PATCH Applied Richard Henderson 3 participants 3 messages Oct 31, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Copy the entire vector in DO_ZIP

With odd_ofs set, we weren't copying enough data.

Fixes 09eb6d7025d1 ("target/arm: Move sve zip high_ofs into simd_data")
---
 target/arm/sve_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/arm/sve_helper.c +2 -2
index 3d0d2987cd..1afeadf9c8 100644
@@ -3366,10 +3366,10 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc)       \
     /* We produce output faster than we consume input.               \
        Therefore we must be mindful of possible overlap.  */         \
     if (unlikely((vn - vd) < (uintptr_t)oprsz)) {                    \
-        vn = memcpy(&tmp_n, vn, oprsz_2);                            \
+        vn = memcpy(&tmp_n, vn, oprsz);                              \
     }                                                                \
     if (unlikely((vm - vd) < (uintptr_t)oprsz)) {                    \
-        vm = memcpy(&tmp_m, vm, oprsz_2);                            \
+        vm = memcpy(&tmp_m, vm, oprsz);                              \
     }                                                                \
     for (i = 0; i < oprsz_2; i += sizeof(TYPE)) {                    \
         *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \
Signature · 1 line
2.34.1