diff options
-rw-r--r-- | MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm | 5 |
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
|