]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64/strncmp: Unbreak builds with old binutils
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 14 Mar 2018 13:21:05 +0000 (18:51 +0530)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 6 Sep 2019 16:14:47 +0000 (17:14 +0100)
Binutils 2.26.* and older do not support moves with shifted registers,
so use a separate shift instruction instead.

(cherry picked from commit d46f84de745db8f3f06a37048261f4e5ceacf0a3)

ChangeLog
sysdeps/aarch64/strncmp.S

index b1de9c05c89d2a3d03edb753ecabc34fe00e239e..2c388920dce5162f70544a162777d0e13b24a58a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
+
+       * sysdeps/aarch64/strncmp.S (strncmp): Use a separate shift
+       instruction to unbreak builds with binutils 2.26 and older.
+
 2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
        * sysdeps/aarch64/strncmp.S (count): New macro.
index 33c07befd8286830c715bd652bc2b7777a478f90..d1bfa27ca4c9b0f4f43f177e19c04ea03e626f34 100644 (file)
@@ -208,13 +208,15 @@ L(done):
        /* Align the SRC1 to a dword by doing a bytewise compare and then do
           the dword loop.  */
 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)
 
        neg     count, count
        and     count, count, #7
        sub     limit, limit, count
-       mov     limit_wd, limit, lsr #3
+       mov     limit_wd, limit
+       lsr     limit_wd, limit_wd, #3
 
 L(page_end_loop):
        ldrb    data1w, [src1], #1