diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/sparc/sparc32/strcat.S | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/sparc/sparc32/strcat.S')
-rw-r--r-- | sysdeps/sparc/sparc32/strcat.S | 78 |
1 files changed, 37 insertions, 41 deletions
diff --git a/sysdeps/sparc/sparc32/strcat.S b/sysdeps/sparc/sparc32/strcat.S index 4ce0771908..3709c8a692 100644 --- a/sysdeps/sparc/sparc32/strcat.S +++ b/sysdeps/sparc/sparc32/strcat.S @@ -38,14 +38,36 @@ .text .align 4 +10: cmp %o4, 2 + be 1f + cmp %o4, 3 + ldub [%o1], %o5 + add %o1, 1, %o1 + stb %o5, [%o0] + be 3f + cmp %o5, 0 + be 0f + add %o0, 1, %o0 +1: lduh [%o1], %o5 + add %o1, 2, %o1 + srl %o5, 8, %o4 + cmp %o4, 0 + stb %o4, [%o0] + bne,a 2f + stb %o5, [%o0 + 1] + retl + mov %g2, %o0 +2: andcc %o5, 0xff, %o5 + bne 4f + add %o0, 2, %o0 + retl + mov %g2, %o0 +3: bne 4f + add %o0, 1, %o0 + retl + mov %g2, %o0 -ENTRY(strcat) - mov %o0, %g2 - andcc %o0, 3, %g0 - be 30f - sethi %hi(0x80808080), %o4 - - ldub [%o0], %o5 +11: ldub [%o0], %o5 cmp %o5, 0 be 1f add %o0, 1, %o0 @@ -71,7 +93,12 @@ ENTRY(strcat) b 3f sub %o0, 1, %o0 -30: or %o4, %lo(0x80808080), %o3 +ENTRY(strcat) + mov %o0, %g2 + andcc %o0, 3, %g0 + bne 11b + sethi %hi(0x80808080), %o4 + or %o4, %lo(0x80808080), %o3 7: sethi %hi(0x01010101), %o4 8: or %o4, %lo(0x01010101), %o2 9: ld [%o0], %o5 @@ -101,39 +128,8 @@ ENTRY(strcat) ld [%o0], %o5 sub %o0, 1, %o0 3: andcc %o1, 3, %o4 - be 4f - nop - - cmp %o4, 2 - be 11f - cmp %o4, 3 - ldub [%o1], %o5 - add %o1, 1, %o1 - stb %o5, [%o0] - be 13f - cmp %o5, 0 - be 0f - add %o0, 1, %o0 -11: lduh [%o1], %o5 - add %o1, 2, %o1 - srl %o5, 8, %o4 - cmp %o4, 0 - stb %o4, [%o0] - bne,a 12f - stb %o5, [%o0 + 1] - retl - mov %g2, %o0 -12: andcc %o5, 0xff, %o5 - bne 4f - add %o0, 2, %o0 - retl - mov %g2, %o0 -13: bne 4f - add %o0, 1, %o0 - retl - mov %g2, %o0 - -4: andcc %o0, 3, %g3 + bne 10b +4: andcc %o0, 3, %g3 bne 12f 1: ld [%o1], %o5 add %o1, 4, %o1 |