* [PATCH -mm] i386 usercopy.c opcode reordering (pipelining)
@ 2006-06-13 19:55 Andreas Mohr
2006-06-13 20:10 ` Arjan van de Ven
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Mohr @ 2006-06-13 19:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andi Kleen, Arjan van de Ven, linux-kernel
Hi all,
this one wrote to register %0 and immediately right-shifted it,
so let's andl register %3 first for better parallelism (rrright?).
Signed-off-by: Andreas Mohr <andi@lisas.de>
diff -urN linux-2.6.17-rc6-mm2.orig/arch/i386/lib/usercopy.c linux-2.6.17-rc6-mm2.my/arch/i386/lib/usercopy.c
--- linux-2.6.17-rc6-mm2.orig/arch/i386/lib/usercopy.c 2006-06-13 19:28:09.000000000 +0200
+++ linux-2.6.17-rc6-mm2.my/arch/i386/lib/usercopy.c 2006-06-13 19:38:11.000000000 +0200
@@ -646,8 +646,8 @@
" subl %0,%3\n" \
"4: rep; movsb\n" \
" movl %3,%0\n" \
- " shrl $2,%0\n" \
" andl $3,%3\n" \
+ " shrl $2,%0\n" \
" .align 2,0x90\n" \
"0: rep; movsl\n" \
" movl %3,%0\n" \
@@ -682,8 +682,8 @@
" subl %0,%3\n" \
"4: rep; movsb\n" \
" movl %3,%0\n" \
- " shrl $2,%0\n" \
" andl $3,%3\n" \
+ " shrl $2,%0\n" \
" .align 2,0x90\n" \
"0: rep; movsl\n" \
" movl %3,%0\n" \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-13 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-13 19:55 [PATCH -mm] i386 usercopy.c opcode reordering (pipelining) Andreas Mohr
2006-06-13 20:10 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox