diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-15 02:24:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-15 02:24:12 +0000 |
commit | 6b7310e27000e95b8e6d178202b2156f6f705cab (patch) | |
tree | 01de9321618823c959ef28ede522f69514cb10b3 | |
parent | f4f730e40c2a0ecbbf356f3939bb2c363a8f464a (diff) |
bcopy & friends move to m68k tree
-rw-r--r-- | sys/arch/mvme68k/mvme68k/locore.s | 70 |
1 files changed, 1 insertions, 69 deletions
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s index a3a64859e3c..44cd591ea91 100644 --- a/sys/arch/mvme68k/mvme68k/locore.s +++ b/sys/arch/mvme68k/mvme68k/locore.s @@ -1,4 +1,4 @@ -/* $Id: locore.s,v 1.4 1995/11/07 08:50:19 deraadt Exp $ */ +/* $Id: locore.s,v 1.5 1995/12/15 02:24:11 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -1813,74 +1813,6 @@ ENTRY(_remque) movw d0,sr rts -/* - * {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 - 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. |