summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm')
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm12
1 files changed, 6 insertions, 6 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm
index 6127cc2188..77fb786d98 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm
@@ -28,20 +28,20 @@
;------------------------------------------------------------------------------
; VOID *
-; _mem_CopyMem (
+; InternalMemCopyMem (
; IN VOID *Destination,
; IN VOID *Source,
; IN UINTN Count
-; )
+; );
;------------------------------------------------------------------------------
InternalMemCopyMem PROC USES esi edi
mov esi, [esp + 16] ; esi <- Source
mov edi, [esp + 12] ; edi <- Destination
mov edx, [esp + 20] ; edx <- Count
- lea eax, [edi + edx - 1] ; eax <- End of Destination
+ lea eax, [esi + edx - 1] ; eax <- End of Source
cmp esi, edi
jae @F
- cmp eax, esi ; Overlapped?
+ cmp eax, edi ; Overlapped?
jae @CopyBackward ; Copy backward if overlapped
@@:
xor ecx, ecx
@@ -70,8 +70,8 @@ InternalMemCopyMem PROC USES esi edi
add esp, 16 ; stack cleanup
jmp @CopyBytes
@CopyBackward:
- mov edi, eax ; edi <- Last byte in Destination
- lea esi, [esi + edx - 1] ; esi <- Last byte in Source
+ mov esi, eax ; esi <- Last byte in Source
+ lea edi, [edi + edx - 1] ; edi <- Last byte in Destination
std
@CopyBytes:
mov ecx, edx