]>
Commit | Line | Data |
---|---|---|
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 | |
16 | typedef __SIZE_TYPE__ size_t;\r | |
17 | \r | |
18 | static __attribute__((__used__))\r | |
19 | void *__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 | |
31 | void *memcpy(void *dest, const void *src, size_t n);\r | |
32 | \r | |
33 | #ifdef __arm__\r | |
34 | \r | |
35 | __attribute__((__alias__("__memcpy")))\r | |
36 | void __aeabi_memcpy(void *dest, const void *src, size_t n);\r | |
37 | \r | |
38 | __attribute__((__alias__("__memcpy")))\r | |
39 | void __aeabi_memcpy4(void *dest, const void *src, size_t n);\r | |
40 | \r | |
41 | __attribute__((__alias__("__memcpy")))\r | |
42 | void __aeabi_memcpy8(void *dest, const void *src, size_t n);\r | |
43 | \r | |
44 | #endif\r |