2 * linux/arch/arm26/lib/memcpy.S
4 * Copyright (C) 1995-1999 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * ASM optimised string functions
12 #include <linux/linkage.h>
13 #include <asm/assembler.h>
19 stmfd sp!,{r4-r9,fp,ip,lr,pc} ;\
23 LOADREGS(ea, fp, {r4 - r9, fp, sp, pc})
26 LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc})
29 * Prototype: void memcpy(void *to,const void *from,unsigned long n);
30 * ARM3: cant use memcopy here!!!
48 2: ldmia r1!,{r3 - r9, ip}
49 stmia r0!,{r3 - r9, ip}
53 ldmgeia r1!, {r3 - r6}
54 stmgeia r0!, {r3 - r6}
57 4: ldmgeia r1!, {r3 - r5}
58 stmgeia r0!, {r3 - r5}
102 9: mov r3, r7, pull #8
104 orr r3, r3, r4, push #24
106 orr r4, r4, r5, push #24
108 orr r5, r5, r6, push #24
110 orr r6, r6, r7, push #24
116 10: mov r3, r7, pull #8
119 orr r3, r3, r7, push #24
128 12: mov r3, r7, pull #16
130 orr r3, r3, r4, push #16
132 orr r4, r4, r5, push #16
134 orr r5, r5, r6, push #16
136 orr r6, r6, r7, push #16
142 13: mov r3, r7, pull #16
145 orr r3, r3, r7, push #16
154 16: mov r3, r7, pull #24
156 orr r3, r3, r4, push #8
158 orr r4, r4, r5, push #8
160 orr r5, r5, r6, push #8
162 orr r6, r6, r7, push #8
168 17: mov r3, r7, pull #24
171 orr r3, r3, r7, push #8
191 21: ldmdb r1!, {r3 - r9, ip}
192 stmdb r0!, {r3 - r9, ip}
196 ldmgedb r1!, {r3 - r6}
197 stmgedb r0!, {r3 - r6}
200 ldmgedb r1!, {r3 - r5}
201 stmgedb r0!, {r3 - r5}
207 ldmgedb r1!, {r4, r5}
209 stmgedb r0!, {r4, r5}
216 ldrgeb r4, [r1, #-1]!
217 ldrgtb r5, [r1, #-1]!
219 strgeb r4, [r0, #-1]!
220 strgtb r5, [r0, #-1]!
225 ldrgeb r4, [r1, #-1]!
226 ldrgtb r5, [r1, #-1]!
228 strgeb r4, [r0, #-1]!
229 strgtb r5, [r0, #-1]!
243 27: mov r7, r3, push #8
244 ldmdb r1!, {r3, r4, r5, r6}
245 orr r7, r7, r6, pull #24
247 orr r6, r6, r5, pull #24
249 orr r5, r5, r4, pull #24
251 orr r4, r4, r3, pull #24
252 stmdb r0!, {r4, r5, r6, r7}
257 28: mov ip, r3, push #8
260 orr ip, ip, r3, pull #24
269 31: mov r7, r3, push #16
270 ldmdb r1!, {r3, r4, r5, r6}
271 orr r7, r7, r6, pull #16
273 orr r6, r6, r5, pull #16
275 orr r5, r5, r4, pull #16
277 orr r4, r4, r3, pull #16
278 stmdb r0!, {r4, r5, r6, r7}
283 32: mov ip, r3, push #16
286 orr ip, ip, r3, pull #16
295 35: mov r7, r3, push #24
296 ldmdb r1!, {r3, r4, r5, r6}
297 orr r7, r7, r6, pull #8
299 orr r6, r6, r5, pull #8
301 orr r5, r5, r4, pull #8
303 orr r4, r4, r3, pull #8
304 stmdb r0!, {r4, r5, r6, r7}
309 36: mov ip, r3, push #24
312 orr ip, ip, r3, pull #8