summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2016-07-21 13:19:34 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-08-11 10:59:54 +0200
commit668033eb9f0e1d61178ed87f9784d375d478124c (patch)
treea89bcd321d24c8788eeb5719646d3dc3b014c961
parent1baa8bb8431c8eac319168727b89ce38c8b66fbe (diff)
downloadcygnal-668033eb9f0e1d61178ed87f9784d375d478124c.tar.gz
cygnal-668033eb9f0e1d61178ed87f9784d375d478124c.tar.bz2
cygnal-668033eb9f0e1d61178ed87f9784d375d478124c.zip
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>
-rw-r--r--newlib/libc/machine/arc/strcmp.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/machine/arc/strcmp.S b/newlib/libc/machine/arc/strcmp.S
index 40676055f..40a9e943f 100644
--- a/newlib/libc/machine/arc/strcmp.S
+++ b/newlib/libc/machine/arc/strcmp.S
@@ -97,7 +97,7 @@ ENTRY (strcmp)
when bit 7 is cleared. */
.balign 4
.Lfound0:
-#ifndef __ARC601__
+#ifdef __ARC_BARREL_SHIFTER__
lsr r0,r4,8
lsr_s r1,r2
bic_s r2,r2,r0 ; get low estimate for r2 and get ...
@@ -110,11 +110,11 @@ ENTRY (strcmp)
cmp_s r2,r3
j_s.d [blink]
bset.lo r0,r0,31
-#else /* __ARC601__ */
+#else /* __ARC_BARREL_SHIFTER__ */
/* Fall through to .Lcharloop. */
sub_s r0,r0,4
sub_s r1,r1,4
-#endif /* __ARC601__ */
+#endif /* __ARC_BARREL_SHIFTER__ */
#endif /* ENDIAN */
.balign 4