]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / memcpy_ms.c
CommitLineData
e58427e3
PB
1//------------------------------------------------------------------------------\r
2//\r
3// Copyright (c) 2017, Pete Batard. 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
16#if defined(_M_ARM64)\r
17typedef unsigned __int64 size_t;\r
18#else\r
19typedef unsigned __int32 size_t;\r
20#endif\r
21\r
22void* memcpy(void *, const void *, size_t);\r
23#pragma intrinsic(memcpy)\r
24#pragma function(memcpy)\r
25void* memcpy(void *dest, const void *src, size_t n)\r
26{\r
27 unsigned char *d = dest;\r
28 unsigned char const *s = src;\r
29\r
30 while (n--)\r
31 *d++ = *s++;\r
32\r
33 return dest;\r
34}\r