]> 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:00:32 +0000 (17:00 +0100)
A lsr can do what the mov and lsr did.

(cherry picked from commit b47c3e7637efb77818cbef55dcd0ed1f0ea0ddf1)

ChangeLog
sysdeps/aarch64/strncmp.S

index f3e18cb56b4ef38dcf5a652e602cb99fb926db50..99b61809ea2d2df1bbc099263d5d30f612509fdf 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 1dc8b79a223b690210d46cc0394d6ad878515ff2..759c752fc2d5b76293bed8d70ddcd8b34d9f1db9 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