From f20d6e7ce36d04dbaa5eb7d83bc9e2a134232d34 Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 15 Dec 1995 02:24:11 +0000 Subject: [PATCH] bcopy & friends move to m68k tree --- sys/arch/mvme68k/mvme68k/locore.s | 70 +------------------------------ 1 file changed, 1 insertion(+), 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. -- 2.20.1