summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:53:01 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:53:01 +0000
commitb3ad302e0feaa203b2ae4cb4b9dc13bbd3fd9efe (patch)
tree51a454b0cec2a62481153eaf220cacf505a6f024
parenta326286cb1b3b80e31e1c21cf9a60200d9bb77df (diff)
downloadedk2-platforms-b3ad302e0feaa203b2ae4cb4b9dc13bbd3fd9efe.tar.xz
Return buffer in rax
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4032 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm9
1 files changed, 5 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
index 5306520169..2c9b211516 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
+++ b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm
@@ -33,11 +33,12 @@
; )
;------------------------------------------------------------------------------
InternalMemSetMem PROC USES rdi
- mov rax, r8
- mov rdi, rcx
- xchg rcx, rdx
+ push rcx ; push Buffer
+ mov rax, r8 ; rax = Value
+ mov rdi, rcx ; rdi = Buffer
+ mov rcx, rdx ; rcx = Count
rep stosb
- mov rax, rdx
+ pop rax ; rax = Buffer
ret
InternalMemSetMem ENDP