arc: Fix strcmp for big endian without barrel shifter
strcmp.S contained invalid guard for code that used barrel-shifter optional instruction - it was checking for !ARC601 instead of whether barrel shifter is present. While it is true that ARC601 doesn't have barrel shifter, so does some other ARC EM configurations. 2016-07-21 Anton Kolesov <Anton.Kolesov@synopsys.com> * libc/machine/arc/strcmp.S: Fix big endian without barrel shifter. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
This commit is contained in:
parent
1baa8bb843
commit
668033eb9f
@ -97,7 +97,7 @@ ENTRY (strcmp)
|
|||||||
when bit 7 is cleared. */
|
when bit 7 is cleared. */
|
||||||
.balign 4
|
.balign 4
|
||||||
.Lfound0:
|
.Lfound0:
|
||||||
#ifndef __ARC601__
|
#ifdef __ARC_BARREL_SHIFTER__
|
||||||
lsr r0,r4,8
|
lsr r0,r4,8
|
||||||
lsr_s r1,r2
|
lsr_s r1,r2
|
||||||
bic_s r2,r2,r0 ; get low estimate for r2 and get ...
|
bic_s r2,r2,r0 ; get low estimate for r2 and get ...
|
||||||
@ -110,11 +110,11 @@ ENTRY (strcmp)
|
|||||||
cmp_s r2,r3
|
cmp_s r2,r3
|
||||||
j_s.d [blink]
|
j_s.d [blink]
|
||||||
bset.lo r0,r0,31
|
bset.lo r0,r0,31
|
||||||
#else /* __ARC601__ */
|
#else /* __ARC_BARREL_SHIFTER__ */
|
||||||
/* Fall through to .Lcharloop. */
|
/* Fall through to .Lcharloop. */
|
||||||
sub_s r0,r0,4
|
sub_s r0,r0,4
|
||||||
sub_s r1,r1,4
|
sub_s r1,r1,4
|
||||||
#endif /* __ARC601__ */
|
#endif /* __ARC_BARREL_SHIFTER__ */
|
||||||
#endif /* ENDIAN */
|
#endif /* ENDIAN */
|
||||||
|
|
||||||
.balign 4
|
.balign 4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user