diff options
author | Tony Wu <tung7970@gmail.com> | 2010-11-10 08:48:15 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-12-16 13:10:57 -0500 |
commit | e5674ad6ca9f1020c2bcc009a55becba3c30d8a3 (patch) | |
tree | 05d9d2854ca16e6d4b2f87ddffd17926aa21e9bd /arch/mips | |
parent | 515b029d005b5694cf612a0a5ca6f861a7e45362 (diff) |
MIPS: Separate two consecutive loads in memset.S
partial_fixup is used in noreorder block.
Separating two consecutive loads can save one cycle on processors with
GPR intrelock and can fix load-use on processors that need a load delay slot.
Also do so for fwd_fixup.
[Ralf: Only R2000/R3000 class processors are lacking the the load-user
interlock and even some of those got it retrofitted. With R2000/R3000
being fairly uncommon these days the impact of this bug should be minor.]
Signed-off-by: Tony Wu <tung7970@gmail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1768/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/lib/memset.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S index 77dc3b20110a..606c8a9efe3b 100644 --- a/arch/mips/lib/memset.S +++ b/arch/mips/lib/memset.S | |||
@@ -161,16 +161,16 @@ FEXPORT(__bzero) | |||
161 | 161 | ||
162 | .Lfwd_fixup: | 162 | .Lfwd_fixup: |
163 | PTR_L t0, TI_TASK($28) | 163 | PTR_L t0, TI_TASK($28) |
164 | LONG_L t0, THREAD_BUADDR(t0) | ||
165 | andi a2, 0x3f | 164 | andi a2, 0x3f |
165 | LONG_L t0, THREAD_BUADDR(t0) | ||
166 | LONG_ADDU a2, t1 | 166 | LONG_ADDU a2, t1 |
167 | jr ra | 167 | jr ra |
168 | LONG_SUBU a2, t0 | 168 | LONG_SUBU a2, t0 |
169 | 169 | ||
170 | .Lpartial_fixup: | 170 | .Lpartial_fixup: |
171 | PTR_L t0, TI_TASK($28) | 171 | PTR_L t0, TI_TASK($28) |
172 | LONG_L t0, THREAD_BUADDR(t0) | ||
173 | andi a2, LONGMASK | 172 | andi a2, LONGMASK |
173 | LONG_L t0, THREAD_BUADDR(t0) | ||
174 | LONG_ADDU a2, t1 | 174 | LONG_ADDU a2, t1 |
175 | jr ra | 175 | jr ra |
176 | LONG_SUBU a2, t0 | 176 | LONG_SUBU a2, t0 |