Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/i386/string Get rid of pointer wraparound chec...
details: https://anonhg.NetBSD.org/src/rev/0ca8b68c71dc
branches: trunk
changeset: 538751:0ca8b68c71dc
user: junyoung <junyoung%NetBSD.org@localhost>
date: Tue Oct 29 06:35:17 2002 +0000
description:
Get rid of pointer wraparound check. Ok'ed by TAMURA Kent.
diffstat:
lib/libc/arch/i386/string/bcopy.S | 55 +--------------------------------------
1 files changed, 1 insertions(+), 54 deletions(-)
diffs (76 lines):
diff -r 0cfcf2d4d06f -r 0ca8b68c71dc lib/libc/arch/i386/string/bcopy.S
--- a/lib/libc/arch/i386/string/bcopy.S Tue Oct 29 06:19:37 2002 +0000
+++ b/lib/libc/arch/i386/string/bcopy.S Tue Oct 29 06:35:17 2002 +0000
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: bcopy.S,v 1.8 2002/07/10 06:01:51 kent Exp $")
+ RCSID("$NetBSD: bcopy.S,v 1.9 2002/10/29 06:35:17 junyoung Exp $")
#endif
/*
@@ -83,42 +83,6 @@
1:
addl %ecx,%edi /* copy backwards. */
addl %ecx,%esi
-
-#ifdef _DIAGNOSTIC
- /* check pointer wraparound */
-#if defined(MEMCOPY) || defined(MEMMOVE)
- cmpl 12(%esp),%edi
-#else
- cmpl 16(%esp),%edi
-#endif
- jae 2f
- pushl $diagmes1
- pushl $func
- pushl $__LINE__-4
- jmp 4f
-2:
-#if defined(MEMCOPY) || defined(MEMMOVE)
- cmpl 16(%esp),%esi
-#else
- cmpl 12(%esp),%esi
-#endif
- jae 3f
- pushl $diagmes2
- pushl $func
- pushl $__LINE__-4
-4:
- pushl $file
- call _C_LABEL(__diagassert13)
- addl $16,%esp
-#if defined(MEMCOPY) || defined(MEMMOVE)
- movl 12(%esp),%eax
-#endif
- popl %edi
- popl %esi
- ret
-3:
-#endif /* _DIAGNOSTIC */
-
std
andl $3,%ecx /* any fractional bytes? */
decl %edi
@@ -135,20 +99,3 @@
popl %esi
cld
ret
-
-#ifdef _DIAGNOSTIC
-file:
- .asciz __FILE__
-func:
-#if defined(MEMCOPY)
- .asciz "memcpy"
-#elseif defined(MEMMOVE)
- .asciz "memmove"
-#else
- .asciz "bcopy"
-#endif
-diagmes1:
- .asciz "src + length > src"
-diagmes2:
- .asciz "dst + length > dst"
-#endif /* _DIAGNOSTIC */
Home |
Main Index |
Thread Index |
Old Index