2 * linux/arch/m32r/lib/memcpy.S
4 * Copyright (C) 2001 Hiroyuki Kondo, and Hirokazu Takata
5 * Copyright (C) 2004 Hirokazu Takata
7 * void *memcopy(void *dst, const void *src, int n);
15 #include <linux/linkage.h>
16 #include <asm/assembler.h>
18 #ifdef CONFIG_ISA_DUAL_ISSUE
23 mv r4, r0 || mv r7, r0
25 jc r14 || cmpeq r0, r1 ; return if r2=0
26 jc r14 ; return if r0=r1
35 ld r7, @r1+ || addi r3, #-1
36 st r7, @+r4 || cmpz r2
38 addi r4, #4 || jc r14 ; return if r2=0
39 #if defined(CONFIG_ISA_M32R2)
41 ldb r7, @r1 || addi r1, #1
42 addi r2, #-1 || stb r7, @r4+
44 #elif defined(CONFIG_ISA_M32R)
46 ldb r7, @r1 || addi r1, #1
47 addi r2, #-1 || stb r7, @r4
51 #error unknown isa configuration
56 #else /* not CONFIG_ISA_DUAL_ISSUE */
64 beq r0, r1, end_memcopy
90 #endif /* not CONFIG_ISA_DUAL_ISSUE */