From 76bf74c7f773e2bad0b735b3b831c99878e104ab Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 28 Sep 2008 21:50:05 +0000 Subject: [PATCH] Improve memcpy. It was working correctly, but it wasted a cycle. ;-) svn path=/trunk/; revision=36585 --- reactos/lib/sdk/crt/mem/i386/memcpy_asm.s | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s b/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s index 370d9d89eb6..c29bf6219e9 100644 --- a/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s +++ b/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s @@ -23,13 +23,12 @@ _memcpy: /* * 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