]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/CompilerStub/memcpy.c
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / CompilerStub / memcpy.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13 memcpy.c
14
15 Abstract:
16
17 The Microsoft compiler inlines memcpy and we can not stop it.
18 These routines allow the code to link!
19
20 There is no *.h definition of these modules as they are well known by the
21 compiler. See Microsoft documentation for more details!
22
23 volatile is used to prevent the compiler from trying to implement these
24 C functions as inline functions.
25
26 --*/
27
28 #include "Tiano.h"
29
30 VOID *
31 memcpy (
32 OUT VOID *Dest,
33 IN const VOID *Src,
34 IN UINTN Count
35 )
36 {
37 volatile UINT8 *Ptr;
38 const UINT8 *Source;
39
40 for (Ptr = Dest, Source = Src; Count > 0; Count--, Source++, Ptr++) {
41 *Ptr = *Source;
42 }
43
44 return Dest;
45 }
46