diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-05-01 00:43:42 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-05-01 00:43:42 +0000 |
commit | fd78b0866fe95728b378cffba4f2f189c32a5ad0 (patch) | |
tree | 766cacac3de84c9f9ee8e1909c578360fa3a95ae /sys | |
parent | d2214a150b4edf8fc5705a966e37e42d7c3c959a (diff) |
cleaner and righter memcmp/memcpy
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index d02dfe137aa..5600f8c33c3 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.49 2000/04/30 18:48:58 millert Exp $ */ +/* $OpenBSD: locore.s,v 1.50 2000/05/01 00:43:41 mickey Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -895,27 +895,19 @@ ENTRY(bcopy) * Emulate memcpy() by swapping the first two arguments and calling bcopy() */ ENTRY(memcpy) - pushl %esi - movl 12(%esp),%ecx - movl 16(%esp),%esi - movl %esi,12(%esp) - movl %ecx,16(%esp) - call _bcopy - popl %esi - ret + movl 4(%esp),%ecx + xchg 8(%esp),%ecx + movl %ecx,4(%esp) + jmp _bcopy /* * Emulate memcmp() by swapping the first two arguments and calling bcmp() */ ENTRY(memcmp) - pushl %esi - movl 12(%esp),%ecx - movl 16(%esp),%esi - movl %esi,12(%esp) - movl %ecx,16(%esp) - call _bcmp - popl %esi - ret + movl 4(%esp),%ecx + xchg 8(%esp),%ecx + movl %ecx,4(%esp) + jmp _bcmp /*****************************************************************************/ |