[PATCH -mm] i386 usercopy.c opcode reordering (pipelining)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>


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"					\
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux