diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/sparc/sparc32/strchr.S | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'sysdeps/sparc/sparc32/strchr.S')
-rw-r--r-- | sysdeps/sparc/sparc32/strchr.S | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/sysdeps/sparc/sparc32/strchr.S b/sysdeps/sparc/sparc32/strchr.S index b5be3adf60..7c397171f5 100644 --- a/sysdeps/sparc/sparc32/strchr.S +++ b/sysdeps/sparc/sparc32/strchr.S @@ -39,9 +39,20 @@ .text .align 4 -10: ldub [%o0], %g4 +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 cmp %g4, %o1 - be 1f + be 11f add %o0, 1, %o0 cmp %g4, 0 be 9f @@ -50,7 +61,7 @@ or %o4, %lo(0x80808080), %o3 ldub [%o0], %g4 cmp %g4, %o1 - be 1f + be 11f add %o0, 1, %o0 cmp %g4, 0 be 9f @@ -59,27 +70,17 @@ sethi %hi(0x01010101), %o5 ldub [%o0], %g4 cmp %g4, %o1 - be 1f + be 11f add %o0, 1, %o0 cmp %g4, 0 be 9f or %o5, %lo(0x01010101), %o2 b 6f ld [%o0], %g4 -1: retl +11: retl sub %o0, 1, %o0 -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 +13: or %o4, %lo(0x80808080), %o3 4: sethi %hi(0x01010101), %o5 5: or %o5, %lo(0x01010101), %o2 7: ld [%o0], %g4 @@ -278,7 +279,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) |