]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64/strncmp: Use lsr instead of mov+lsr
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 15 Mar 2018 02:36:21 +0000 (08:06 +0530)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 6 Sep 2019 16:15:27 +0000 (17:15 +0100)
A lsr can do what the mov and lsr did.

(cherry picked from commit b47c3e7637efb77818cbef55dcd0ed1f0ea0ddf1)

ChangeLog
sysdeps/aarch64/strncmp.S

index 2c388920dce5162f70544a162777d0e13b24a58a..e9557b8c85accc90db0578001d7840812e266dbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
+
+       * sysdeps/aarch64/strncmp.S (strncmp): Use lsr instead of
+       mov + lsr.
+
 2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
        * sysdeps/aarch64/strncmp.S (strncmp): Use a separate shift
index d1bfa27ca4c9b0f4f43f177e19c04ea03e626f34..fc1f633348221d5e2fab8911722b2ffba5a71e67 100644 (file)
@@ -208,15 +208,13 @@ 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     limit_wd, limit_wd, #3
+       lsr     limit_wd, limit, #3
        cbz     count, L(do_misaligned)
 
        neg     count, count
        and     count, count, #7
        sub     limit, limit, count
-       mov     limit_wd, limit
-       lsr     limit_wd, limit_wd, #3
+       lsr     limit_wd, limit, #3
 
 L(page_end_loop):
        ldrb    data1w, [src1], #1