From: Andreas Larsson Date: Wed, 15 Nov 2023 12:29:43 +0000 (+0100) Subject: sparc: Fix broken memset for sparc32 [BZ #31068] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5e88bbf596206ae8f24be90c078f08ca479d596;p=thirdparty%2Fglibc.git 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 Signed-off-by: Ludwig Rydberg Reviewed-by: Adhemerval Zanella (cherry picked from commit 578190b7e43305141512dee777e4a3b3e8159393) --- diff --git a/sysdeps/sparc/sparc32/memset.S b/sysdeps/sparc/sparc32/memset.S index b1b67cb2d10..51542633171 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)