[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/7] target/arm: Copy the entire vector in DO_ZIP
From: |
Peter Maydell |
Subject: |
[PULL 5/7] target/arm: Copy the entire vector in DO_ZIP |
Date: |
Fri, 4 Nov 2022 11:35:13 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
With odd_ofs set, we weren't copying enough data.
Fixes: 09eb6d7025d1 ("target/arm: Move sve zip high_ofs into simd_data")
Reported-by: Idan Horowitz <idan.horowitz@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221031054144.3574-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/sve_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
index 3d0d2987cd0..1afeadf9c85 100644
--- a/target/arm/sve_helper.c
+++ b/target/arm/sve_helper.c
@@ -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)); \
--
2.25.1
- [PULL 0/7] target-arm queue, Peter Maydell, 2022/11/04
- [PULL 1/7] hw/arm/boot: Set SME and SVE EL3 vector lengths when booting kernel, Peter Maydell, 2022/11/04
- [PULL 2/7] hw/arm/boot: Set SCR_EL3.HXEn when booting kernel, Peter Maydell, 2022/11/04
- [PULL 3/7] target/arm: Make TLBIOS and TLBIRANGE ops trap on HCR_EL2.TTLB, Peter Maydell, 2022/11/04
- [PULL 6/7] target/arm: Honor HCR_E2H and HCR_TGE in ats_write64(), Peter Maydell, 2022/11/04
- [PULL 4/7] target/arm: Fix Privileged Access Never (PAN) for aarch32, Peter Maydell, 2022/11/04
- [PULL 5/7] target/arm: Copy the entire vector in DO_ZIP,
Peter Maydell <=
- [PULL 7/7] target/arm: Two fixes for secure ptw, Peter Maydell, 2022/11/04
- Re: [PULL 0/7] target-arm queue, Stefan Hajnoczi, 2022/11/07