summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:59:01 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:59:01 +0000
commit9b7c438b983edfb0b9682b361f3c3f1967357b78 (patch)
tree165d684a03166f0288f4235a4e1edb5402b061e8
parentb3ad302e0feaa203b2ae4cb4b9dc13bbd3fd9efe (diff)
downloadedk2-platforms-9b7c438b983edfb0b9682b361f3c3f1967357b78.tar.xz
Restore original algorithm and add comments
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4033 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm5
1 files changed, 2 insertions, 3 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
index 2c9b211516..fe1bc70f6b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
@@ -33,12 +33,11 @@
; )
;------------------------------------------------------------------------------
InternalMemSetMem PROC USES rdi
- push rcx ; push Buffer
mov rax, r8 ; rax = Value
mov rdi, rcx ; rdi = Buffer
- mov rcx, rdx ; rcx = Count
+ xchg rcx, rdx ; rcx = Count, rdx = Buffer
rep stosb
- pop rax ; rax = Buffer
+ mov rax, rdx ; rax = Buffer
ret
InternalMemSetMem ENDP