2 Copyright © 2017, The AROS Development Team. All rights reserved.
5 Desc: Optimized 020+ CopyMem by Matt Hey
9 #include "aros/m68k/asm.h"
14 .globl AROS_SLIB_ENTRY(CopyMem_020,Exec,104)
15 .type AROS_SLIB_ENTRY(CopyMem_020,Exec,104),@function
16 AROS_SLIB_ENTRY(CopyMem_020,Exec,104):
18 subq.l #4,%d0 // size is 4 less than actual!
19 bls.b smallcopy // if size<=4 bytes
26 daligned2: // dest should be WORD aligned now
31 bcs.b last2 // if size<0
32 daligned4: // dest should be LONG aligned now
33 cmp.l #256-4,%d0 // min size for move16, less than 252 is dangerous!
38 bhi.b move4loop // if size>0
48 sub.l %d1,%d0 // size is now 128 less than actual
49 addq.l #4,%d1 // d1=128=bytes to move per loop
83 sub.l %d1,%d0 // d0=d0-128
84 bcc.b bigmove4 // if d0>=0
85 add.l %d1,%d0 // d0=d0+128, back to positive