From 628fc75f3a3bb115de3b445c1a18547c44613cfe Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 16 Jul 2018 17:18:41 +0100 Subject: target/arm: Fix LD1W and LDFF1W (scalar plus vector) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop. Signed-off-by: Richard Henderson Reviewed-by: Laurent Desnogues Reviewed-by: Alex Bennée Tested-by: Alex Bennée Message-id: 20180711103957.3040-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target') diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index a03ca77354..54795c9194 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -4459,7 +4459,7 @@ void HELPER(NAME)(CPUARMState *env, void *vd, void *vg, void *vm, \ intptr_t i, oprsz = simd_oprsz(desc); \ unsigned scale = simd_data(desc); \ uintptr_t ra = GETPC(); \ - for (i = 0; i < oprsz; i++) { \ + for (i = 0; i < oprsz; ) { \ uint16_t pg = *(uint16_t *)(vg + H1_2(i >> 3)); \ do { \ TYPEM m = 0; \ @@ -4540,7 +4540,7 @@ void HELPER(NAME)(CPUARMState *env, void *vd, void *vg, void *vm, \ uintptr_t ra = GETPC(); \ bool first = true; \ mmap_lock(); \ - for (i = 0; i < oprsz; i++) { \ + for (i = 0; i < oprsz; ) { \ uint16_t pg = *(uint16_t *)(vg + H1_2(i >> 3)); \ do { \ TYPEM m = 0; \ -- cgit v1.2.3