]>
git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/CompilerIntrinsicsLib/memset.c
1 //------------------------------------------------------------------------------
3 // Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
5 // This program and the accompanying materials are licensed and made
6 // available under the terms and conditions of the BSD License which
7 // accompanies this distribution. The full text of the license may be
8 // found at http://opensource.org/licenses/bsd-license.php
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
14 //------------------------------------------------------------------------------
16 typedef __SIZE_TYPE__
size_t;
18 static __attribute__((__used__
))
19 void *__memset(void *s
, int c
, size_t n
)
30 // Other modules (such as CryptoPkg/IntrinsicLib) may provide another
31 // implementation of memset(), which may conflict with this one if this
32 // object was pulled into the link due to the definitions below. So make
33 // our memset() 'weak' to let the other implementation take precedence.
35 __attribute__((__weak__
, __alias__("__memset")))
36 void *memset(void *dest
, int c
, size_t n
);
40 void __aeabi_memset(void *dest
, size_t n
, int c
)
45 __attribute__((__alias__("__aeabi_memset")))
46 void __aeabi_memset4(void *dest
, size_t n
, int c
);
48 __attribute__((__alias__("__aeabi_memset")))
49 void __aeabi_memset8(void *dest
, size_t n
, int c
);
51 void __aeabi_memclr(void *dest
, size_t n
)
56 __attribute__((__alias__("__aeabi_memclr")))
57 void __aeabi_memclr4(void *dest
, size_t n
);
59 __attribute__((__alias__("__aeabi_memclr")))
60 void __aeabi_memclr8(void *dest
, size_t n
);