From 333f362341f1cb90553fe1fa808ea56ccde6ecf5 Mon Sep 17 00:00:00 2001 From: junyoung Date: Tue, 29 Oct 2002 06:53:18 +0000 Subject: [PATCH] memcpy(3) no longer deals with overlap case; it's now forward-only. --- lib/libc/arch/i386/string/bcopy.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libc/arch/i386/string/bcopy.S b/lib/libc/arch/i386/string/bcopy.S index 9744a1c915a4..691316411ead 100644 --- a/lib/libc/arch/i386/string/bcopy.S +++ b/lib/libc/arch/i386/string/bcopy.S @@ -36,7 +36,7 @@ #include #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. */