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/strlen.S | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2 glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'sysdeps/sparc/sparc32/strlen.S')
-rw-r--r-- | sysdeps/sparc/sparc32/strlen.S | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sysdeps/sparc/sparc32/strlen.S b/sysdeps/sparc/sparc32/strlen.S index 76466ec9dd..ed92f20e28 100644 --- a/sysdeps/sparc/sparc32/strlen.S +++ b/sysdeps/sparc/sparc32/strlen.S @@ -38,39 +38,41 @@ .text .align 4 -10: ldub [%o0], %o5 + +ENTRY(strlen) + mov %o0, %o1 + andcc %o0, 3, %g0 + be 20f + sethi %hi(0x80808080), %o4 + + ldub [%o0], %o5 cmp %o5, 0 - be 1f + be 21f add %o0, 1, %o0 andcc %o0, 3, %g0 be 4f or %o4, %lo(0x80808080), %o3 ldub [%o0], %o5 cmp %o5, 0 - be 2f + be 22f add %o0, 1, %o0 andcc %o0, 3, %g0 be 5f sethi %hi(0x01010101), %o4 ldub [%o0], %o5 cmp %o5, 0 - be 3f + be 23f add %o0, 1, %o0 b 11f or %o4, %lo(0x01010101), %o2 -1: retl +21: retl mov 0, %o0 -2: retl +22: retl mov 1, %o0 -3: retl +23: retl mov 2, %o0 -ENTRY(strlen) - mov %o0, %o1 - andcc %o0, 3, %g0 - bne 10b - sethi %hi(0x80808080), %o4 - or %o4, %lo(0x80808080), %o3 +20: or %o4, %lo(0x80808080), %o3 4: sethi %hi(0x01010101), %o4 5: or %o4, %lo(0x01010101), %o2 11: ld [%o0], %o5 |