Improve memcpy. It was working correctly, but it wasted a cycle. ;-)

svn path=/trunk/; revision=36585
This commit is contained in:
Timo Kreuzer 2008-09-28 21:50:05 +00:00
parent 36a547b4a7
commit 76bf74c7f7

View file

@ -23,13 +23,12 @@ _memcpy:
/* /*
* Make the destination dword aligned * Make the destination dword aligned
*/ */
mov %edi,%ecx mov %edi,%ecx
and $3,%ecx neg %ecx
sub $5,%ecx and $3,%ecx
not %ecx sub %ecx,%edx
sub %ecx,%edx rep movsb
rep movsb mov %edx,%ecx
mov %edx,%ecx
.L2: .L2:
shr $2,%ecx shr $2,%ecx
rep movsl rep movsl