2 * linux/arch/arm/lib/memcpy.S
4 * Copyright (C) 1995-1999 Russell King
6 * ASM optimised string functions
8 #include <linux/linkage.h>
9 #include <asm/assembler.h>
10 #include "constants.h"
16 stmfd sp!,{r4-r9,fp,ip,lr,pc} ;\
20 LOADREGS(ea, fp, {r4 - r9, fp, sp, pc})
23 LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc})
26 * Prototype: void memcpy(void *to,const void *from,unsigned long n);
27 * ARM3: cant use memcopy here!!!
45 2: ldmia r1!,{r3 - r9, ip}
46 stmia r0!,{r3 - r9, ip}
50 ldmgeia r1!, {r3 - r6}
51 stmgeia r0!, {r3 - r6}
54 4: ldmgeia r1!, {r3 - r5}
55 stmgeia r0!, {r3 - r5}
101 orr r3, r3, r4, lsl #24
103 orr r4, r4, r5, lsl #24
105 orr r5, r5, r6, lsl #24
107 orr r6, r6, r7, lsl #24
113 10: mov r3, r7, lsr #8
116 orr r3, r3, r7, lsl #24
125 12: mov r3, r7, lsr #16
127 orr r3, r3, r4, lsl #16
129 orr r4, r4, r5, lsl #16
131 orr r5, r5, r6, lsl #16
133 orr r6, r6, r7,LSL#16
139 13: mov r3, r7, lsr #16
142 orr r3, r3, r7, lsl #16
151 16: mov r3, r7, lsr #24
153 orr r3, r3, r4, lsl #8
155 orr r4, r4, r5, lsl #8
157 orr r5, r5, r6, lsl #8
159 orr r6, r6, r7, lsl #8
165 17: mov r3, r7, lsr #24
168 orr r3, r3, r7, lsl#8
188 21: ldmdb r1!, {r3 - r9, ip}
189 stmdb r0!, {r3 - r9, ip}
193 ldmgedb r1!, {r3 - r6}
194 stmgedb r0!, {r3 - r6}
197 ldmgedb r1!, {r3 - r5}
198 stmgedb r0!, {r3 - r5}
204 ldmgedb r1!, {r4, r5}
206 stmgedb r0!, {r4, r5}
213 ldrgeb r4, [r1, #-1]!
214 ldrgtb r5, [r1, #-1]!
216 strgeb r4, [r0, #-1]!
217 strgtb r5, [r0, #-1]!
222 ldrgeb r4, [r1, #-1]!
223 ldrgtb r5, [r1, #-1]!
225 strgeb r4, [r0, #-1]!
226 strgtb r5, [r0, #-1]!
240 27: mov r7, r3, lsl #8
241 ldmdb r1!, {r3, r4, r5, r6}
242 orr r7, r7, r6, lsr #24
244 orr r6, r6, r5, lsr #24
246 orr r5, r5, r4, lsr #24
248 orr r4, r4, r3, lsr #24
249 stmdb r0!, {r4, r5, r6, r7}
254 28: mov ip, r3, lsl #8
257 orr ip, ip, r3, lsr #24
266 31: mov r7, r3, lsl #16
267 ldmdb r1!, {r3, r4, r5, r6}
268 orr r7, r7, r6, lsr #16
270 orr r6, r6, r5, lsr #16
272 orr r5, r5, r4, lsr #16
274 orr r4, r4, r3, lsr #16
275 stmdb r0!, {r4, r5, r6, r7}
280 32: mov ip, r3, lsl #16
283 orr ip, ip, r3, lsr #16
292 35: mov r7, r3, lsl #24
293 ldmdb r1!, {r3, r4, r5, r6}
294 orr r7, r7, r6, lsr #8
296 orr r6, r6, r5, lsr #8
298 orr r5, r5, r4, lsr #8
300 orr r4, r4, r3, lsr #8
301 stmdb r0!, {r4, r5, r6, r7}
306 36: mov ip, r3, lsl #24
309 orr ip, ip, r3, lsr #8