summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S')
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S12
1 files changed, 6 insertions, 6 deletions
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