public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.37/master] sparc: Fix broken memset for sparc32 [BZ #31068]
Date: Fri,  2 Feb 2024 13:25:55 +0000 (GMT)	[thread overview]
Message-ID: <20240202132555.423963857C77@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=98ec3e004e797ee7d4dc3ec43647b0cb11f3a9aa

commit 98ec3e004e797ee7d4dc3ec43647b0cb11f3a9aa
Author: Andreas Larsson <andreas@gaisler.com>
Date:   Wed Nov 15 13:29:43 2023 +0100

    sparc: Fix broken memset for sparc32 [BZ #31068]
    
    Fixes commit a61933fe27df ("sparc: Remove bzero optimization") that
    after moving code jumped to the wrong label 4.
    
    Verfied by successfully running string/test-memset on sparc32.
    
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Ludwig Rydberg <ludwig.rydberg@gaisler.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    (cherry picked from commit 578190b7e43305141512dee777e4a3b3e8159393)

Diff:
---
 sysdeps/sparc/sparc32/memset.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/sparc/sparc32/memset.S b/sysdeps/sparc/sparc32/memset.S
index ca29ff5685..1dc3a640e8 100644
--- a/sysdeps/sparc/sparc32/memset.S
+++ b/sysdeps/sparc/sparc32/memset.S
@@ -55,7 +55,7 @@ ENTRY(memset)
 
 	andcc		%o0, 3, %o2
 	bne		3f
-4:	 andcc		%o0, 4, %g0
+5:	 andcc		%o0, 4, %g0
 
 	be		2f
 	 mov		%g3, %g2
@@ -139,7 +139,7 @@ ENTRY(memset)
 	stb		%g3, [%o0 + 0x02]
 2:	sub		%o2, 4, %o2
 	add		%o1, %o2, %o1
-	b		4b
+	b		5b
 	 sub		%o0, %o2, %o0
 END(memset)
 libc_hidden_builtin_def (memset)

                 reply	other threads:[~2024-02-02 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240202132555.423963857C77@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).