]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c
MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / memcpy.c
CommitLineData
a0cf6b8d
AB
1//------------------------------------------------------------------------------\r
2//\r
3// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
4//\r
5// This program and the accompanying materials are licensed and made\r
6// available under the terms and conditions of the BSD License which\r
7// accompanies this distribution. The full text of the license may be\r
8// found at 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\r
12// IMPLIED.\r
13//\r
14//------------------------------------------------------------------------------\r
15\r
16typedef __SIZE_TYPE__ size_t;\r
17\r
18static __attribute__((__used__))\r
19void *__memcpy(void *dest, const void *src, size_t n)\r
20{\r
21 unsigned char *d = dest;\r
22 unsigned char const *s = src;\r
23\r
24 while (n--)\r
25 *d++ = *s++;\r
26\r
27 return dest;\r
28}\r
29\r
30__attribute__((__alias__("__memcpy")))\r
31void *memcpy(void *dest, const void *src, size_t n);\r
32\r
33#ifdef __arm__\r
34\r
35__attribute__((__alias__("__memcpy")))\r
36void __aeabi_memcpy(void *dest, const void *src, size_t n);\r
37\r
38__attribute__((__alias__("__memcpy")))\r
39void __aeabi_memcpy4(void *dest, const void *src, size_t n);\r
40\r
41__attribute__((__alias__("__memcpy")))\r
42void __aeabi_memcpy8(void *dest, const void *src, size_t n);\r
43\r
44#endif\r