]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.asm
ArmPkg/CompilerIntrinsicesLib: Fixed memmove() and memset()
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / memset.asm
CommitLineData
1e57a462 1//------------------------------------------------------------------------------\r
2//\r
3// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
284fb5c8 4// Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>\r
1e57a462 5//\r
6// This program and the accompanying materials\r
7// are licensed and made available under the terms and conditions of the BSD License\r
8// which accompanies this distribution. The full text of the license may be found at\r
9// http://opensource.org/licenses/bsd-license.php\r
10//\r
11// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13//\r
14//------------------------------------------------------------------------------\r
15\r
16\r
17 EXPORT __aeabi_memset\r
18 EXPORT __aeabi_memclr\r
19 EXPORT __aeabi_memclr4\r
20\r
21 AREA Memset, CODE, READONLY\r
22\r
284fb5c8
OM
23; void __aeabi_memclr4(void *dest, size_t n);\r
24; void __aeabi_memclr(void *dest, size_t n);\r
25__aeabi_memclr\r
26__aeabi_memclr4\r
27 mov r2, #0\r
28\r
1e57a462 29;\r
30;VOID\r
31;EFIAPI\r
32;__aeabi_memset (\r
33; IN VOID *Destination,\r
284fb5c8
OM
34; IN UINT32 Size,\r
35; IN UINT32 Character\r
1e57a462 36; );\r
37;\r
38__aeabi_memset\r
284fb5c8
OM
39 cmp r1, #0\r
40 bxeq lr\r
1e57a462 41 ; args = 0, pretend = 0, frame = 0\r
42 ; frame_needed = 1, uses_anonymous_args = 0\r
1e57a462 43L10\r
284fb5c8
OM
44 strb r2, [r0], #1\r
45 subs r1, r1, #1\r
46 ; While size is not 0\r
1e57a462 47 bne L10\r
284fb5c8 48 bx lr\r
1e57a462 49\r
50 END\r