diff options
author | Victor Do Nascimento <Victor.DoNascimento@arm.com> | 2022-12-07 14:54:18 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-12-07 14:54:18 +0000 |
commit | 7d205b8787a4462d6e605ee826edf2666f899a34 (patch) | |
tree | 4623b3a120fb428d453b46a5c3329452a7599362 /string | |
parent | fa1ba23f84ab1c65dea77d3940535261181766cf (diff) | |
download | arm-optimized-routines-7d205b8787a4462d6e605ee826edf2666f899a34.tar.gz |
string: arm: Fix cfi restore info for hot loop exit
The branch out of the core memchr loop to label 60 jumps over the
popping of registers r4-r7. The restoration of the cfi state at 60 is
adjusted to reflect this fact, avoiding restoring a state where r4-r7
have already been popped off the stack.
Built w/ arm-none-linux-gnueabihf, ran make check-string w/ qemu-arm-static.
Diffstat (limited to 'string')
-rw-r--r-- | string/arm/memchr.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/string/arm/memchr.S b/string/arm/memchr.S index 9649e10..9b77b75 100644 --- a/string/arm/memchr.S +++ b/string/arm/memchr.S @@ -129,7 +129,12 @@ __memchr_arm: 60: @ We're here because the fast path found a hit - now we have to track down exactly which word it was @ r0 points to the start of the double word after the one that was tested @ r5 has the 00/ff pattern for the first word, r6 has the chained value - .cfi_restore_state + .cfi_restore_state @ Standard post-prologue state + .cfi_adjust_cfa_offset 16 + .cfi_rel_offset 4, 0 + .cfi_rel_offset 5, 4 + .cfi_rel_offset 6, 8 + .cfi_rel_offset 7, 12 cmp r5, #0 itte eq moveq r5, r6 @ the end is in the 2nd word |