Author: tkreuzer
Date: Sun Sep 28 16:50:05 2008
New Revision: 36585
URL:
http://svn.reactos.org/svn/reactos?rev=36585&view=rev
Log:
Improve memcpy. It was working correctly, but it wasted a cycle. ;-)
Modified:
trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s
Modified: trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mem/i386/memcp…
==============================================================================
--- trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s [iso-8859-1] Sun Sep 28 16:50:05 2008
@@ -23,13 +23,12 @@
/*
* Make the destination dword aligned
*/
- mov %edi,%ecx
- and $3,%ecx
- sub $5,%ecx
- not %ecx
- sub %ecx,%edx
- rep movsb
- mov %edx,%ecx
+ mov %edi,%ecx
+ neg %ecx
+ and $3,%ecx
+ sub %ecx,%edx
+ rep movsb
+ mov %edx,%ecx
.L2:
shr $2,%ecx
rep movsl