memcpy(3) no longer deals with overlap case; it's now forward-only.

This commit is contained in:
junyoung 2002-10-29 06:53:18 +00:00
parent 4fcc3e8569
commit 333f362341
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: bcopy.S,v 1.9 2002/10/29 06:35:17 junyoung Exp $")
RCSID("$NetBSD: bcopy.S,v 1.10 2002/10/29 06:53:18 junyoung Exp $")
#endif
/*
@ -64,9 +64,11 @@ ENTRY(bcopy)
movl 16(%esp),%edi
#endif
movl 20(%esp),%ecx
#if !defined(MEMCOPY)
movl %edi,%edx
subl %esi,%edx
cmpl %ecx,%edx /* overlapping? */
#endif
movl %ecx,%edx
jb 1f
cld /* nope, copy forwards. */