summaryrefslogtreecommitdiffstats
path: root/arch/arc/lib/strchr-700.S
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2013-09-06 02:12:08 +0200
committerChris Zankel <chris@zankel.net>2013-09-06 02:12:08 +0200
commit0bc2ba94a65d2cd2ad01004d2d3f94f31c6064bd (patch)
treefc0354e4da0ff5ab8b8eb65d60d9a8359d02634d /arch/arc/lib/strchr-700.S
parentLinux 3.11-rc2 (diff)
parentLinux 3.11 (diff)
downloadlinux-0bc2ba94a65d2cd2ad01004d2d3f94f31c6064bd.tar.xz
linux-0bc2ba94a65d2cd2ad01004d2d3f94f31c6064bd.zip
Merge tag 'v3.11' into for_next
Update Xtensa tree to Linux 3.11 (merging)
Diffstat (limited to 'arch/arc/lib/strchr-700.S')
-rw-r--r--arch/arc/lib/strchr-700.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arc/lib/strchr-700.S b/arch/arc/lib/strchr-700.S
index 99c10475d477..9c548c7cf001 100644
--- a/arch/arc/lib/strchr-700.S
+++ b/arch/arc/lib/strchr-700.S
@@ -39,9 +39,18 @@ ARC_ENTRY strchr
ld.a r2,[r0,4]
sub r12,r6,r7
bic r12,r12,r6
+#ifdef __LITTLE_ENDIAN__
and r7,r12,r4
breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
b .Lfound_char ; Likewise this one.
+#else
+ and r12,r12,r4
+ breq r12,0,.Loop ; For speed, we want this branch to be unaligned.
+ lsr_s r12,r12,7
+ bic r2,r7,r6
+ b.d .Lfound_char_b
+ and_s r2,r2,r12
+#endif
; /* We require this code address to be unaligned for speed... */
.Laligned:
ld_s r2,[r0]
@@ -95,6 +104,7 @@ ARC_ENTRY strchr
lsr r7,r7,7
bic r2,r7,r6
+.Lfound_char_b:
norm r2,r2
sub_s r0,r0,4
asr_s r2,r2,3