diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-15 01:57:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-15 01:57:49 +0000 |
commit | 5a394823e3d81a2d5ff6c5dd516488dc487e55eb (patch) | |
tree | dd47eb2d3696bbec2522da73a8665a637e2518a3 /sys/arch/amiga | |
parent | 786f174b696afa9be2d5af7097b27099e9055f7c (diff) |
from netbsd; bcopy moves to m68k tree
Diffstat (limited to 'sys/arch/amiga')
-rw-r--r-- | sys/arch/amiga/amiga/locore.s | 77 |
1 files changed, 1 insertions, 76 deletions
diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s index 606d55ba69a..f71544423c9 100644 --- a/sys/arch/amiga/amiga/locore.s +++ b/sys/arch/amiga/amiga/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.46.2.1 1995/11/24 07:51:10 chopps Exp $ */ +/* $NetBSD: locore.s,v 1.48 1995/12/11 02:37:59 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1707,81 +1707,6 @@ ENTRY(_remque) movw d0,sr rts -ENTRY(memcpy) - movl sp@(12),d0 | get count - jeq Lcpyexit | if zero, return - movl sp@(8), a0 | src address - movl sp@(4), a1 | dest address - jra Ldocopy | jump into bcopy -/* - * {ov}bcopy(from, to, len) - * - * Works for counts up to 128K. - */ -ALTENTRY(ovbcopy, _bcopy) -ENTRY(bcopy) - movl sp@(12),d0 | get count - jeq Lcpyexit | if zero, return - movl sp@(4),a0 | src address - movl sp@(8),a1 | dest address -Ldocopy: - cmpl a1,a0 | src before dest? - jlt Lcpyback | yes, copy backwards (avoids overlap) - movl a0,d1 - btst #0,d1 | src address odd? - jeq Lcfeven | no, go check dest - movb a0@+,a1@+ | yes, copy a byte - subql #1,d0 | update count - jeq Lcpyexit | exit if done -Lcfeven: - movl a1,d1 - btst #0,d1 | dest address odd? - jne Lcfbyte | yes, must copy by bytes - movl d0,d1 | no, get count - lsrl #2,d1 | convert to longwords - jeq Lcfbyte | no longwords, copy bytes - subql #1,d1 | set up for dbf -Lcflloop: - movl a0@+,a1@+ | copy longwords - dbf d1,Lcflloop | til done - andl #3,d0 | get remaining count - jeq Lcpyexit | done if none -Lcfbyte: - subql #1,d0 | set up for dbf -Lcfbloop: - movb a0@+,a1@+ | copy bytes - dbf d0,Lcfbloop | til done -Lcpyexit: - rts -Lcpyback: - addl d0,a0 | add count to src - addl d0,a1 | add count to dest - movl a0,d1 - btst #0,d1 | src address odd? - jeq Lcbeven | no, go check dest - movb a0@-,a1@- | yes, copy a byte - subql #1,d0 | update count - jeq Lcpyexit | exit if done -Lcbeven: - movl a1,d1 - btst #0,d1 | dest address odd? - jne Lcbbyte | yes, must copy by bytes - movl d0,d1 | no, get count - lsrl #2,d1 | convert to longwords - jeq Lcbbyte | no longwords, copy bytes - subql #1,d1 | set up for dbf -Lcblloop: - movl a0@-,a1@- | copy longwords - dbf d1,Lcblloop | til done - andl #3,d0 | get remaining count - jeq Lcpyexit | done if none -Lcbbyte: - subql #1,d0 | set up for dbf -Lcbbloop: - movb a0@-,a1@- | copy bytes - dbf d0,Lcbbloop | til done - rts - #ifdef FPCOPROC /* * Save and restore 68881 state. |