TianoCore EDK2
master
Loading...
Searching...
No Matches
memcpy.c
1
// ------------------------------------------------------------------------------
2
//
3
// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
4
// Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
5
//
6
// SPDX-License-Identifier: BSD-2-Clause-Patent
7
//
8
// ------------------------------------------------------------------------------
9
10
typedef
__SIZE_TYPE__ size_t;
11
12
static
void
13
__memcpy (
14
void
*dest,
15
const
void
*src,
16
size_t
n
17
)
18
{
19
unsigned
char
*d;
20
unsigned
char
const
*s;
21
22
d = dest;
23
s = src;
24
25
while
(n-- != 0) {
26
*d++ = *s++;
27
}
28
}
29
30
void
*
31
memcpy (
32
void
*dest,
33
const
void
*src,
34
size_t
n
35
)
36
{
37
__memcpy (dest, src, n);
38
return
dest;
39
}
40
41
#ifdef __arm__
42
43
__attribute__
((__alias__ (
"__memcpy"
)))
44
void
45
__aeabi_memcpy (
46
void
*dest,
47
const
void
*src,
48
size_t
n
49
);
50
51
__attribute__
((__alias__ ("__memcpy")))
52
void
53
__aeabi_memcpy4 (
54
void
*dest,
55
const
void
*src,
56
size_t
n
57
);
58
59
__attribute__
((__alias__ ("__memcpy")))
60
void
61
__aeabi_memcpy8 (
62
void
*dest,
63
const
void
*src,
64
size_t
n
65
);
66
67
#endif
__attribute__
unsigned long long UINT64 __attribute__((aligned(8)))
Definition:
ProcessorBind.h:28
MdePkg
Library
CompilerIntrinsicsLib
memcpy.c
Generated on Fri Nov 15 2024 18:01:17 for TianoCore EDK2 by
1.9.6