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);
17 #include <linux/linkage.h>
18 #include <asm/assembler.h>
20 #ifdef CONFIG_ISA_DUAL_ISSUE
25 mv r4, r0 || mv r7, r0
27 jc r14 || cmpeq r0, r1 ; return if r2=0
28 jc r14 ; return if r0=r1
37 ld r7, @r1+ || addi r3, #-1
38 st r7, @+r4 || cmpz r2
40 addi r4, #4 || jc r14 ; return if r2=0
41 #if defined(CONFIG_ISA_M32R2)
43 ldb r7, @r1 || addi r1, #1
44 addi r2, #-1 || stb r7, @r4+
46 #elif defined(CONFIG_ISA_M32R)
48 ldb r7, @r1 || addi r1, #1
49 addi r2, #-1 || stb r7, @r4
53 #error unknown isa configuration
58 #else /* not CONFIG_ISA_DUAL_ISSUE */
66 beq r0, r1, end_memcopy
92 #endif /* not CONFIG_ISA_DUAL_ISSUE */