summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch')
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch760
1 files changed, 0 insertions, 760 deletions
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch
deleted file mode 100644
index f50d481aff..0000000000
--- a/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch
+++ /dev/null
@@ -1,760 +0,0 @@
1Upstream-Status: Inappropriate [not used]
2
3--- /dev/null 2004-02-02 20:32:13.000000000 +0000
4+++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
5@@ -0,0 +1,251 @@
6+/*
7+ * Optimized memmove implementation for ARM processors
8+ *
9+ * Author: Nicolas Pitre
10+ * Created: Dec 23, 2003
11+ * Copyright: (C) MontaVista Software, Inc.
12+ *
13+ * This file is free software; you can redistribute it and/or
14+ * modify it under the terms of the GNU Lesser General Public
15+ * License as published by the Free Software Foundation; either
16+ * version 2.1 of the License, or (at your option) any later version.
17+ *
18+ * This file is distributed in the hope that it will be useful,
19+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21+ * Lesser General Public License for more details.
22+ */
23+
24+#include <sysdep.h>
25+
26+
27+/*
28+ * Endian independent macros for shifting bytes within registers.
29+ */
30+#ifndef __ARMEB__
31+#define pull lsr
32+#define push lsl
33+#else
34+#define pull lsl
35+#define push lsr
36+#endif
37+
38+/*
39+ * Enable data preload for architectures that support it (ARMv5 and above)
40+ */
41+#if defined(__ARM_ARCH_5__) || \
42+ defined(__ARM_ARCH_5T__) || \
43+ defined(__ARM_ARCH_5TE__)
44+#define PLD(code...) code
45+#else
46+#define PLD(code...)
47+#endif
48+
49+
50+/* char * memmove (char *dst, const char *src) */
51+ENTRY(memmove)
52+ subs ip, r0, r1
53+ cmphi r2, ip
54+ bls memcpy(PLT)
55+
56+ stmfd sp!, {r0, r4, lr}
57+ add r1, r1, r2
58+ add r0, r0, r2
59+ subs r2, r2, #4
60+ blt 25f
61+ ands ip, r0, #3
62+ PLD( pld [r1, #-4] )
63+ bne 26f
64+ ands ip, r1, #3
65+ bne 27f
66+
67+19: subs r2, r2, #4
68+ blt 24f
69+ subs r2, r2, #8
70+ blt 23f
71+ subs r2, r2, #16
72+ blt 22f
73+
74+ PLD( pld [r1, #-32] )
75+ PLD( subs r2, r2, #96 )
76+ stmfd sp!, {r5 - r8}
77+ PLD( blt 21f )
78+
79+ PLD( @ cache alignment )
80+ PLD( ands ip, r1, #31 )
81+ PLD( pld [r1, #-64] )
82+ PLD( beq 20f )
83+ PLD( cmp r2, ip )
84+ PLD( pld [r1, #-96] )
85+ PLD( blt 20f )
86+ PLD( cmp ip, #16 )
87+ PLD( sub r2, r2, ip )
88+ PLD( ldmgedb r1!, {r3 - r6} )
89+ PLD( stmgedb r0!, {r3 - r6} )
90+ PLD( beq 20f )
91+ PLD( and ip, ip, #15 )
92+ PLD( cmp ip, #8 )
93+ PLD( ldr r3, [r1, #-4]! )
94+ PLD( ldrge r4, [r1, #-4]! )
95+ PLD( ldrgt r5, [r1, #-4]! )
96+ PLD( str r3, [r0, #-4]! )
97+ PLD( strge r4, [r0, #-4]! )
98+ PLD( strgt r5, [r0, #-4]! )
99+
100+20: PLD( pld [r1, #-96] )
101+ PLD( pld [r1, #-128] )
102+21: ldmdb r1!, {r3, r4, ip, lr}
103+ subs r2, r2, #32
104+ stmdb r0!, {r3, r4, ip, lr}
105+ ldmdb r1!, {r3, r4, ip, lr}
106+ stmgedb r0!, {r3, r4, ip, lr}
107+ ldmgedb r1!, {r3, r4, ip, lr}
108+ stmgedb r0!, {r3, r4, ip, lr}
109+ ldmgedb r1!, {r3, r4, ip, lr}
110+ subges r2, r2, #32
111+ stmdb r0!, {r3, r4, ip, lr}
112+ bge 20b
113+ PLD( cmn r2, #96 )
114+ PLD( bge 21b )
115+ PLD( add r2, r2, #96 )
116+ tst r2, #31
117+ ldmfd sp!, {r5 - r8}
118+ ldmeqfd sp!, {r0, r4, pc}
119+
120+ tst r2, #16
121+22: ldmnedb r1!, {r3, r4, ip, lr}
122+ stmnedb r0!, {r3, r4, ip, lr}
123+
124+ tst r2, #8
125+23: ldmnedb r1!, {r3, r4}
126+ stmnedb r0!, {r3, r4}
127+
128+ tst r2, #4
129+24: ldrne r3, [r1, #-4]!
130+ strne r3, [r0, #-4]!
131+
132+25: ands r2, r2, #3
133+ ldmeqfd sp!, {r0, r4, pc}
134+
135+ cmp r2, #2
136+ ldrb r3, [r1, #-1]
137+ ldrgeb r4, [r1, #-2]
138+ ldrgtb ip, [r1, #-3]
139+ strb r3, [r0, #-1]
140+ strgeb r4, [r0, #-2]
141+ strgtb ip, [r0, #-3]
142+ ldmfd sp!, {r0, r4, pc}
143+
144+26: cmp ip, #2
145+ ldrb r3, [r1, #-1]!
146+ ldrgeb r4, [r1, #-1]!
147+ ldrgtb lr, [r1, #-1]!
148+ strb r3, [r0, #-1]!
149+ strgeb r4, [r0, #-1]!
150+ strgtb lr, [r0, #-1]!
151+ subs r2, r2, ip
152+ blt 25b
153+ ands ip, r1, #3
154+ beq 19b
155+
156+27: bic r1, r1, #3
157+ cmp ip, #2
158+ ldr r3, [r1]
159+ beq 35f
160+ blt 36f
161+
162+
163+ .macro backward_copy_shift push pull
164+
165+ cmp r2, #12
166+ PLD( pld [r1, #-4] )
167+ blt 33f
168+ subs r2, r2, #28
169+ stmfd sp!, {r5 - r9}
170+ blt 31f
171+
172+ PLD( subs r2, r2, #96 )
173+ PLD( pld [r1, #-32] )
174+ PLD( blt 30f )
175+ PLD( pld [r1, #-64] )
176+
177+ PLD( @ cache alignment )
178+ PLD( ands ip, r1, #31 )
179+ PLD( pld [r1, #-96] )
180+ PLD( beq 29f )
181+ PLD( cmp r2, ip )
182+ PLD( pld [r1, #-128] )
183+ PLD( blt 29f )
184+ PLD( sub r2, r2, ip )
185+28: PLD( mov r4, r3, push #\push )
186+ PLD( ldr r3, [r1, #-4]! )
187+ PLD( subs ip, ip, #4 )
188+ PLD( orr r4, r4, r3, pull #\pull )
189+ PLD( str r4, [r0, #-4]! )
190+ PLD( bgt 28b )
191+
192+29: PLD( pld [r1, #-128] )
193+30: mov lr, r3, push #\push
194+ ldmdb r1!, {r3 - r9, ip}
195+ subs r2, r2, #32
196+ orr lr, lr, ip, pull #\pull
197+ mov ip, ip, push #\push
198+ orr ip, ip, r9, pull #\pull
199+ mov r9, r9, push #\push
200+ orr r9, r9, r8, pull #\pull
201+ mov r8, r8, push #\push
202+ orr r8, r8, r7, pull #\pull
203+ mov r7, r7, push #\push
204+ orr r7, r7, r6, pull #\pull
205+ mov r6, r6, push #\push
206+ orr r6, r6, r5, pull #\pull
207+ mov r5, r5, push #\push
208+ orr r5, r5, r4, pull #\pull
209+ mov r4, r4, push #\push
210+ orr r4, r4, r3, pull #\pull
211+ stmdb r0!, {r4 - r9, ip, lr}
212+ bge 29b
213+ PLD( cmn r2, #96 )
214+ PLD( bge 30b )
215+ PLD( add r2, r2, #96 )
216+ cmn r2, #16
217+ blt 32f
218+31: mov r7, r3, push #\push
219+ ldmdb r1!, {r3 - r6}
220+ sub r2, r2, #16
221+ orr r7, r7, r6, pull #\pull
222+ mov r6, r6, push #\push
223+ orr r6, r6, r5, pull #\pull
224+ mov r5, r5, push #\push
225+ orr r5, r5, r4, pull #\pull
226+ mov r4, r4, push #\push
227+ orr r4, r4, r3, pull #\pull
228+ stmdb r0!, {r4 - r7}
229+32: adds r2, r2, #28
230+ ldmfd sp!, {r5 - r9}
231+ blt 34f
232+33: mov r4, r3, push #\push
233+ ldr r3, [r1, #-4]!
234+ subs r2, r2, #4
235+ orr r4, r4, r3, pull #\pull
236+ str r4, [r0, #-4]!
237+ bge 33b
238+34:
239+ .endm
240+
241+
242+ backward_copy_shift push=8 pull=24
243+ add r1, r1, #3
244+ b 25b
245+
246+35: backward_copy_shift push=16 pull=16
247+ add r1, r1, #2
248+ b 25b
249+
250+36: backward_copy_shift push=24 pull=8
251+ add r1, r1, #1
252+ b 25b
253+
254+ .size memmove, . - memmove
255+END(memmove)
256+libc_hidden_builtin_def (memmove)
257--- /dev/null 2004-02-02 20:32:13.000000000 +0000
258+++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
259@@ -0,0 +1,255 @@
260+/*
261+ * Optimized memmove implementation for ARM processors
262+ *
263+ * Author: Nicolas Pitre
264+ * Created: Dec 23, 2003
265+ * Copyright: (C) MontaVista Software, Inc.
266+ *
267+ * This file is free software; you can redistribute it and/or
268+ * modify it under the terms of the GNU Lesser General Public
269+ * License as published by the Free Software Foundation; either
270+ * version 2.1 of the License, or (at your option) any later version.
271+ *
272+ * This file is distributed in the hope that it will be useful,
273+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
274+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
275+ * Lesser General Public License for more details.
276+ */
277+
278+#include <sysdep.h>
279+
280+
281+/*
282+ * Endian independent macros for shifting bytes within registers.
283+ */
284+#ifndef __ARMEB__
285+#define pull lsr
286+#define push lsl
287+#else
288+#define pull lsl
289+#define push lsr
290+#endif
291+
292+/*
293+ * Enable data preload for architectures that support it (ARMv5 and above)
294+ */
295+#if defined(__ARM_ARCH_5__) || \
296+ defined(__ARM_ARCH_5T__) || \
297+ defined(__ARM_ARCH_5TE__)
298+#define PLD(code...) code
299+#else
300+#define PLD(code...)
301+#endif
302+
303+dst .req r1
304+src .req r0
305+
306+/* void *bcopy (const char *src, char *dst, size_t size) */
307+ENTRY(bcopy)
308+ subs ip, dst, src
309+ cmphi r2, ip
310+ movls r3, r0
311+ movls r0, r1
312+ movls r1, r3
313+ bls memcpy(PLT)
314+
315+ stmfd sp!, {r4, lr}
316+ add src, src, r2
317+ add dst, dst, r2
318+ subs r2, r2, #4
319+ blt 25f
320+ ands ip, dst, #3
321+ PLD( pld [src, #-4] )
322+ bne 26f
323+ ands ip, src, #3
324+ bne 27f
325+
326+19: subs r2, r2, #4
327+ blt 24f
328+ subs r2, r2, #8
329+ blt 23f
330+ subs r2, r2, #16
331+ blt 22f
332+
333+ PLD( pld [src, #-32] )
334+ PLD( subs r2, r2, #96 )
335+ stmfd sp!, {r5 - r8}
336+ PLD( blt 21f )
337+
338+ PLD( @ cache alignment )
339+ PLD( ands ip, src, #31 )
340+ PLD( pld [src, #-64] )
341+ PLD( beq 20f )
342+ PLD( cmp r2, ip )
343+ PLD( pld [src, #-96] )
344+ PLD( blt 20f )
345+ PLD( cmp ip, #16 )
346+ PLD( sub r2, r2, ip )
347+ PLD( ldmgedb src!, {r3 - r6} )
348+ PLD( stmgedb dst!, {r3 - r6} )
349+ PLD( beq 20f )
350+ PLD( and ip, ip, #15 )
351+ PLD( cmp ip, #8 )
352+ PLD( ldr r3, [src, #-4]! )
353+ PLD( ldrge r4, [src, #-4]! )
354+ PLD( ldrgt r5, [src, #-4]! )
355+ PLD( str r3, [dst, #-4]! )
356+ PLD( strge r4, [dst, #-4]! )
357+ PLD( strgt r5, [dst, #-4]! )
358+
359+20: PLD( pld [src, #-96] )
360+ PLD( pld [src, #-128] )
361+21: ldmdb src!, {r3, r4, ip, lr}
362+ subs r2, r2, #32
363+ stmdb dst!, {r3, r4, ip, lr}
364+ ldmdb src!, {r3, r4, ip, lr}
365+ stmgedb dst!, {r3, r4, ip, lr}
366+ ldmgedb src!, {r3, r4, ip, lr}
367+ stmgedb dst!, {r3, r4, ip, lr}
368+ ldmgedb src!, {r3, r4, ip, lr}
369+ subges r2, r2, #32
370+ stmdb dst!, {r3, r4, ip, lr}
371+ bge 20b
372+ PLD( cmn r2, #96 )
373+ PLD( bge 21b )
374+ PLD( add r2, r2, #96 )
375+ tst r2, #31
376+ ldmfd sp!, {r5 - r8}
377+ ldmeqfd sp!, {r4, pc}
378+
379+ tst r2, #16
380+22: ldmnedb src!, {r3, r4, ip, lr}
381+ stmnedb dst!, {r3, r4, ip, lr}
382+
383+ tst r2, #8
384+23: ldmnedb src!, {r3, r4}
385+ stmnedb dst!, {r3, r4}
386+
387+ tst r2, #4
388+24: ldrne r3, [src, #-4]!
389+ strne r3, [dst, #-4]!
390+
391+25: ands r2, r2, #3
392+ ldmeqfd sp!, {dst, r4, pc}
393+
394+ cmp r2, #2
395+ ldrb r3, [src, #-1]
396+ ldrgeb r4, [src, #-2]
397+ ldrgtb ip, [src, #-3]
398+ strb r3, [dst, #-1]
399+ strgeb r4, [dst, #-2]
400+ strgtb ip, [dst, #-3]
401+ ldmfd sp!, {dst, r4, pc}
402+
403+26: cmp ip, #2
404+ ldrb r3, [src, #-1]!
405+ ldrgeb r4, [src, #-1]!
406+ ldrgtb lr, [src, #-1]!
407+ strb r3, [dst, #-1]!
408+ strgeb r4, [dst, #-1]!
409+ strgtb lr, [dst, #-1]!
410+ subs r2, r2, ip
411+ blt 25b
412+ ands ip, src, #3
413+ beq 19b
414+
415+27: bic src, src, #3
416+ cmp ip, #2
417+ ldr r3, [src]
418+ beq 35f
419+ blt 36f
420+
421+
422+ .macro backward_copy_shift push pull
423+
424+ cmp r2, #12
425+ PLD( pld [src, #-4] )
426+ blt 33f
427+ subs r2, r2, #28
428+ stmfd sp!, {r5 - r9}
429+ blt 31f
430+
431+ PLD( subs r2, r2, #96 )
432+ PLD( pld [src, #-32] )
433+ PLD( blt 30f )
434+ PLD( pld [src, #-64] )
435+
436+ PLD( @ cache alignment )
437+ PLD( ands ip, src, #31 )
438+ PLD( pld [src, #-96] )
439+ PLD( beq 29f )
440+ PLD( cmp r2, ip )
441+ PLD( pld [src, #-128] )
442+ PLD( blt 29f )
443+ PLD( sub r2, r2, ip )
444+28: PLD( mov r4, r3, push #\push )
445+ PLD( ldr r3, [src, #-4]! )
446+ PLD( subs ip, ip, #4 )
447+ PLD( orr r4, r4, r3, pull #\pull )
448+ PLD( str r4, [dst, #-4]! )
449+ PLD( bgt 28b )
450+
451+29: PLD( pld [src, #-128] )
452+30: mov lr, r3, push #\push
453+ ldmdb src!, {r3 - r9, ip}
454+ subs r2, r2, #32
455+ orr lr, lr, ip, pull #\pull
456+ mov ip, ip, push #\push
457+ orr ip, ip, r9, pull #\pull
458+ mov r9, r9, push #\push
459+ orr r9, r9, r8, pull #\pull
460+ mov r8, r8, push #\push
461+ orr r8, r8, r7, pull #\pull
462+ mov r7, r7, push #\push
463+ orr r7, r7, r6, pull #\pull
464+ mov r6, r6, push #\push
465+ orr r6, r6, r5, pull #\pull
466+ mov r5, r5, push #\push
467+ orr r5, r5, r4, pull #\pull
468+ mov r4, r4, push #\push
469+ orr r4, r4, r3, pull #\pull
470+ stmdb dst!, {r4 - r9, ip, lr}
471+ bge 29b
472+ PLD( cmn r2, #96 )
473+ PLD( bge 30b )
474+ PLD( add r2, r2, #96 )
475+ cmn r2, #16
476+ blt 32f
477+31: mov r7, r3, push #\push
478+ ldmdb src!, {r3 - r6}
479+ sub r2, r2, #16
480+ orr r7, r7, r6, pull #\pull
481+ mov r6, r6, push #\push
482+ orr r6, r6, r5, pull #\pull
483+ mov r5, r5, push #\push
484+ orr r5, r5, r4, pull #\pull
485+ mov r4, r4, push #\push
486+ orr r4, r4, r3, pull #\pull
487+ stmdb dst!, {r4 - r7}
488+32: adds r2, r2, #28
489+ ldmfd sp!, {r5 - r9}
490+ blt 34f
491+33: mov r4, r3, push #\push
492+ ldr r3, [src, #-4]!
493+ subs r2, r2, #4
494+ orr r4, r4, r3, pull #\pull
495+ str r4, [dst, #-4]!
496+ bge 33b
497+34:
498+ .endm
499+
500+
501+ backward_copy_shift push=8 pull=24
502+ add src, src, #3
503+ b 25b
504+
505+35: backward_copy_shift push=16 pull=16
506+ add src, src, #2
507+ b 25b
508+
509+36: backward_copy_shift push=24 pull=8
510+ add src, src, #1
511+ b 25b
512+
513+ .size bcopy, . - bcopy
514+END(bcopy)
515
516--- /dev/null 2004-02-02 20:32:13.000000000 +0000
517+++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
518@@ -0,0 +1,242 @@
519+/*
520+ * Optimized memcpy implementation for ARM processors
521+ *
522+ * Author: Nicolas Pitre
523+ * Created: Dec 23, 2003
524+ * Copyright: (C) MontaVista Software, Inc.
525+ *
526+ * This file is free software; you can redistribute it and/or
527+ * modify it under the terms of the GNU Lesser General Public
528+ * License as published by the Free Software Foundation; either
529+ * version 2.1 of the License, or (at your option) any later version.
530+ *
531+ * This file is distributed in the hope that it will be useful,
532+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
533+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
534+ * Lesser General Public License for more details.
535+ */
536+
537+#include <sysdep.h>
538+
539+
540+/*
541+ * Endian independent macros for shifting bytes within registers.
542+ */
543+#ifndef __ARMEB__
544+#define pull lsr
545+#define push lsl
546+#else
547+#define pull lsl
548+#define push lsr
549+#endif
550+
551+/*
552+ * Enable data preload for architectures that support it (ARMv5 and above)
553+ */
554+#if defined(__ARM_ARCH_5__) || \
555+ defined(__ARM_ARCH_5T__) || \
556+ defined(__ARM_ARCH_5TE__)
557+#define PLD(code...) code
558+#else
559+#define PLD(code...)
560+#endif
561+
562+
563+/* char * memcpy (char *dst, const char *src) */
564+
565+ENTRY(memcpy)
566+ subs r2, r2, #4
567+ stmfd sp!, {r0, r4, lr}
568+ blt 7f
569+ ands ip, r0, #3
570+ PLD( pld [r1, #0] )
571+ bne 8f
572+ ands ip, r1, #3
573+ bne 9f
574+
575+1: subs r2, r2, #4
576+ blt 6f
577+ subs r2, r2, #8
578+ blt 5f
579+ subs r2, r2, #16
580+ blt 4f
581+
582+ PLD( subs r2, r2, #65 )
583+ stmfd sp!, {r5 - r8}
584+ PLD( blt 3f )
585+ PLD( pld [r1, #32] )
586+
587+ PLD( @ cache alignment )
588+ PLD( ands ip, r1, #31 )
589+ PLD( pld [r1, #64] )
590+ PLD( beq 2f )
591+ PLD( rsb ip, ip, #32 )
592+ PLD( cmp r2, ip )
593+ PLD( pld [r1, #96] )
594+ PLD( blt 2f )
595+ PLD( cmp ip, #16 )
596+ PLD( sub r2, r2, ip )
597+ PLD( ldmgeia r1!, {r3 - r6} )
598+ PLD( stmgeia r0!, {r3 - r6} )
599+ PLD( beq 2f )
600+ PLD( and ip, ip, #15 )
601+ PLD( cmp ip, #8 )
602+ PLD( ldr r3, [r1], #4 )
603+ PLD( ldrge r4, [r1], #4 )
604+ PLD( ldrgt r5, [r1], #4 )
605+ PLD( str r3, [r0], #4 )
606+ PLD( strge r4, [r0], #4 )
607+ PLD( strgt r5, [r0], #4 )
608+
609+2: PLD( pld [r1, #96] )
610+3: ldmia r1!, {r3 - r8, ip, lr}
611+ subs r2, r2, #32
612+ stmia r0!, {r3 - r8, ip, lr}
613+ bge 2b
614+ PLD( cmn r2, #65 )
615+ PLD( bge 3b )
616+ PLD( add r2, r2, #65 )
617+ tst r2, #31
618+ ldmfd sp!, {r5 - r8}
619+ ldmeqfd sp!, {r0, r4, pc}
620+
621+ tst r2, #16
622+4: ldmneia r1!, {r3, r4, ip, lr}
623+ stmneia r0!, {r3, r4, ip, lr}
624+
625+ tst r2, #8
626+5: ldmneia r1!, {r3, r4}
627+ stmneia r0!, {r3, r4}
628+
629+ tst r2, #4
630+6: ldrne r3, [r1], #4
631+ strne r3, [r0], #4
632+
633+7: ands r2, r2, #3
634+ ldmeqfd sp!, {r0, r4, pc}
635+
636+ cmp r2, #2
637+ ldrb r3, [r1], #1
638+ ldrgeb r4, [r1], #1
639+ ldrgtb ip, [r1]
640+ strb r3, [r0], #1
641+ strgeb r4, [r0], #1
642+ strgtb ip, [r0]
643+ ldmfd sp!, {r0, r4, pc}
644+
645+8: rsb ip, ip, #4
646+ cmp ip, #2
647+ ldrb r3, [r1], #1
648+ ldrgeb r4, [r1], #1
649+ ldrgtb lr, [r1], #1
650+ strb r3, [r0], #1
651+ strgeb r4, [r0], #1
652+ strgtb lr, [r0], #1
653+ subs r2, r2, ip
654+ blt 7b
655+ ands ip, r1, #3
656+ beq 1b
657+
658+9: bic r1, r1, #3
659+ cmp ip, #2
660+ ldr lr, [r1], #4
661+ beq 17f
662+ bgt 18f
663+
664+
665+ .macro forward_copy_shift pull push
666+
667+ cmp r2, #12
668+ PLD( pld [r1, #0] )
669+ blt 15f
670+ subs r2, r2, #28
671+ stmfd sp!, {r5 - r9}
672+ blt 13f
673+
674+ PLD( subs r2, r2, #97 )
675+ PLD( blt 12f )
676+ PLD( pld [r1, #32] )
677+
678+ PLD( @ cache alignment )
679+ PLD( rsb ip, r1, #36 )
680+ PLD( pld [r1, #64] )
681+ PLD( ands ip, ip, #31 )
682+ PLD( pld [r1, #96] )
683+ PLD( beq 11f )
684+ PLD( cmp r2, ip )
685+ PLD( pld [r1, #128] )
686+ PLD( blt 11f )
687+ PLD( sub r2, r2, ip )
688+10: PLD( mov r3, lr, pull #\pull )
689+ PLD( ldr lr, [r1], #4 )
690+ PLD( subs ip, ip, #4 )
691+ PLD( orr r3, r3, lr, push #\push )
692+ PLD( str r3, [r0], #4 )
693+ PLD( bgt 10b )
694+
695+11: PLD( pld [r1, #128] )
696+12: mov r3, lr, pull #\pull
697+ ldmia r1!, {r4 - r9, ip, lr}
698+ subs r2, r2, #32
699+ orr r3, r3, r4, push #\push
700+ mov r4, r4, pull #\pull
701+ orr r4, r4, r5, push #\push
702+ mov r5, r5, pull #\pull
703+ orr r5, r5, r6, push #\push
704+ mov r6, r6, pull #\pull
705+ orr r6, r6, r7, push #\push
706+ mov r7, r7, pull #\pull
707+ orr r7, r7, r8, push #\push
708+ mov r8, r8, pull #\pull
709+ orr r8, r8, r9, push #\push
710+ mov r9, r9, pull #\pull
711+ orr r9, r9, ip, push #\push
712+ mov ip, ip, pull #\pull
713+ orr ip, ip, lr, push #\push
714+ stmia r0!, {r3 - r9, ip}
715+ bge 11b
716+ PLD( cmn r2, #97 )
717+ PLD( bge 12b )
718+ PLD( add r2, r2, #97 )
719+ cmn r2, #16
720+ blt 14f
721+13: mov r3, lr, pull #\pull
722+ ldmia r1!, {r4 - r6, lr}
723+ sub r2, r2, #16
724+ orr r3, r3, r4, push #\push
725+ mov r4, r4, pull #\pull
726+ orr r4, r4, r5, push #\push
727+ mov r5, r5, pull #\pull
728+ orr r5, r5, r6, push #\push
729+ mov r6, r6, pull #\pull
730+ orr r6, r6, lr, push #\push
731+ stmia r0!, {r3 - r6}
732+14: adds r2, r2, #28
733+ ldmfd sp!, {r5 - r9}
734+ blt 16f
735+15: mov r3, lr, pull #\pull
736+ ldr lr, [r1], #4
737+ subs r2, r2, #4
738+ orr r3, r3, lr, push #\push
739+ str r3, [r0], #4
740+ bge 15b
741+16:
742+ .endm
743+
744+
745+ forward_copy_shift pull=8 push=24
746+ sub r1, r1, #3
747+ b 7b
748+
749+17: forward_copy_shift pull=16 push=16
750+ sub r1, r1, #2
751+ b 7b
752+
753+18: forward_copy_shift pull=24 push=8
754+ sub r1, r1, #1
755+ b 7b
756+
757+ .size memcpy, . - memcpy
758+END(memcpy)
759+libc_hidden_builtin_def (memcpy)
760+