]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCopyMem.c
3 Copyright (c) 2004, 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
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.
18 Implementation of the EfiCopyMem routine. This function is broken
19 out into its own source file so that it can be excluded from a
20 build for a particular platform easily if an optimized version
37 Copy Length bytes from Source to Destination.
41 Destination - Target of copy
43 Source - Place to copy from
45 Length - Number of bytes to copy
56 if (Source
< Destination
) {
57 Destination8
= (CHAR8
*) Destination
+ Length
- 1;
58 Source8
= (CHAR8
*) Source
+ Length
- 1;
60 *(Destination8
--) = *(Source8
--);
63 Destination8
= (CHAR8
*) Destination
;
64 Source8
= (CHAR8
*) Source
;
66 *(Destination8
++) = *(Source8
++);