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