From b3ad302e0feaa203b2ae4cb4b9dc13bbd3fd9efe Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sat, 6 Oct 2007 21:53:01 +0000 Subject: [PATCH] Return buffer in rax git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4032 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm | 9 +++++---- 1 file 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