Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 nuke bcopyw and bcopyb. It is unclear wha...



details:   https://anonhg.NetBSD.org/src/rev/483d230d529b
branches:  trunk
changeset: 509969:483d230d529b
user:      perry <perry%NetBSD.org@localhost>
date:      Wed May 16 05:01:28 2001 +0000

description:
nuke bcopyw and bcopyb. It is unclear what they were for, and nothing
called them.

diffstat:

 sys/arch/i386/i386/locore.s |  87 +--------------------------------------------
 1 files changed, 1 insertions(+), 86 deletions(-)

diffs (101 lines):

diff -r 29ad2a8b3d1b -r 483d230d529b sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Wed May 16 04:50:11 2001 +0000
+++ b/sys/arch/i386/i386/locore.s       Wed May 16 05:01:28 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.237 2001/05/16 04:18:52 perry Exp $       */
+/*     $NetBSD: locore.s,v 1.238 2001/05/16 05:01:28 perry Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -781,91 +781,6 @@
        ret
 
 /*
- * XXX Note: bcopyb doesn't seem to be used *anywhere*. Why does it exist?
- * -- Perry Metzger, May 7, 2001
- */
-/*
- * bcopyb(caddr_t from, caddr_t to, size_t len);
- * Copy len bytes, one byte at a time.
- */
-/* LINTSTUB: Func: void bcopyb(caddr_t from, caddr_t to, size_t len) */
-ENTRY(bcopyb)
-       pushl   %esi
-       pushl   %edi
-       movl    12(%esp),%esi
-       movl    16(%esp),%edi
-       movl    20(%esp),%ecx
-       cmpl    %esi,%edi               # potentially overlapping?
-       jnb     1f
-       cld                             # no; copy forward
-       rep
-       movsb
-       popl    %edi
-       popl    %esi
-       ret
-
-       ALIGN_TEXT
-1:     addl    %ecx,%edi               # copy backward
-       addl    %ecx,%esi
-       std
-       decl    %edi
-       decl    %esi
-       rep
-       movsb
-       popl    %edi
-       popl    %esi
-       cld
-       ret
-
-/*
- * XXX Note: bcopyw doesn't seem to be used *anywhere*. Why does it exist?
- * -- Perry Metzger, May 7, 2001
- */
-/*
- * bcopyw(caddr_t from, caddr_t to, size_t len);
- * Copy len bytes, two bytes at a time.
- */
-/* LINTSTUB: Func: void bcopyw(caddr_t from, caddr_t to, size_t len) */
-ENTRY(bcopyw)
-       pushl   %esi
-       pushl   %edi
-       movl    12(%esp),%esi
-       movl    16(%esp),%edi
-       movl    20(%esp),%ecx
-       cmpl    %esi,%edi               # potentially overlapping?
-       jnb     1f
-       cld                             # no; copy forward
-       shrl    $1,%ecx                 # copy by 16-bit words
-       rep
-       movsw
-       adc     %ecx,%ecx               # any bytes left?
-       rep
-       movsb
-       popl    %edi
-       popl    %esi
-       ret
-
-       ALIGN_TEXT
-1:     addl    %ecx,%edi               # copy backward
-       addl    %ecx,%esi
-       std
-       andl    $1,%ecx                 # any fractional bytes?
-       decl    %edi
-       decl    %esi
-       rep
-       movsb
-       movl    20(%esp),%ecx           # copy remainder by 16-bit words
-       shrl    $1,%ecx
-       decl    %esi
-       decl    %edi
-       rep
-       movsw
-       popl    %edi
-       popl    %esi
-       cld
-       ret
-
-/*
  * XXX Note: bcopy was obsoleted some time ago in favor of the mem* functions.
  * It seems to only be legitimately called *inside* locore.s given that
  * systm.h defines it to memcpy. Perhaps something should be cleaned up here?



Home | Main Index | Thread Index | Old Index