aarch64/strncmp: Unbreak builds with old binutils

Binutils 2.26.* and older do not support moves with shifted registers,
so use a separate shift instruction instead.
This commit is contained in:
Siddhesh Poyarekar 2018-03-14 18:51:05 +05:30
parent 7108f1f944
commit d46f84de74
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2018-03-14 Siddhesh Poyarekar <siddhesh@sourceware.org>
* sysdeps/aarch64/strncmp.S (strncmp): Use a separate shift
instruction to unbreak builds with binutils 2.26 and older.
2018-03-13 Siddhesh Poyarekar <siddhesh@sourceware.org> 2018-03-13 Siddhesh Poyarekar <siddhesh@sourceware.org>
* sysdeps/aarch64/strncmp.S (count): New macro. * sysdeps/aarch64/strncmp.S (count): New macro.

View File

@ -208,13 +208,15 @@ L(done):
/* Align the SRC1 to a dword by doing a bytewise compare and then do /* Align the SRC1 to a dword by doing a bytewise compare and then do
the dword loop. */ the dword loop. */
L(try_misaligned_words): L(try_misaligned_words):
mov limit_wd, limit, lsr #3 mov limit_wd, limit
lsr limit_wd, limit_wd, #3
cbz count, L(do_misaligned) cbz count, L(do_misaligned)
neg count, count neg count, count
and count, count, #7 and count, count, #7
sub limit, limit, count sub limit, limit, count
mov limit_wd, limit, lsr #3 mov limit_wd, limit
lsr limit_wd, limit_wd, #3
L(page_end_loop): L(page_end_loop):
ldrb data1w, [src1], #1 ldrb data1w, [src1], #1