]>
Commit | Line | Data |
---|---|---|
1 | //------------------------------------------------------------------------------ | |
2 | // | |
3 | // Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> | |
4 | // | |
5 | // This program and the accompanying materials | |
6 | // are licensed and made available under the terms and conditions of the BSD License | |
7 | // which accompanies this distribution. The full text of the license may be found at | |
8 | // http://opensource.org/licenses/bsd-license.php | |
9 | // | |
10 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
11 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
12 | // | |
13 | //------------------------------------------------------------------------------ | |
14 | ||
15 | ||
16 | EXPORT __aeabi_memcpy4 | |
17 | ||
18 | AREA Memcpy4, CODE, READONLY | |
19 | ||
20 | ; | |
21 | ;VOID | |
22 | ;EFIAPI | |
23 | ;__aeabi_memcpy ( | |
24 | ; IN VOID *Destination, | |
25 | ; IN VOID *Source, | |
26 | ; IN UINT32 Size | |
27 | ; ); | |
28 | ; | |
29 | __aeabi_memcpy4 | |
30 | stmdb sp!, {r4, lr} | |
31 | subs r2, r2, #32 ; 0x20 | |
32 | bcc memcpy4_label2 | |
33 | memcpy4_label1 | |
34 | ldmcsia r1!, {r3, r4, ip, lr} | |
35 | stmcsia r0!, {r3, r4, ip, lr} | |
36 | ldmcsia r1!, {r3, r4, ip, lr} | |
37 | stmcsia r0!, {r3, r4, ip, lr} | |
38 | subcss r2, r2, #32 ; 0x20 | |
39 | bcs memcpy4_label1 | |
40 | memcpy4_label2 | |
41 | movs ip, r2, lsl #28 | |
42 | ldmcsia r1!, {r3, r4, ip, lr} | |
43 | stmcsia r0!, {r3, r4, ip, lr} | |
44 | ldmmiia r1!, {r3, r4} | |
45 | stmmiia r0!, {r3, r4} | |
46 | ldmia sp!, {r4, lr} | |
47 | movs ip, r2, lsl #30 | |
48 | ldrcs r3, [r1], #4 | |
49 | strcs r3, [r0], #4 | |
50 | bxeq lr | |
51 | ||
52 | _memcpy4_lastbytes_aligned | |
53 | movs r2, r2, lsl #31 | |
54 | ldrcsh r3, [r1], #2 | |
55 | ldrmib r2, [r1], #1 | |
56 | strcsh r3, [r0], #2 | |
57 | strmib r2, [r0], #1 | |
58 | bx lr | |
59 | ||
60 | END | |
61 |