summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLibMmx
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:11:33 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:47 +0800
commit9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 (patch)
tree15a2cb1a7907a9114ee79130699ce7d324c942ea /MdePkg/Library/BaseMemoryLibMmx
parentd1102dba7210b95e41d06c2338a22ba6af248645 (diff)
downloadedk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.tar.gz
edk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.tar.bz2
edk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.zip
MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx')
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c6
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c6
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c10
-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.c10
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S10
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S12
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S10
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S10
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S10
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S8
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S6
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S20
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S6
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S4
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c6
20 files changed, 76 insertions, 76 deletions
diff --git a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
index da6589a6a4..d17fcf24b6 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
+++ b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
@@ -23,7 +23,7 @@
FILE_GUID = d458a654-f64c-49db-b8d1-3821306bf1f6
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = BaseMemoryLib
+ LIBRARY_CLASS = BaseMemoryLib
#
diff --git a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
index c59000dc04..3a37a70e53 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c
@@ -11,7 +11,7 @@
PeiMemoryLib
UefiMemoryLib
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
-
+
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@return 0 All Length bytes of the two buffers are identical.
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
-
+
**/
INTN
EFIAPI
diff --git a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
index 9b76f0f1e1..437253339f 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c
@@ -2,7 +2,7 @@
CopyMem() implementation.
The following BaseMemoryLib instances contain the same copy of this file:
-
+
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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
@@ -31,7 +31,7 @@
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
DestinationBuffer. The implementation must be reentrant, and it must handle the case
where SourceBuffer overlaps DestinationBuffer.
-
+
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
index cbb385fddf..4cc95d3aab 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
@@ -2,7 +2,7 @@
Implementation of GUID functions.
The following BaseMemoryLib instances contain the same copy of this file:
-
+
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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 +30,7 @@
This function copies the contents of the 128-bit GUID specified by SourceGuid to
DestinationGuid, and returns DestinationGuid.
-
+
If DestinationGuid is NULL, then ASSERT().
If SourceGuid is NULL, then ASSERT().
@@ -63,7 +63,7 @@ CopyGuid (
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.
If there are any bit differences in the two GUIDs, then FALSE is returned.
-
+
If Guid1 is NULL, then ASSERT().
If Guid2 is NULL, then ASSERT().
@@ -103,7 +103,7 @@ CompareGuid (
GUID value that matches Guid. If a match is found, then a pointer to the matching
GUID in the target buffer is returned. If no match is found, then NULL is returned.
If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 128-bit boundary, then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
index 4fd75fa212..3eb0cbb213 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +33,7 @@
address to the highest address for a 16-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
index defd510c55..cf70a91878 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
@@ -11,7 +11,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +32,7 @@
address to the highest address for a 32-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
index fceb6d12bf..19f98fa1f9 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +33,7 @@
address to the highest address for a 64-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
index efbbe20a70..ef63a54b71 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +33,7 @@
address to the highest address for an 8-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@@ -57,19 +57,19 @@ ScanMem8 (
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
-
+
return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
}
/**
- Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
+ Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
UINTN sized value in the target buffer.
This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for a UINTN sized value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a UINTN boundary, then ASSERT().
If Length is not aligned on a UINTN boundary, then ASSERT().
diff --git a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
index 8a3392718f..6e86472ace 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
@@ -12,7 +12,7 @@
PeiMemoryLib
UefiMemoryLib
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +29,7 @@
Fills a target buffer with a byte value, and returns the target buffer.
This function fills Length bytes of Buffer with Value, and returns Buffer.
-
+
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer The memory to set.
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
index 590240591b..ee6bbe2715 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -46,13 +46,13 @@ ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
pushq %rsi
pushq %rdi
- movq %rcx, %rsi
- movq %rdx, %rdi
- movq %r8, %rcx
+ movq %rcx, %rsi
+ movq %rdx, %rdi
+ movq %r8, %rcx
repe cmpsb
movzbq -1(%rsi), %rax
movzbq -1(%rdi), %rdx
- subq %rdx, %rax
+ 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 1d87e2d63a..42a1e28df9 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -40,14 +40,14 @@ ASM_PFX(InternalMemCopyMem):
pushq %rdi
movq %rdx, %rsi # rsi <- Source
movq %rcx, %rdi # rdi <- Destination
- leaq -1(%rsi, %r8,), %r9 # r9 <- End of Source
- cmpq %rdi, %rsi
+ leaq -1(%rsi, %r8,), %r9 # r9 <- End of Source
+ cmpq %rdi, %rsi
movq %rdi, %rax # rax <- Destination as return value
jae L0
cmpq %rdi, %r9
jae L_CopyBackward # Copy backward if overlapped
L0:
- movq %r8, %rcx
+ movq %r8, %rcx
andq $7, %r8
shrq $3, %rcx # rcx <- # of Qwords to copy
jz L_CopyBytes
@@ -55,7 +55,7 @@ L0:
L1:
movq (%rsi), %mm0
movntq %mm0, (%rdi)
- addq $8, %rsi
+ addq $8, %rsi
addq $8, %rdi
loop L1
mfence
@@ -66,7 +66,7 @@ L_CopyBackward:
leaq -1(%rdi, %r8,), %rdi # rdi <- End of Destination
std # set direction flag
L_CopyBytes:
- movq %r8, %rcx
+ movq %r8, %rcx
rep movsb # Copy bytes backward
cld
popq %rdi
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
index 8f1899606a..358651419a 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -45,12 +45,12 @@
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
pushq %rdi
- movq %rcx, %rdi
- movq %r8, %rax
- movq %rdx, %rcx
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasw
leaq -2(%rdi), %rax
- cmovnz %rcx, %rax
+ cmovnz %rcx, %rax
popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
index 05b6f6489a..93e6cc2f13 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -45,12 +45,12 @@
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
pushq %rdi
- movq %rcx, %rdi
- movq %r8, %rax
- movq %rdx, %rcx
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasl
leaq -4(%rdi), %rax
- cmovnz %rcx, %rax
+ cmovnz %rcx, %rax
popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
index dd7c1b8634..2e59c8dd52 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -45,11 +45,11 @@
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
pushq %rdi
- movq %rcx, %rdi
- movq %r8, %rax
- movq %rdx, %rcx
+ movq %rcx, %rdi
+ movq %r8, %rax
+ movq %rdx, %rcx
repne scasq
leaq -8(%rdi), %rax
- cmovnz %rcx, %rax
+ cmovnz %rcx, %rax
popq %rdi
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
index 4f3b950a34..4bdacf7e01 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -45,9 +45,9 @@
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
pushq %rdi
- movq %rcx, %rdi
- movq %rdx, %rcx
- movq %r8, %rax
+ 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
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
index ad7131f300..16ccb3fc1d 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -43,12 +43,12 @@ ASM_PFX(InternalMemSetMem):
movq %rcx, %r8
movq %r8, %rdi # rdi <- Buffer
movq %rdx, %rcx
- andq $7, %rdx
+ andq $7, %rdx
shrq $3, %rcx
jz L_SetBytes
.byte 0x0f, 0x70, 0x0C0, 0x00
L0:
- movntq %mm0, (%rdi)
+ movntq %mm0, (%rdi)
addq $8, %rdi
loop L0
mfence
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
index c947afd370..4f77bacf14 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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,22 +37,22 @@
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
pushq %rdi
- movq %r8, %rax
- movd %rax, %mm0
- movq %rcx, %r8
- movq %r8, %rdi
- movq %rdx, %rcx
- andl $3, %edx
+ movq %r8, %rax
+ movd %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 %mm0, (%rdi)
- addq $8, %rdi
+ movntq %mm0, (%rdi)
+ addq $8, %rdi
loop L0
mfence
L_SetWords:
- movl %edx, %ecx
+ movl %edx, %ecx
rep stosw
movq %r8, %rax
popq %rdi
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
index 4ab8e3a21d..82c7cbf4d6 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -43,13 +43,13 @@ ASM_PFX(InternalMemSetMem32):
jz L_SetDwords
.byte 0x0f, 0x70, 0x0C0, 0x44
L0:
- movntq %mm0, (%rdx)
+ movntq %mm0, (%rdx)
leaq 8(%rdx), %rdx # use "lea" to avoid flag changes
loop L0
mfence
L_SetDwords:
jnc L1
- movd %mm0, (%rdx)
+ movd %mm0, (%rdx)
L1:
ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
index a4c7d8cb62..110c6f2d9c 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -39,7 +39,7 @@ ASM_PFX(InternalMemSetMem64):
movq %rcx, %rax #rax <- Buffer
xchg %rdx, %rcx #rcx <- Count
L0:
- movntq %mm0, (%rdx)
+ movntq %mm0, (%rdx)
addq $8, %rdx
loop L0
mfence
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
index 9dd0b45e18..9ab315b8cf 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
@@ -11,8 +11,8 @@
BaseMemoryLibOptPei
PeiMemoryLib
UefiMemoryLib
-
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
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,7 +29,7 @@
Fills a target buffer with zeros, and returns the target buffer.
This function fills Length bytes of Buffer with zeros, and returns Buffer.
-
+
If Length > 0 and Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().