diff options
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/lib/strchr-700.S | 10 |
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 | |||
39 | ld.a r2,[r0,4] | 39 | ld.a r2,[r0,4] |
40 | sub r12,r6,r7 | 40 | sub r12,r6,r7 |
41 | bic r12,r12,r6 | 41 | bic r12,r12,r6 |
42 | #ifdef __LITTLE_ENDIAN__ | ||
42 | and r7,r12,r4 | 43 | and r7,r12,r4 |
43 | breq r7,0,.Loop ; For speed, we want this branch to be unaligned. | 44 | breq r7,0,.Loop ; For speed, we want this branch to be unaligned. |
44 | b .Lfound_char ; Likewise this one. | 45 | b .Lfound_char ; Likewise this one. |
46 | #else | ||
47 | and r12,r12,r4 | ||
48 | breq r12,0,.Loop ; For speed, we want this branch to be unaligned. | ||
49 | lsr_s r12,r12,7 | ||
50 | bic r2,r7,r6 | ||
51 | b.d .Lfound_char_b | ||
52 | and_s r2,r2,r12 | ||
53 | #endif | ||
45 | ; /* We require this code address to be unaligned for speed... */ | 54 | ; /* We require this code address to be unaligned for speed... */ |
46 | .Laligned: | 55 | .Laligned: |
47 | ld_s r2,[r0] | 56 | ld_s r2,[r0] |
@@ -95,6 +104,7 @@ ARC_ENTRY strchr | |||
95 | lsr r7,r7,7 | 104 | lsr r7,r7,7 |
96 | 105 | ||
97 | bic r2,r7,r6 | 106 | bic r2,r7,r6 |
107 | .Lfound_char_b: | ||
98 | norm r2,r2 | 108 | norm r2,r2 |
99 | sub_s r0,r0,4 | 109 | sub_s r0,r0,4 |
100 | asr_s r2,r2,3 | 110 | asr_s r2,r2,3 |