summaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/strchr.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/strchr.S
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/sparc/sparc32/strchr.S')
-rw-r--r--sysdeps/sparc/sparc32/strchr.S37
1 files changed, 18 insertions, 19 deletions
diff --git a/sysdeps/sparc/sparc32/strchr.S b/sysdeps/sparc/sparc32/strchr.S
index 7c397171f5..b5be3adf60 100644
--- a/sysdeps/sparc/sparc32/strchr.S
+++ b/sysdeps/sparc/sparc32/strchr.S
@@ -39,20 +39,9 @@
.text
.align 4
-ENTRY(strchr)
- andcc %o1, 0xff, %o1
- be 12f
- sll %o1, 8, %o2
- andcc %o0, 3, %g0
- or %o1, %o2, %o2
- sethi %hi(0x80808080), %o4
- sll %o2, 16, %o3
- be 13f
- or %o3, %o2, %g2
-
- ldub [%o0], %g4
+10: ldub [%o0], %g4
cmp %g4, %o1
- be 11f
+ be 1f
add %o0, 1, %o0
cmp %g4, 0
be 9f
@@ -61,7 +50,7 @@ ENTRY(strchr)
or %o4, %lo(0x80808080), %o3
ldub [%o0], %g4
cmp %g4, %o1
- be 11f
+ be 1f
add %o0, 1, %o0
cmp %g4, 0
be 9f
@@ -70,17 +59,27 @@ ENTRY(strchr)
sethi %hi(0x01010101), %o5
ldub [%o0], %g4
cmp %g4, %o1
- be 11f
+ be 1f
add %o0, 1, %o0
cmp %g4, 0
be 9f
or %o5, %lo(0x01010101), %o2
b 6f
ld [%o0], %g4
-11: retl
+1: retl
sub %o0, 1, %o0
-13: or %o4, %lo(0x80808080), %o3
+ENTRY(strchr)
+ andcc %o1, 0xff, %o1
+ be 12f
+ sll %o1, 8, %o2
+ andcc %o0, 3, %g0
+ or %o1, %o2, %o2
+ sethi %hi(0x80808080), %o4
+ sll %o2, 16, %o3
+ bne 10b
+ or %o3, %o2, %g2
+ or %o4, %lo(0x80808080), %o3
4: sethi %hi(0x01010101), %o5
5: or %o5, %lo(0x01010101), %o2
7: ld [%o0], %g4
@@ -279,7 +278,7 @@ ENTRY(strrchr)
mov %o5, %o0
END(strrchr)
-weak_alias (strchr, index)
-weak_alias (strrchr, rindex)
+weak_alias(strchr, index)
+weak_alias(strrchr, rindex)
libc_hidden_builtin_def (strchr)
libc_hidden_builtin_def (strrchr)