-//------------------------------------------------------------------------------\r
+// ------------------------------------------------------------------------------\r
//\r
// Copyright (c) 2017, Pete Batard. All rights reserved.<BR>\r
+// Copyright (c) 2021, Arm Limited. All rights reserved.<BR>\r
//\r
-// This program and the accompanying materials are licensed and made\r
-// available under the terms and conditions of the BSD License which\r
-// accompanies this distribution. The full text of the license may be\r
-// found at http://opensource.org/licenses/bsd-license.php\r
+// SPDX-License-Identifier: BSD-2-Clause-Patent\r
//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR\r
-// IMPLIED.\r
-//\r
-//------------------------------------------------------------------------------\r
+// ------------------------------------------------------------------------------\r
\r
-#if defined(_M_ARM64)\r
-typedef unsigned __int64 size_t;\r
+#if defined (_M_ARM64)\r
+typedef unsigned __int64 size_t;\r
#else\r
-typedef unsigned __int32 size_t;\r
+typedef unsigned __int32 size_t;\r
#endif\r
\r
-void* memcpy(void *, const void *, size_t);\r
+void *\r
+memcpy (\r
+ void *,\r
+ const void *,\r
+ size_t\r
+ );\r
+\r
#pragma intrinsic(memcpy)\r
#pragma function(memcpy)\r
-void* memcpy(void *dest, const void *src, size_t n)\r
+void *\r
+memcpy (\r
+ void *dest,\r
+ const void *src,\r
+ size_t n\r
+ )\r
{\r
- unsigned char *d = dest;\r
- unsigned char const *s = src;\r
+ unsigned char *d;\r
+ unsigned char const *s;\r
+\r
+ d = dest;\r
+ s = src;\r
\r
- while (n--)\r
+ while (n-- != 0) {\r
*d++ = *s++;\r
+ }\r
\r
return dest;\r
}\r