target/arm: Fix LD1W and LDFF1W (scalar plus vector)
PATCH 1/1 target/arm: Fix LD1W and LDFF1W (scalar plus vector)
'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop.
---
Fixes a SIGSEGV within one of these generated helpers, exposed by an armclang vectorized code sample.
r~
--- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/arm/sve_helper.c +2 -2
@@ -4855,7 +4855,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; \
@@ -4936,7 +4936,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; \
Signature · 1 line
2.17.1
Hello,
Quoted 4 lines · Richard Henderson
'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop.
Signed-off-by Richard Henderson <[email protected]>
I didn't try to apply the patch but line numbers look wrong.
I guess this should apply to DO_LD1_ZPZ_S and DO_LDFF1_ZPZ macros, in which case you get my review:
Thanks,
Laurent
Quoted 38 lines
---
Fixes a SIGSEGV within one of these generated helpers, exposed by an armclang vectorized code sample.
r~
--- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/arm/sve_helper.c +2
-3@@ -4855,7 +4855,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; \@@ -4936,7 +4936,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; \ --2.17.1
Quoted 7 lines · Laurent Desnogues
Hello,
Quoted 3 lines · Richard Henderson
'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop.
Quoted 6 lines
Quoted 1 line
Signed-off-by Richard Henderson <[email protected]>I didn't try to apply the patch but line numbers look wrong.
I guess this should apply to
DO_LD1_ZPZ_SandDO_LDFF1_ZPZmacros, in which case you get my review:
The patch was pulled out of the middle of a branch, so the line numbers might be off. I probably should have cherry-picked it to master before posting...
r~
Quoted 4 lines · Richard Henderson
'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop.
Signed-off-by Richard Henderson <[email protected]>
Quoted 26 lines
---
Fixes a SIGSEGV within one of these generated helpers, exposed by an armclang vectorized code sample.
r~
--- target/arm/sve_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/arm/sve_helper.c +1
-1@@ -4855,7 +4855,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; \
target/arm/sve_helper.c void HELPER(NAME)(CPUARMState *env, void *vd, void *vg, void *vm, \ · line 4942
Quoted 8 lines
target/arm/sve_helper.c +1
-1@@ -4936,7 +4936,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; \
--
Alex Bennée
Peter Maydell
AppliedQuoted 9 lines · Richard Henderson
'I' was being double-incremented; correctly within the inner loop and incorrectly within the outer loop.
Signed-off-by Richard Henderson <[email protected]>---
Fixes a SIGSEGV within one of these generated helpers, exposed by an armclang vectorized code sample.
Applied to target-arm.next, thanks.
-- PMM