diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-12-29 16:12:18 -0800 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-01-04 12:21:30 +0000 |
commit | bf7f25b1758fc9c6bc42a20bd690a5d64b27ccf3 (patch) | |
tree | fd6bfb1d09b5c76aec986d701a1b17bfa504ab43 | |
parent | e2d37ddacb8ccaa95bad904c2be29eee737e7f82 (diff) | |
download | arm-optimized-routines-bf7f25b1758fc9c6bc42a20bd690a5d64b27ccf3.tar.gz |
string: Replace explicit nops with alignment
These nops were placed to align code to 16-byte boundaries,
but then the addition of BTI and ILP32 has corrupted that.
-rw-r--r-- | string/aarch64/memchr-sve.S | 2 | ||||
-rw-r--r-- | string/aarch64/memset.S | 2 | ||||
-rw-r--r-- | string/aarch64/strcmp-sve.S | 2 | ||||
-rw-r--r-- | string/aarch64/strlen-sve.S | 3 |
4 files changed, 4 insertions, 5 deletions
diff --git a/string/aarch64/memchr-sve.S b/string/aarch64/memchr-sve.S index 2414b61..816cb98 100644 --- a/string/aarch64/memchr-sve.S +++ b/string/aarch64/memchr-sve.S @@ -23,8 +23,8 @@ ENTRY_ALIGN(__memchr_aarch64_sve, 4) dup z1.b, w1 /* duplicate c to a vector */ setffr /* initialize FFR */ mov x3, 0 /* initialize off */ - nop + .p2align 4 0: whilelo p1.b, x3, x2 /* make sure off < max */ b.none 9f diff --git a/string/aarch64/memset.S b/string/aarch64/memset.S index dc53d60..181cd63 100644 --- a/string/aarch64/memset.S +++ b/string/aarch64/memset.S @@ -39,7 +39,7 @@ ENTRY (__memset_aarch64) str val, [dstin] str val, [dstend, -8] ret - nop + .p2align 4 1: tbz count, 2, 2f str valw, [dstin] str valw, [dstend, -4] diff --git a/string/aarch64/strcmp-sve.S b/string/aarch64/strcmp-sve.S index cac03c0..27ee539 100644 --- a/string/aarch64/strcmp-sve.S +++ b/string/aarch64/strcmp-sve.S @@ -23,9 +23,9 @@ ENTRY_ALIGN (__strcmp_aarch64_sve, 4) setffr /* initialize FFR */ ptrue p1.b, all /* all ones; loop invariant */ mov x2, 0 /* initialize offset */ - nop /* Read a vector's worth of bytes, stopping on first fault. */ + .p2align 4 0: ldff1b z0.b, p1/z, [x0, x2] ldff1b z1.b, p1/z, [x1, x2] rdffrs p0.b, p1/z diff --git a/string/aarch64/strlen-sve.S b/string/aarch64/strlen-sve.S index 844353a..93a8f14 100644 --- a/string/aarch64/strlen-sve.S +++ b/string/aarch64/strlen-sve.S @@ -22,11 +22,10 @@ ENTRY_ALIGN (__strlen_aarch64_sve, 4) setffr /* initialize FFR */ ptrue p2.b /* all ones; loop invariant */ mov x1, 0 /* initialize length */ - nop /* Read a vector's worth of bytes, stopping on first fault. */ + .p2align 4 0: ldff1b z0.b, p2/z, [x0, x1] - nop rdffrs p0.b, p2/z b.nlast 2f |