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/config.h>
18 #include <linux/linkage.h>
19 #include <asm/assembler.h>
21 #ifdef CONFIG_ISA_DUAL_ISSUE
26 mv r4, r0 || mv r7, r0
28 jc r14 || cmpeq r0, r1 ; return if r2=0
29 jc r14 ; return if r0=r1
38 ld r7, @r1+ || addi r3, #-1
39 st r7, @+r4 || cmpz r2
41 addi r4, #4 || jc r14 ; return if r2=0
42 #if defined(CONFIG_ISA_M32R2)
44 ldb r7, @r1 || addi r1, #1
45 addi r2, #-1 || stb r7, @r4+
47 #elif defined(CONFIG_ISA_M32R)
49 ldb r7, @r1 || addi r1, #1
50 addi r2, #-1 || stb r7, @r4
54 #error unknown isa configuration
59 #else /* not CONFIG_ISA_DUAL_ISSUE */
67 beq r0, r1, end_memcopy
93 #endif /* not CONFIG_ISA_DUAL_ISSUE */