aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/strlen.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/sparc/sparc32/strlen.S
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/sparc/sparc32/strlen.S')
-rw-r--r--sysdeps/sparc/sparc32/strlen.S28
1 files changed, 13 insertions, 15 deletions
diff --git a/sysdeps/sparc/sparc32/strlen.S b/sysdeps/sparc/sparc32/strlen.S
index ed92f20e28..76466ec9dd 100644
--- a/sysdeps/sparc/sparc32/strlen.S
+++ b/sysdeps/sparc/sparc32/strlen.S
@@ -38,41 +38,39 @@
.text
.align 4
-
-ENTRY(strlen)
- mov %o0, %o1
- andcc %o0, 3, %g0
- be 20f
- sethi %hi(0x80808080), %o4
-
- ldub [%o0], %o5
+10: ldub [%o0], %o5
cmp %o5, 0
- be 21f
+ be 1f
add %o0, 1, %o0
andcc %o0, 3, %g0
be 4f
or %o4, %lo(0x80808080), %o3
ldub [%o0], %o5
cmp %o5, 0
- be 22f
+ be 2f
add %o0, 1, %o0
andcc %o0, 3, %g0
be 5f
sethi %hi(0x01010101), %o4
ldub [%o0], %o5
cmp %o5, 0
- be 23f
+ be 3f
add %o0, 1, %o0
b 11f
or %o4, %lo(0x01010101), %o2
-21: retl
+1: retl
mov 0, %o0
-22: retl
+2: retl
mov 1, %o0
-23: retl
+3: retl
mov 2, %o0
-20: or %o4, %lo(0x80808080), %o3
+ENTRY(strlen)
+ mov %o0, %o1
+ andcc %o0, 3, %g0
+ bne 10b
+ sethi %hi(0x80808080), %o4
+ or %o4, %lo(0x80808080), %o3
4: sethi %hi(0x01010101), %o4
5: or %o4, %lo(0x01010101), %o2
11: ld [%o0], %o5