+ i386-memcpy-minor-optimization.patch added to -mm tree

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

 



The patch titled

     i386 memcpy: minor optimization

has been added to the -mm tree.  Its filename is

     i386-memcpy-minor-optimization.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: i386 memcpy: minor optimization
From: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx>


Skip an additional instruction if memcpy size is divisible by four.

Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/asm-i386/string.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff -puN include/asm-i386/string.h~i386-memcpy-minor-optimization include/asm-i386/string.h
--- devel/include/asm-i386/string.h~i386-memcpy-minor-optimization	2006-05-30 18:15:33.000000000 -0700
+++ devel-akpm/include/asm-i386/string.h	2006-05-30 18:15:44.000000000 -0700
@@ -202,20 +202,20 @@ return __res;
 
 static __always_inline void * __memcpy(void * to, const void * from, size_t n)
 {
-int d0, d1, d2;
+int d0, d1, d2, d3;
 __asm__ __volatile__(
 	"rep ; movsl\n\t"
-	"movl %4,%%ecx\n\t"
-	"andl $3,%%ecx\n\t"
-#if 1	/* want to pay 2 byte penalty for a chance to skip microcoded rep? */
+	"andl $3,%3\n\t"
+#if 1	/* want to pay 2 byte penalty for a chance to skip a mov and a microcoded rep? */
 	"jz 1f\n\t"
 #endif
+	"movl %3,%%ecx\n\t"
 	"rep ; movsb\n\t"
 	"1:"
-	: "=&c" (d0), "=&D" (d1), "=&S" (d2)
-	: "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from)
+	: "=&c" (d0), "=&D" (d1), "=&S" (d2), "=&g" (d3)
+	: "0" (n/4), "1" ((long) to), "2" ((long) from), "3" (n)
 	: "memory");
-return (to);
+return to;
 }
 
 /*
_

Patches currently in -mm which might be from 76306.1226@xxxxxxxxxxxxxx are

i386-let-usermode-execute-the-enter.patch
i386-fix-get_segment_eip-with-vm86.patch
i386-memcpy-use-as-few-moves-as.patch
i386-memcpy-minor-optimization.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux