diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 78ff759f110..d02dfe137aa 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.48 1999/03/08 23:47:26 downsj Exp $ */ +/* $OpenBSD: locore.s,v 1.49 2000/04/30 18:48:58 millert Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -891,6 +891,32 @@ ENTRY(bcopy) cld ret +/* + * 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 + +/* + * 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 + /*****************************************************************************/ /* |