public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/ibm/2.26/master] aarch64/strncmp: Unbreak builds with old binutils
@ 2020-03-03 20:37 Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; only message in thread
From: Tulio Magno Quites Machado Filho @ 2020-03-03 20:37 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=00fd3acde1475e1bc488ee13ae124d0340da856e

commit 00fd3acde1475e1bc488ee13ae124d0340da856e
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Wed Mar 14 18:51:05 2018 +0530

    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.
    
    (cherry picked from commit d46f84de745db8f3f06a37048261f4e5ceacf0a3)

Diff:
---
 ChangeLog                 | 5 +++++
 sysdeps/aarch64/strncmp.S | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b1de9c0..2c38892 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
 	(strncmp): Store misaligned length in SRC1 in COUNT.
 	(mutual_align): Adjust.
diff --git a/sysdeps/aarch64/strncmp.S b/sysdeps/aarch64/strncmp.S
index 33c07be..d1bfa27 100644
--- a/sysdeps/aarch64/strncmp.S
+++ b/sysdeps/aarch64/strncmp.S
@@ -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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-03 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 20:37 [glibc/ibm/2.26/master] aarch64/strncmp: Unbreak builds with old binutils Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).