123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #include <features.h>
- #include <sysdep.h>
- ENTRY(strcmp)
- or r2,r0,r1
- bmsk_s r2,r2,1
- brne r2,0,.Lcharloop
- mov_s r12,0x01010101
- ror r5,r12
- .Lwordloop:
- ld.ab r2,[r0,4]
- ld.ab r3,[r1,4]
- nop_s
- sub r4,r2,r12
- bic r4,r4,r2
- and r4,r4,r5
- brne r4,0,.Lfound0
- breq r2,r3,.Lwordloop
- #ifdef __LITTLE_ENDIAN__
- xor r0,r2,r3
- sub_s r1,r0,1
- bic_s r0,r0,r1
- sub r1,r5,r0
- xor r0,r5,r1
- and_s r2,r2,r0
- and_s r3,r3,r0
- #endif
- cmp_s r2,r3
- mov_s r0,1
- j_s.d [blink]
- bset.lo r0,r0,31
- .balign 4
- #ifdef __LITTLE_ENDIAN__
- .Lfound0:
- xor r0,r2,r3
- or r0,r0,r4
- sub_s r1,r0,1
- bic_s r0,r0,r1
- sub r1,r5,r0
- xor r0,r5,r1
- and_s r2,r2,r0
- and_s r3,r3,r0
- sub.f r0,r2,r3
- mov.hi r0,1
- j_s.d [blink]
- bset.lo r0,r0,31
- #else
-
- .balign 4
- .Lfound0:
- lsr r0,r4,8
- lsr_s r1,r2
- bic_s r2,r2,r0
- bic_s r0,r0,r1
- or_s r3,r3,r0
- cmp_s r3,r2
- or_s r2,r2,r0
- bic_s r3,r3,r0
- rlc r0,0
- cmp_s r2,r3
- j_s.d [blink]
- bset.lo r0,r0,31
- #endif
- .balign 4
- .Lcharloop:
- ldb.ab r2,[r0,1]
- ldb.ab r3,[r1,1]
- nop_s
- breq r2,0,.Lcmpend
- breq r2,r3,.Lcharloop
- .Lcmpend:
- j_s.d [blink]
- sub r0,r2,r3
- END(strcmp)
- libc_hidden_def(strcmp)
- #ifndef __UCLIBC_HAS_LOCALE__
- strong_alias(strcmp,strcoll)
- libc_hidden_def(strcoll)
- #endif
|