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