]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Restore original algorithm and add comments
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 6 Oct 2007 21:59:01 +0000 (21:59 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 6 Oct 2007 21:59:01 +0000 (21:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4033 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm

index 2c9b211516ebc95069aa3861216a51f7a334d5e6..fe1bc70f6b4b322527df671702a2f3e5ced7005e 100644 (file)
 ;    )\r
 ;------------------------------------------------------------------------------\r
 InternalMemSetMem   PROC    USES    rdi\r
-    push    rcx        ; push Buffer\r
     mov     rax, r8    ; rax = Value\r
     mov     rdi, rcx   ; rdi = Buffer\r
-    mov     rcx, rdx   ; rcx = Count\r
+    xchg    rcx, rdx   ; rcx = Count, rdx = Buffer\r
     rep     stosb\r
-    pop     rax        ; rax = Buffer\r
+    mov     rax, rdx   ; rax = Buffer\r
     ret\r
 InternalMemSetMem   ENDP\r
 \r