summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-11 15:32:16 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-11 15:32:16 +0000
commit1fef058f4b8fefc455bb171e4908c3e835b1b492 (patch)
treea61203bc9df33742251d8496b9b481399677caf1 /MdePkg
parentba19956ac3c600eaeff1c90556457105032218d8 (diff)
downloadedk2-1fef058f4b8fefc455bb171e4908c3e835b1b492.zip
edk2-1fef058f4b8fefc455bb171e4908c3e835b1b492.tar.gz
edk2-1fef058f4b8fefc455bb171e4908c3e835b1b492.tar.bz2
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
1. Remove .intel_syntax directives in GCC assembly files. All these assembly files have been updated to use the preferred syntax for GAS 2. Correct the incorrect comments for internal worker functions for SetMemXX() and ScanMemXX(). The Length parameter is actually the counter of 16-bit, 32-bit or 64-bit value. 3. Simplify the logic in ZeroMemoryWrapper.c for BaseMemoryLibOptPei instance to remove the conditional statement for zero length. This logic is already covered by worker function InternalMemZeroMem(). 4. Cleanup all the Wrapper C files in BaseMemoryLib instances. They are supposed to be shared by all these 8 BaseMemoryLib instances, but are out-of-sync after some maintenance. This patch re-syncs them and makes them exactly the same. 5. Cleanup MemLibInternal.h so that it is shared by 6 BaseMemoryLib instance except for PeiMemoryLib and UefiMemoryLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9041 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c6
-rw-r--r--MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/MemLibGeneric.c21
-rw-r--r--MdePkg/Library/BaseMemoryLib/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/MemLibInternals.h21
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMemWrapper.c6
-rw-r--r--MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h28
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S47
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S35
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S35
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S13
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S29
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h25
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c24
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c22
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c22
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S25
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S61
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S43
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c5
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h29
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c22
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c22
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c22
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S35
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c5
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c16
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h29
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S27
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S35
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S15
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h29
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S23
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S59
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S21
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S19
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S17
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S51
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S47
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S49
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S27
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S41
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c8
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibGeneric.c27
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibGuid.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibInternals.h34
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c21
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c21
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c21
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c8
-rw-r--r--MdePkg/Library/UefiMemoryLib/MemLibGeneric.c27
-rw-r--r--MdePkg/Library/UefiMemoryLib/MemLibGuid.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/MemLibInternals.h31
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c21
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMem32Wrapper.c22
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMem64Wrapper.c22
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c4
162 files changed, 1074 insertions, 1239 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
index 8eff3c0..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
@@ -1,6 +1,6 @@
/** @file
CompareMem() implementation.
-
+
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
index 84ca4d9..e9e0f17 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
@@ -4,9 +4,9 @@
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,16 +17,13 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -50,7 +47,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -74,7 +71,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -147,7 +144,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -177,7 +174,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -207,7 +204,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -237,7 +234,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
index 61024be..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -30,7 +28,6 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-
/**
Copy Length bytes from Source to Destination.
@@ -62,7 +59,7 @@ InternalMemCopyMem (
VOID *
EFIAPI
InternalMemSetMem (
- IN VOID *Buffer,
+ OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
);
@@ -71,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -89,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -107,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -163,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -182,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -201,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -220,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c
index 4e0bb8d..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
index db03525..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c
index 5010df6..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
index 5197d07..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
@@ -2,7 +2,7 @@
SetMem() implementation.
The following BaseMemoryLib instances contain the same copy of this file:
-
+
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
index 3c8be6a..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
index 7e681ea..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -34,8 +32,8 @@
Copy Length bytes from Source to Destination.
@param DestinationBuffer Target of copy
- @param SourceBuffer Place to copy from
- @param Length Number of bytes to copy
+ @param SourceBuffer Place to copy from
+ @param Length Number of bytes to copy
@return Destination
@@ -51,9 +49,9 @@ InternalMemCopyMem (
/**
Set Buffer to Value for Size bytes.
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
@return Buffer
@@ -70,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -88,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -106,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -162,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -181,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -200,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -219,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c
index 6d5d5c0..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMem16Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c
index 406c4ca..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c
index d1d42a4..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMem64Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
index c207db7..08a8dc6 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,19 +42,18 @@
# IN UINTN Length
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
+ pushq %rsi
+ pushq %rdi
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
+ movzbq -1(%rsi), %rax
+ movzbq -1(%rdi), %rdx
+ subq %rdx, %rax
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
index 3a336f7..94ca846 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,42 +34,41 @@
# IN UINTN Count
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- End of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
+ pushq %rsi
+ pushq %rdi
+ movq %rdx, %rsi # rsi <- Source
+ movq %rcx, %rdi # rdi <- Destination
+ leaq -1(%rsi, %r8,), %r9 # r9 <- End of Source
+ cmpq %rdi, %rsi
+ movq %rdi, %rax # rax <- Destination as return value
jae L0
- cmp r9, rdi
+ cmpq %rdi, %r9
jae L_CopyBackward # Copy backward if overlapped
L0:
- mov rcx, r8
- and r8, 7
- shr rcx, 3 # rcx <- # of Qwords to copy
+ movq %r8, %rcx
+ andq $7, %r8
+ shrq $3, %rcx # rcx <- # of Qwords to copy
jz L_CopyBytes
- movd r10, mm0 # (Save mm0 in r10)
+ movq %mm0, %r10 # (Save mm0 in r10) ; Why just save 32 bits?
L1:
- movq mm0, [rsi]
- movntq [rdi], mm0
- add rsi, 8
- add rdi, 8
+ movq (%rsi), %mm0
+ movntq %mm0, (%rdi)
+ addq $8, %rsi
+ addq $8, %rdi
loop L1
mfence
- movd mm0, r10 # (Restore mm0)
+ movd %r10, %mm0 # (Restore mm0)
jmp L_CopyBytes
L_CopyBackward:
- mov rsi, r9 # rsi <- End of Source
- lea rdi, [rdi + r8 - 1] # rdi <- End of Destination
+ movq %r9, %rsi # rsi <- End of Source
+ leaq -1(%rdi, %r8,), %rdi # rdi <- End of Destination
std # set direction flag
L_CopyBytes:
- mov rcx, r8
+ movq %r8, %rcx
rep movsb # Copy bytes backward
cld
- pop rdi
- pop rsi
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
index 140b0a4..6832324 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
+ leaq -2(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
index 9420725..56ff2ea 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
index d39f17f..bd5c3fc 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,15 +42,14 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
+ repne scasq
+ leaq -8(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
index 74667a6..4a882a0 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
- repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
+ repne scasb
+ leaq -1(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
index 814d20c..a29be89 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,29 +34,28 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
- push rdi
- mov rax, r8
- mov ah, al
- movq mm0, rax
- mov r8, rcx
- mov rdi, r8 # rdi <- Buffer
- mov rcx, rdx
- and edx, 7
- shr rcx, 3
+ push %rdi
+ movq %r8, %rax
+ movb %al, %ah
+ movq %rax, %mm0
+ movq %rcx, %r8
+ movq %r8, %rdi # rdi <- Buffer
+ movq %rdx, %rcx
+ andq $7, %rdx
+ shrq $3, %rcx
jz L_SetBytes
- pshufw mm0, mm0, 0x0
+ .byte 0x0f, 0x70, 0x0C0, 0x00
L0:
- movntq [rdi], mm0
- add rdi, 8
+ movntq %mm0, (%rdi)
+ addq $8, %rdi
loop L0
mfence
L_SetBytes:
- mov ecx, edx
- rep stosb
- mov rax, r8
- pop rdi
+ movl %edx, %ecx
+ rep stosb
+ movq %r8, %rax
+ pop %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
index e3e6620..6ae6793 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,28 +34,27 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rax, r8
- movq mm0, rax
- mov r8, rcx
- mov rdi, r8
- mov rcx, rdx
- and edx, 3
- shr rcx, 2
- jz L_SetWords
- pshufw mm0, mm0, 0x0
+ pushq %rdi
+ movq %r8, %rax
+ movq %rax, %mm0
+ movq %rcx, %r8
+ movq %r8, %rdi
+ movq %rdx, %rcx
+ andl $3, %edx
+ shrq $2, %rcx
+ jz L_SetWords
+ .byte 0x0f, 0x70, 0x0C0, 0x00
L0:
- movntq [rdi], mm0
- add rdi, 8
- loop L0
+ movntq %mm0, (%rdi)
+ addq $8, %rdi
+ loop L0
mfence
L_SetWords:
- mov ecx, edx
+ movl %edx, %ecx
rep stosw
- mov rax, r8
- pop rdi
+ movq %r8, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
index a67ca6a..c983e6d 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,23 +34,22 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
- movq mm0, r8 # mm0 <- Value
- mov rax, rcx # rax <- Buffer
- xchg rcx, rdx # rcx <- Count rdx <- Buffer
- shr rcx, 1 # rcx <- # of qwords to set
+ movq %r8, %mm0 # mm0 <- Value
+ movq %rcx, %rax # rax <- Buffer
+ xchgq %rdx, %rcx # rcx <- Count rdx <- Buffer
+ shrq $1, % rcx # rcx <- # of qwords to set
jz L_SetDwords
- pshufw mm0, mm0, 0x44
+ .byte 0x0f, 0x70, 0x0C0, 0x44
L0:
- movntq [rdx], mm0
- lea rdx, [rdx + 8] # use "lea" to avoid flag changes
+ movntq %mm0, (%rdx)
+ leaq 8(%rdx), %rdx # use "lea" to avoid flag changes
loop L0
mfence
L_SetDwords:
jnc L1
- movd [rdx], mm0
+ movd %mm0, (%rdx)
L1:
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
index 36312d4..10135f8 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,15 +33,14 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
- movq mm0, r8 #Value
- mov rax, rcx #rax <- Buffer
- xchg rcx, rdx #rcx <- Count
+ movq %r8, %mm0 #Value
+ movw %rcx, %rax #rax <- Buffer
+ xchg %rdx, %rcx #rcx <- Count
L0:
- movntq [rdx], mm0
- add rdx, 8
+ movntq %mm0, (%rdx)
+ addq $8, %rdx
loop L0
mfence
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
index b5dec03..4ea751f 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,27 +32,26 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov r8, rdi
- and edx, 7
- shr rcx, 3
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %rdi, %r8
+ andq $7, %rdx
+ shrq $3, %rcx
jz L_ZeroBytes
- pxor mm0, mm0
+ pxor %mm0, %mm0
L0:
- movntq [rdi], mm0
- add rdi, 8
+ movntq %mm0, (%rdi)
+ addq $8, %rdi
loop L0
mfence
L_ZeroBytes:
- xor eax, eax
- mov ecx, edx
+ xorl %eax, %eax
+ movl %edx, %ecx
rep stosb
- mov rax, r8
- pop rdi
+ movq %r8, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
index 3c8be6a..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
index 9ecc390..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -30,7 +28,6 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-
/**
Copy Length bytes from Source to Destination.
@@ -52,9 +49,9 @@ InternalMemCopyMem (
/**
Set Buffer to Value for Size bytes.
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
@return Buffer
@@ -71,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -89,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -107,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -163,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -182,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -201,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -220,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c
index 6beb40b..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem16Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem16() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- The following BaseMemoryLib instances contains the same copy of this file:
-
+ The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c
index 0a0ce82..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem32Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem32() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c
index 10ef682..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/SetMem64Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem64() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
index c207db7..4f73686 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -41,20 +41,19 @@
# IN CONST VOID *SourceBuffer,
# IN UINTN Length
# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
+#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
+ pushq %rsi
+ pushq %rdi
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
+ movzbq -1(%rsi) , %rax
+ movzbq -1(%rdi) , %rdx
+ sub %dl, %al
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
index c05e50a..a516df6 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,51 +33,50 @@
# IN UINTN Count
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- Last byte of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
+ pushq %rsi
+ pushq %rdi
+ movq %rdx, %rsi # rsi <- Source
+ movq %rcx, %rdi # rdi <- Destination
+ leaq -1(%rsi,%r8,), %r9 # r9 <- Last byte of Source
+ cmpq %rdi, %rsi
+ movq %rdi, %rax # rax <- Destination as return value
jae L0 # Copy forward if Source > Destination
- cmp r9, rdi # Overlapped?
- jae L_CopyBackward # Copy backward if overlapped
+ cmpq %rdi, %r9 # Overlapped?
+ jae L_CopyBackward # Copy backward if overlapped
L0:
- xor rcx, rcx
- sub rcx, rdi # rcx <- -rdi
- and rcx, 15 # rcx + rsi should be 16 bytes aligned
+ xorq %rcx, %rcx
+ subq %rdi, %rcx # rcx <- -rdi
+ andq $15, %rcx # rcx + rsi should be 16 bytes aligned
jz L1 # skip if rcx == 0
- cmp rcx, r8
- cmova rcx, r8
- sub r8, rcx
+ cmpq %r8, %rcx
+ cmova %r8, %rcx
+ subq %rcx, %r8
rep movsb
L1:
- mov rcx, r8
- and r8, 15
- shr rcx, 4 # rcx <- # of DQwords to copy
+ movq %r8, %rcx
+ andq $15, %r8
+ shrq $4, %rcx # rcx <- # of DQwords to copy
jz L_CopyBytes
- movdqa [rsp + 0x18], xmm0 # save xmm0 on stack
+ movdqu %xmm0, 0x18(%rsp) # save xmm0 on stack
L2:
- movdqu xmm0, [rsi] # rsi may not be 16-byte aligned
- movntdq [rdi], xmm0 # rdi should be 16-byte aligned
- add rsi, 16
- add rdi, 16
+ movdqu (%rsi), %xmm0 # rsi may not be 16-byte aligned
+ movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned
+ addq $16, %rsi
+ addq $16, %rdi
loop L2
mfence
- movdqa xmm0, [rsp + 0x18] # restore xmm0
+ movdqa 0x18(%rsp), %xmm0 # restore xmm0
jmp L_CopyBytes # copy remaining bytes
L_CopyBackward:
- mov rsi, r9 # rsi <- Last byte of Source
- lea rdi, [rdi + r8 - 1] # rdi <- Last byte of Destination
+ movq %r9, %rsi # rsi <- Last byte of Source
+ leaq -1(%rdi, %r8,), %rdi # rdi <- Last byte of Destination
std
L_CopyBytes:
- mov rcx, r8
+ movq %r8, %rcx
rep movsb
cld
- pop rdi
- pop rsi
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
index 140b0a4..24055dc 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,21 +37,20 @@
# CONST VOID *
# EFIAPI
# InternalMemScanMem16 (
-# IN CONST VOID *Buffer,
+# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
+ leaq -2(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
index 9420725..b7a5884 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
index d39f17f..c1a9d4b 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,20 +37,19 @@
# CONST VOID *
# EFIAPI
# InternalMemScanMem64 (
-# IN CONST VOID *Buffer,
+# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
+ leaq -8(%rdi), %rax
+ cmovnz %rcx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
index 74667a6..d2d8bb5 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,21 +37,20 @@
# CONST VOID *
# EFIAPI
# InternalMemScanMem8 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT8 Value
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
+ leaq -1(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
index c7c07ad..fc8efde 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -29,30 +29,29 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
- push rdi
- push rbx
- push rcx # push Buffer
- mov rax, r8 # rax = Value
- and rax, 0xff # rax = lower 8 bits of r8, upper 56 bits are 0
- mov ah, al # ah = al
- mov bx, ax # bx = ax
- shl rax, 0x10 # rax = ax << 16
- mov ax, bx # ax = bx
- mov rbx, rax # ebx = eax
- shl rax, 0x20 # rax = rax << 32
- or rax, rbx # eax = ebx
- mov rdi, rcx # rdi = Buffer
- mov rcx, rdx # rcx = Count
- shr rcx, 3 # rcx = rcx / 8
+ pushq %rdi
+ pushq %rbx
+ pushq %rcx # push Buffer
+ movq %r8, %rax # rax = Value
+ andq $0xff, %rax # rax = lower 8 bits of r8, upper 56 bits are 0
+ movb %al, %ah # ah = al
+ movw %ax, %bx # bx = ax
+ shlq $0x10, %rax # rax = ax << 16
+ movw %bx, %ax # ax = bx
+ movq %rax, %rbx # ebx = eax
+ shlq $0x20, %rax # rax = rax << 32
+ orq %rbx, %rax # eax = ebx
+ movq %rcx, %rdi # rdi = Buffer
+ movq %rdx, %rcx # rcx = Count
+ shrq $3, %rcx # rcx = rcx / 8
cld
rep stosq
- mov rcx, rdx # rcx = rdx
- and rcx, 7 # rcx = rcx & 7
+ movq %rdx, %rcx # rcx = rdx
+ andq $7, %rcx # rcx = rcx & 7
rep stosb
- pop rax # rax = Buffer
- pop rbx
- pop rdi
+ popq %rax # rax = Buffer
+ popq %rbx
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
index c091131..af63e42 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchg %rdx, %rcx
rep stosw
- mov rax, rdx
- pop rdi
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
index 9fbcdaf..93d705c 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosd
- mov rax, rdx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
+ rep stosl
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
index c4f0b46..306077a 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,15 +33,14 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchg %rdx, %rcx
rep stosq
- mov rax, rdx
- pop rdi
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
index 6cd1474..49cef38 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,21 +32,20 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- push rcx
- xor rax, rax
- mov rdi, rcx
- mov rcx, rdx
- shr rcx, 3
- and rdx, 7
+ pushq %rdi
+ pushq %rcx
+ xorq %rax, %rax
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ shrq $3, %rcx
+ andq $7, %rdx
cld
rep stosq
- mov rcx, rdx
+ movq %rdx, %rcx
rep stosb
- pop rax
- pop rdi
+ popq %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c
index ea52803..2923356 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -48,8 +48,5 @@ ZeroMem (
{
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
- if (Length == 0) {
- return Buffer;
- }
return InternalMemZeroMem (Buffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c
index 6922177..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c
@@ -2,7 +2,6 @@
CompareMem() implementation.
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -10,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
index 5861244..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -30,13 +28,12 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-
/**
Copy Length bytes from Source to Destination.
@param DestinationBuffer Target of copy
- @param SourceBuffer Place to copy from
- @param Length Number of bytes to copy
+ @param SourceBuffer Place to copy from
+ @param Length Number of bytes to copy
@return Destination
@@ -52,9 +49,9 @@ InternalMemCopyMem (
/**
Set Buffer to Value for Size bytes.
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
@return Buffer
@@ -71,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -89,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -107,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -163,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -182,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -201,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -220,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c
index 3388eda..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMem16Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem16() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c
index 0a0ce82..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMem32Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem32() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c
index 10ef682..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMem64Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem64() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,12 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
-
-**/
+ UefiMemoryLib
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
index c207db7..bdae174 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,19 +42,18 @@
# IN UINTN Length
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
+ pushq %rsi
+ pushq %rdi
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
+ movzbq -1(%rsi) , %rax
+ movzbq -1(%rdi) , %rdx
+ subq %rdx, %rax
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
index 2ab5746..82f7411 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,34 +34,33 @@
# IN UINTN Count
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- End of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
+ pushq %rsi
+ pushq %rdi
+ movq %rdx, %rsi # rsi <- Source
+ movq %rcx, %rdi # rdi <- Destination
+ leaq -1(%rsi, %r8,), %r9 # r9 <- End of Source
+ cmpq %rdi, %rsi
+ movq %rdi, %rax # rax <- Destination as return value
jae _InternalMemCopyMem_al_0000
- cmp r9, rdi
+ cmpq %rdi, %r9
jae _atSym_CopyBackward # Copy backward if overlapped
_InternalMemCopyMem_al_0000:
- mov rcx, r8
- and r8, 7
- shr rcx, 3
+ movq %r8, %rcx
+ andq $7, %r8
+ shrq $3, %rcx
rep movsq # Copy as many Qwords as possible
jmp _atSym_CopyBytes
_atSym_CopyBackward:
- mov rsi, r9 # rsi <- End of Source
- lea rdi, [rdi + r8 - 1] # esi <- End of Destination
+ movq %r9, %rsi # rsi <- End of Source
+ leaq -1(%rdi, %r8), %rdi # rdi <- End of Destination
std # set direction flag
_atSym_CopyBytes:
- mov rcx, r8
+ movq %r8, %rcx
rep movsb # Copy bytes backward
cld
- pop rdi
- pop rsi
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
index 140b0a4..c60998b 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
+ leaq -2(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
index 9420725..f863cfe 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
index 917c37c..9bc02b0 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
+ leaq -8(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
index 74667a6..ded53c3 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
+ leaq -1(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
index cae41c3..695802a 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
- push rdi
- mov rax, r8 # rax = Value
- mov rdi, rcx # rdi = Buffer
- xchg rcx, rdx # rcx = Count, rdx = Buffer
+ pushq %rdi
+ movq %r8, %rax # rax = Value
+ movq %rcx, %rdi # rdi = Buffer
+ xchgq %rdx, %rcx # rcx = Count, rdx = Buffer
rep stosb
- mov rax, rdx # rax = Buffer
- pop rdi
+ movq %rdx, %rax # rax = Buffer
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
index c091131..35486df 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
rep stosw
- mov rax, rdx
- pop rdi
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
index 9fbcdaf..93d705c 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosd
- mov rax, rdx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
+ rep stosl
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
index c4f0b46..5b2f088 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,15 +33,14 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
rep stosq
- mov rax, rdx
- pop rdi
+ movw %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
index 73bb786..2fd6249 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,20 +32,19 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- push rcx
- xor rax, rax
- mov rdi, rcx
- mov rcx, rdx
- shr rcx, 3
- and rdx, 7
+ pushq %rdi
+ pushq %rcx
+ xorq %rax, %rax
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ shrq $3, %rcx
+ andq $7, %rdx
rep stosq
- mov ecx, edx
+ movl %edx, %ecx
rep stosb
- pop rax
- pop rdi
+ popq %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c
index 11187ba..2923356 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -48,6 +48,5 @@ ZeroMem (
{
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
-
return InternalMemZeroMem (Buffer, Length);
}
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c
index 688c210..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c
@@ -9,16 +9,16 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
index 5861244..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -30,13 +28,12 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-
/**
Copy Length bytes from Source to Destination.
@param DestinationBuffer Target of copy
- @param SourceBuffer Place to copy from
- @param Length Number of bytes to copy
+ @param SourceBuffer Place to copy from
+ @param Length Number of bytes to copy
@return Destination
@@ -52,9 +49,9 @@ InternalMemCopyMem (
/**
Set Buffer to Value for Size bytes.
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
@return Buffer
@@ -71,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -89,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -107,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -163,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -182,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -201,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -220,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c
index 4e0bb8d..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/SetMem16Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c
index db03525..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/SetMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c
index 5010df6..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/SetMem64Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
index c207db7..781c5b9 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,24 +37,23 @@
# INTN
# EFIAPI
# InternalMemCompareMem (
-# IN CONST VOID *DestinationBuffer,
-# IN CONST VOID *SourceBuffer,
+# IN CONST VOID *DestinationBuffer,
+# IN CONST VOID *SourceBuffer,
# IN UINTN Length
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
+ pushq %rsi
+ pushq %rdi
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
+ movzbq -1(%rsi) , %rax
+ movzbq -1(%rdi) , %rdx
+ subq %rdx, %rax
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
index 4477006..5eb1d46 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,34 +34,33 @@
# IN UINTN Count
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- End of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
+ pushq %rsi
+ pushq %rdi
+ movq %rdx, %rsi # rsi <- Source
+ movq %rcx, %rdi # rdi <- Destination
+ leaq -1(%rsi, %r8,), %r9 # r9 <- End of Source
+ cmpq %rdi, %rsi
+ movq %rdi, %rax # rax <- Destination as return value
jae L0
- cmp r9, rdi
+ cmpq %rdi, %r9
jae L_CopyBackward # Copy backward if overlapped
L0:
- mov rcx, r8
- and r8, 7
- shr rcx, 3
+ movq %r8, %rcx
+ andq $7, %r8
+ shrq $3, %rcx
rep movsq # Copy as many Qwords as possible
jmp L_CopyBytes
L_CopyBackward:
- mov rsi, r9 # rsi <- End of Source
- lea rdi, [rdi + r8 - 1] # esi <- End of Destination
+ movq %r9, %rsi # rsi <- End of Source
+ leaq -1(%rdi, %r8), %rdi # esi <- End of Destination
std # set direction flag
L_CopyBytes:
- mov rcx, r8
+ movq %r8, %rcx
rep movsb # Copy bytes backward
cld
- pop rdi
- pop rsi
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
index 140b0a4..c60998b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
+ leaq -2(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
index 9420725..f863cfe 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
index 917c37c..9bc02b0 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
+ leaq -8(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
index 74667a6..ded53c3 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
+ leaq -1(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
index cae41c3..838f223 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
- push rdi
- mov rax, r8 # rax = Value
- mov rdi, rcx # rdi = Buffer
- xchg rcx, rdx # rcx = Count, rdx = Buffer
+ pushq %rdi
+ movq %r8, %rax # rax = Value
+ movq %rcx, %rdi # rdi = Buffer
+ xchgq %rdx, %rcx # rcx = Count, rdx = Buffer
rep stosb
- mov rax, rdx # rax = Buffer
- pop rdi
+ movq %rdx, %rax # rax = Buffer
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
index c091131..35486df 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
rep stosw
- mov rax, rdx
- pop rdi
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
index 9fbcdaf..93d705c 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,15 +34,14 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosd
- mov rax, rdx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
+ rep stosl
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
index c4f0b46..4c404df 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,15 +33,14 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %r8, %rax
+ xchgq %rdx, %rcx
rep stosq
- mov rax, rdx
- pop rdi
+ movq %rdx, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
index 73bb786..2fd6249 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,20 +32,19 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- push rcx
- xor rax, rax
- mov rdi, rcx
- mov rcx, rdx
- shr rcx, 3
- and rdx, 7
+ pushq %rdi
+ pushq %rcx
+ xorq %rax, %rax
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ shrq $3, %rcx
+ andq $7, %rdx
rep stosq
- mov ecx, edx
+ movl %edx, %ecx
rep stosb
- pop rax
- pop rdi
+ popq %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
index 3c8be6a..278ef33 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
index 831e491..5077820 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
index 5861244..f40299b 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
@@ -8,10 +8,8 @@
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -30,13 +28,12 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-
/**
Copy Length bytes from Source to Destination.
@param DestinationBuffer Target of copy
- @param SourceBuffer Place to copy from
- @param Length Number of bytes to copy
+ @param SourceBuffer Place to copy from
+ @param Length Number of bytes to copy
@return Destination
@@ -52,9 +49,9 @@ InternalMemCopyMem (
/**
Set Buffer to Value for Size bytes.
- @param Buffer Memory to set.
- @param Length Number of bytes to set
- @param Value Value of the set operation.
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
@return Buffer
@@ -71,7 +68,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -89,7 +86,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -107,7 +104,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -163,7 +160,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -182,7 +179,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -201,7 +198,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -220,7 +217,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
index 4e0bb8d..d74b80f 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
index db03525..dc84d20 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
index 5010df6..05dc453 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,6 @@
**/
-
-
-
#include "MemLibInternals.h"
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
index c207db7..bdae174 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,19 +42,18 @@
# IN UINTN Length
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
+ pushq %rsi
+ pushq %rdi
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
+ movzbq -1(%rsi) , %rax
+ movzbq -1(%rdi) , %rdx
+ subq %rdx, %rax
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
index e5cfa7e..8f8400e 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,51 +34,50 @@
# IN UINTN Count
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- Last byte of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
+ pushq %rsi
+ pushq %rdi
+ movq %rdx, %rsi # rsi <- Source
+ movq %rcx, %rdi # rdi <- Destination
+ leaq -1(%rsi, %r8,), %r9 # r9 <- Last byte of Source
+ cmpq %rdi, %rsi
+ movq %rdi, %rax # rax <- Destination as return value
jae L0 # Copy forward if Source > Destination
- cmp r9, rdi # Overlapped?
+ cmpq %rdi, %r9 # Overlapped?
jae L_CopyBackward # Copy backward if overlapped
L0:
- xor rcx, rcx
- sub rcx, rdi # rcx <- -rdi
- and rcx, 15 # rcx + rsi should be 16 bytes aligned
+ xorq %rcx, %rcx
+ subq %rdi, %rcx # rcx <- -rdi
+ andq $15, %rcx # rcx + rsi should be 16 bytes aligned
jz L1 # skip if rcx == 0
- cmp rcx, r8
- cmova rcx, r8
- sub r8, rcx
+ cmpq %r8, %rcx
+ cmova %r8, %rcx
+ subq %rcx, %r8
rep movsb
L1:
- mov rcx, r8
- and r8, 15
- shr rcx, 4 # rcx <- # of DQwords to copy
+ movq %r8, %rcx
+ andq $15, %r8
+ shrq $4, %rcx # rcx <- # of DQwords to copy
jz L_CopyBytes
- movdqa [rsp + 0x18], xmm0 # save xmm0 on stack
+ movdqa %xmm0, 0x18(%rsp) # save xmm0 on stack
L2:
- movdqu xmm0, [rsi] # rsi may not be 16-byte aligned
- movntdq [rdi], xmm0 # rdi should be 16-byte aligned
- add rsi, 16
- add rdi, 16
+ movdqu (%rsi), %xmm0 # rsi may not be 16-byte aligned
+ movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned
+ addq $16, %rsi
+ addq $16, %rdi
loop L2
mfence
- movdqa xmm0, [rsp + 0x18] # restore xmm0
+ movdqa 0x18(%rsp), %xmm0 # restore xmm0
jmp L_CopyBytes # copy remaining bytes
L_CopyBackward:
- mov rsi, r9 # rsi <- Last byte of Source
- lea rdi, [rdi + r8 - 1] # rdi <- Last byte of Destination
+ movq %r9, %rsi # rsi <- Last byte of Source
+ leaq -1(%rdi, %r8,), %rdi # rdi <- Last byte of Destination
std
L_CopyBytes:
- mov rcx, r8
+ movq %r8, %rcx
rep movsb
cld
- pop rdi
- pop rsi
+ popq %rdi
+ popq %rsi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
index 140b0a4..c60998b 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
+ leaq -2(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
index 9420725..5eb3f9a 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,21 +37,20 @@
# CONST VOID *
# EFIAPI
# InternalMemScanMem32 (
-# IN CONST VOID *Buffer,
+# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
+ repne scasl
+ leaq -4(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
index 917c37c..22784ab 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -37,21 +37,20 @@
# CONST VOID *
# EFIAPI
# InternalMemScanMem64 (
-# IN CONST VOID *Buffer,
+# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
+ leaq -8(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
index 74667a6..de9cd8b 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -42,16 +42,15 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %r8, %rax
repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
+ leaq -1(%rdi), %rax
+ cmovnz %rcx, %rax # set rax to 0 if not found
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
index d2c2542..a17813a 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,40 +34,39 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
- push rdi
- mov rdi, rcx # rdi <- Buffer
- mov al, r8b # al <- Value
- mov r9, rdi # r9 <- Buffer as return value
- xor rcx, rcx
- sub rcx, rdi
- and rcx, 15 # rcx + rdi aligns on 16-byte boundary
+ pushq %rdi
+ movq %rcx, %rdi # rdi <- Buffer
+ movb %r8b, %al # al <- Value
+ movq %rdi, %r9 # r9 <- Buffer as return value
+ xorq %rcx, %rcx
+ subq %rdi, %rcx
+ andq $15, %rcx # rcx + rdi aligns on 16-byte boundary
jz L0
- cmp rcx, rdx
- cmova rcx, rdx
- sub rdx, rcx
+ cmpq %rdx, %rcx
+ cmova %rdx, %rcx
+ subq %rcx, %rdx
rep stosb
L0:
- mov rcx, rdx
- and rdx, 15
- shr rcx, 4
+ movq %rdx, %rcx
+ andq $15, %rdx
+ shrq $4, %rcx
jz L_SetBytes
- mov ah, al # ax <- Value repeats twice
- movdqa [rsp + 0x10], xmm0 # save xmm0
- movd xmm0, eax # xmm0[0..16] <- Value repeats twice
- pshuflw xmm0, xmm0, 0 # xmm0[0..63] <- Value repeats 8 times
- movlhps xmm0, xmm0 # xmm0 <- Value repeats 16 times
+ movb %al, %ah # ax <- Value repeats twice
+ movdqa %xmm0, 0x10(%rsp) # save xmm0
+ movd %eax, %xmm0 # xmm0[0..16] <- Value repeats twice
+ pshuflw $0, %xmm0, %xmm0 # xmm0[0..63] <- Value repeats 8 times
+ movlhps %xmm0, %xmm0 # xmm0 <- Value repeats 16 times
L1:
- movntdq [rdi], xmm0 # rdi should be 16-byte aligned
- add rdi, 16
+ movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned
+ add $16, %rdi
loop L1
mfence
- movdqa xmm0, [rsp + 0x10] # restore xmm0
+ movdqa 0x10(%rsp), %xmm0 # restore xmm0
L_SetBytes:
- mov ecx, edx # high 32 bits of rcx are always zero
+ movl %edx, %ecx # high 32 bits of rcx are always zero
rep stosb
- mov rax, r9 # rax <- Return value
- pop rdi
+ movq %r9, %rax # rax <- Return value
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
index 3da0efc..fd66b19 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,38 +34,37 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov r9, rdi
- xor rcx, rcx
- sub rcx, rdi
- and rcx, 15
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdi, %r9
+ xorq %rcx, %rcx
+ subq %rdi, %rcx
+ andq $15, %rcx
+ movq %r8, %rax
jz L0
- shr rcx, 1
- cmp rcx, rdx
- cmova rcx, rdx
- sub rdx, rcx
+ shrq $1, %rcx
+ cmpq %rdx, %rcx
+ cmova %rdx, %rcx
+ subq %rcx, %rdx
rep stosw
L0:
- mov rcx, rdx
- and edx, 7
- shr rcx, 3
+ movq %rdx, %rcx
+ andl $7, %edx
+ shrq $3, %rcx
jz L_SetWords
- movd xmm0, eax
- pshuflw xmm0, xmm0, 0
- movlhps xmm0, xmm0
+ movd %eax, %xmm0
+ pshuflw $0, %xmm0, %xmm0
+ movlhps %xmm0, %xmm0
L1:
- movntdq [rdi], xmm0
- add rdi, 16
+ movntdq %xmm0, (%rdi)
+ addq $16, %rdi
loop L1
mfence
L_SetWords:
- mov ecx, edx
+ movl %edx, %ecx
rep stosw
- mov rax, r9
- pop rdi
+ movq %r9, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
index ff6b0d7..b8579d7 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,37 +34,36 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov r9, rdi
- xor rcx, rcx
- sub rcx, rdi
- and rcx, 15
- mov rax, r8
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdi, %r9
+ xorq %rcx, %rcx
+ subq %rdi, %rcx
+ andq $15, %rcx
+ movq %r8, %rax
jz L0
- shr rcx, 2
- cmp rcx, rdx
- cmova rcx, rdx
- sub rdx, rcx
- rep stosd
+ shrq $2, %rcx
+ cmpq %rdx, %rcx
+ cmova %rdx, %rcx
+ subq %rcx, %rdx
+ rep stosl
L0:
- mov rcx, rdx
- and edx, 3
- shr rcx, 2
+ movq %rdx, %rcx
+ andl $3, %edx
+ shrq $2, %rcx
jz L_SetDwords
- movd xmm0, eax
- pshufd xmm0, xmm0, 0
+ movd %eax, %xmm0
+ pshufd $0, %xmm0, %xmm0
L1:
- movntdq [rdi], xmm0
- add rdi, 16
+ movntdq %xmm0, (%rdi)
+ addq $16, %rdi
loop L1
mfence
L_SetDwords:
- mov ecx, edx
- rep stosd
- mov rax, r9
- pop rdi
+ movl %edx, %ecx
+ rep stosl
+ movq %r9, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
index adfbb0c..a9565ce 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -33,29 +33,28 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
- mov rax, rcx # rax <- Buffer
- xchg rcx, rdx # rcx <- Count & rdx <- Buffer
- test dl, 8
- movq xmm0, r8
+ movq %rcx, %rax # rax <- Buffer
+ xchgq %rdx, %rcx # rcx <- Count & rdx <- Buffer
+ testb $8, %dl
+ movq %r8, %xmm0
jz L0
- mov [rdx], r8
- add rdx, 8
- dec rcx
+ movq %r8, (%rdx)
+ addq $8, %rdx
+ decq %rcx
L0:
- shr rcx, 1
+ shrq $1, %rcx
jz L_SetQwords
- movlhps xmm0, xmm0
+ movlhps %xmm0, %xmm0
L1:
- movntdq [rdx], xmm0
- lea rdx, [rdx + 16]
+ movntdq %xmm0, (%rdx)
+ leaq 16(%rdx), %rdx
loop L1
mfence
L_SetQwords:
jnc L2
- mov [rdx], r8
+ movq %r8, (%rdx)
L2:
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
index bb2a194..eafd155 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,35 +32,34 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- mov rdi, rcx
- xor rcx, rcx
- xor eax, eax
- sub rcx, rdi
- and rcx, 15
- mov r8, rdi
+ pushq %rdi
+ movq %rcx, %rdi
+ xorq %rcx, %rcx
+ xorl %eax, %eax
+ subq %rdi, %rcx
+ andq $15, %rcx
+ movq %rdi, %r8
jz L0
- cmp rcx, rdx
- cmova rcx, rdx
- sub rdx, rcx
+ cmpq %rdx, %rcx
+ cmova %rdx, %rcx
+ subq %rcx, %rdx
rep stosb
L0:
- mov rcx, rdx
- and edx, 15
- shr rcx, 4
+ movq %rdx, %rcx
+ andl $15, %edx
+ shrq $4, %rcx
jz L_ZeroBytes
- pxor xmm0, xmm0
+ pxor %xmm0, %xmm0
L1:
- movntdq [rdi], xmm0 # rdi should be 16-byte aligned
- add rdi, 16
+ movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned
+ addq $16, %rdi
loop L1
mfence
L_ZeroBytes:
- mov ecx, edx
+ movl %edx, %ecx
rep stosb
- mov rax, r8
- pop rdi
+ movq %r8, %rax
+ popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
index c851301..278ef33 100644
--- a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation<BR>
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
index b7e8d7a..5077820 100644
--- a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c
@@ -1,8 +1,8 @@
/** @file
CopyMem() implementation.
-
- The following BaseMemoryLib instances contain the same copy of this file:
+ The following BaseMemoryLib instances contain the same copy of this file:
+
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
index e5851a0..e9e0f17 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
@@ -1,7 +1,12 @@
/** @file
Architecture Independent Base Memory Library Implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ The following BaseMemoryLib instances contain the same copy of this file:
+ BaseMemoryLib
+ PeiMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,12 +15,6 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- The following BaseMemoryLib instances contain the same copy of this file:
-
- BaseMemoryLib
- PeiMemoryLib
- DxeMemoryLib
-
**/
#include "MemLibInternals.h"
@@ -24,7 +23,7 @@
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -48,7 +47,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -72,7 +71,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -145,7 +144,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -175,7 +174,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -205,7 +204,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -235,7 +234,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
index 11d8468..fe20e39 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h
@@ -1,7 +1,7 @@
/** @file
Declaration of internal functions for Base Memory Library.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,23 +10,11 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- The following BaseMemoryLib instances contain the same copy of this file:
-
- BaseMemoryLib
- BaseMemoryLibMmx
- BaseMemoryLibSse2
- BaseMemoryLibRepStr
- BaseMemoryLibOptDxe
- BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
-
**/
#ifndef __MEM_LIB_INTERNALS__
#define __MEM_LIB_INTERNALS__
-
#include <PiPei.h>
#include <Library/BaseMemoryLib.h>
@@ -37,7 +25,7 @@
/**
Copies a source buffer to a destination buffer, and returns the destination buffer.
- This function wraps the gPS->CopyMem ().
+ This function wraps the (*PeiServices)->CopyMem ().
@param DestinationBuffer Pointer to the destination buffer of the memory copy.
@param SourceBuffer Pointer to the source buffer of the memory copy.
@@ -57,10 +45,10 @@ InternalMemCopyMem (
/**
Fills a target buffer with a byte value, and returns the target buffer.
- This function wraps the gPS->SetMem ().
+ This function wraps the (*PeiServices)->SetMem ().
@param Buffer Memory to set.
- @param Size Number of bytes to set.
+ @param Size Number of bytes to set.
@param Value Value of the set operation.
@return Buffer.
@@ -78,7 +66,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -96,7 +84,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -114,7 +102,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -170,7 +158,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -189,7 +177,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -208,7 +196,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -227,7 +215,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
index cb20763..2add784 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,6 +22,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
+
#include "MemLibInternals.h"
/**
@@ -56,6 +57,6 @@ ScanMem8 (
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
-
+
return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
}
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c
index 4c357b3..d74b80f 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem16() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,7 +9,16 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c
index b3ce197..dc84d20 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem32() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,7 +9,16 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c
index 69c98da..05dc453 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem64() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,7 +9,16 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c b/MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c
index 3c8be6a..278ef33 100644
--- a/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
index b7e8d7a..5077820 100644
--- a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c
@@ -1,8 +1,8 @@
/** @file
CopyMem() implementation.
-
- The following BaseMemoryLib instances contain the same copy of this file:
+ The following BaseMemoryLib instances contain the same copy of this file:
+
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
index e5851a0..e9e0f17 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
+++ b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c
@@ -1,7 +1,12 @@
/** @file
Architecture Independent Base Memory Library Implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ The following BaseMemoryLib instances contain the same copy of this file:
+ BaseMemoryLib
+ PeiMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,12 +15,6 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- The following BaseMemoryLib instances contain the same copy of this file:
-
- BaseMemoryLib
- PeiMemoryLib
- DxeMemoryLib
-
**/
#include "MemLibInternals.h"
@@ -24,7 +23,7 @@
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -48,7 +47,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -72,7 +71,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -145,7 +144,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -175,7 +174,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -205,7 +204,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -235,7 +234,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c b/MdePkg/Library/UefiMemoryLib/MemLibGuid.c
index b14abbc..b315ff5 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/UefiMemoryLib/MemLibGuid.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
index a2531c7..77e8056 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
+++ b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h
@@ -1,7 +1,7 @@
/** @file
Declaration of internal functions for Base Memory Library.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -10,30 +10,17 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- The following BaseMemoryLib instances contain the same copy of this file:
-
- BaseMemoryLib
- BaseMemoryLibMmx
- BaseMemoryLibSse2
- BaseMemoryLibRepStr
- BaseMemoryLibOptDxe
- BaseMemoryLibOptPei
- PeiMemoryLib
- DxeMemoryLib
-
**/
#ifndef __MEM_LIB_INTERNALS__
#define __MEM_LIB_INTERNALS__
-
#include <Uefi.h>
-
#include <Library/BaseMemoryLib.h>
+#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
-#include <Library/BaseLib.h>
/**
Copies a source buffer to a destination buffer, and returns the destination buffer.
@@ -79,7 +66,7 @@ InternalMemSetMem (
Fills a target buffer with a 16-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 16-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -97,7 +84,7 @@ InternalMemSetMem16 (
Fills a target buffer with a 32-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 32-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -115,7 +102,7 @@ InternalMemSetMem32 (
Fills a target buffer with a 64-bit value, and returns the target buffer.
@param Buffer Pointer to the target buffer to fill.
- @param Length Number of bytes in Buffer to fill.
+ @param Length Count of 64-bit value to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
@@ -171,7 +158,7 @@ InternalMemCompareMem (
matching 8-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 8-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -190,7 +177,7 @@ InternalMemScanMem8 (
matching 16-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 16-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -209,7 +196,7 @@ InternalMemScanMem16 (
matching 32-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 32-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@@ -228,7 +215,7 @@ InternalMemScanMem32 (
matching 64-bit value in the target buffer.
@param Buffer Pointer to the target buffer to scan.
- @param Length Number of bytes in Buffer to scan. Must be non-zero.
+ @param Length Count of 64-bit value to scan. Must be non-zero.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c
index e7128e9..f8b3ab9 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c
index 7683910..d31b13f 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c
@@ -9,9 +9,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c
index e3b2688..6d7acf3 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c
index d17b3a7..2add784 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
index 4c357b3..d74b80f 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem16() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,7 +9,16 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
+
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/MdePkg/Library/UefiMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/UefiMemoryLib/SetMem32Wrapper.c
index 89cd42f..dc84d20 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMem32Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMem32Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem32() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,10 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-**/
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/UefiMemoryLib/SetMem64Wrapper.c b/MdePkg/Library/UefiMemoryLib/SetMem64Wrapper.c
index 8235924..05dc453 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMem64Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMem64Wrapper.c
@@ -1,17 +1,7 @@
/** @file
SetMem64() implementation.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
The following BaseMemoryLib instances contain the same copy of this file:
-
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -19,10 +9,18 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
-**/
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
#include "MemLibInternals.h"
diff --git a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
index 18fbcdc..b6bc1f4 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c b/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
index 5f8df5b..2923356 100644
--- a/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
@@ -10,9 +10,9 @@
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
- DxeMemoryLib
+ UefiMemoryLib
- Copyright (c) 2006 - 2008 , Intel Corporation<BR>
+ Copyright (c) 2006 - 2009 , Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at