Skip to content

Commit e5674ad

Browse files
tung7970ralfbaechle
authored andcommitted
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>
1 parent 515b029 commit e5674ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/mips/lib/memset.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,16 @@ FEXPORT(__bzero)
161161

162162
.Lfwd_fixup:
163163
PTR_L t0, TI_TASK($28)
164-
LONG_L t0, THREAD_BUADDR(t0)
165164
andi a2, 0x3f
165+
LONG_L t0, THREAD_BUADDR(t0)
166166
LONG_ADDU a2, t1
167167
jr ra
168168
LONG_SUBU a2, t0
169169

170170
.Lpartial_fixup:
171171
PTR_L t0, TI_TASK($28)
172-
LONG_L t0, THREAD_BUADDR(t0)
173172
andi a2, LONGMASK
173+
LONG_L t0, THREAD_BUADDR(t0)
174174
LONG_ADDU a2, t1
175175
jr ra
176176
LONG_SUBU a2, t0

0 commit comments

Comments
 (0)