1/* 2** Copyright 2001, Travis Geiselbrecht. All rights reserved. 3** Distributed under the terms of the NewOS License. 4*/ 5 6#include <asm_defs.h> 7 8#warning M68K: optimize memcpy 9#if 1 10 11/* that should be enough for now */ 12 13.align 4 14FUNCTION(memcpy): 15/* void *memcpy(void *dest, const void *src, size_t count) */ 16 move.l (4,%a7),%a1 17 move.l (8,%a7),%a0 18 move.l (12,%a7),%d0 19_memcpy_loop: 20 addi.l #-1,%d0 21 blt _memcpy_out 22 move.b (%a0)+,(%a1)+ 23 bra _memcpy_loop 24_memcpy_out: 25 move.l (4,%a7),%a0 26 move.l %a0,%d0 27 rts 28FUNCTION_END(memcpy) 29#endif 30