X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibOptPei%2FX64%2FSetMem.S;h=e1a7eb179c640d18d7f56f6ba3d0eed8654d02ca;hp=1d4e73ced7d77ef41e5b50b91c97849ba0cbe9c3;hb=84b5877f028a20f4227a26a7b63dc2e57949fc18;hpb=373ade0eb64a522e45b1b94c15b95fb5ab417c00;ds=sidebyside diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S index 1d4e73ced7..e1a7eb179c 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S +++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S @@ -3,8 +3,8 @@ # #------------------------------------------------------------------------------ # -# Copyright (c) 2006 - 2008, Intel Corporation -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -34,15 +34,14 @@ # IN UINT8 Value # ) #------------------------------------------------------------------------------ -.intel_syntax noprefix -.globl ASM_PFX(InternalMemSetMem) +ASM_GLOBAL ASM_PFX(InternalMemSetMem) ASM_PFX(InternalMemSetMem): - push rdi - mov rax, r8 # rax = Value - mov rdi, rcx # rdi = Buffer - xchg rcx, rdx # rcx = Count, rdx = Buffer + pushq %rdi + movq %r8, %rax # rax = Value + movq %rcx, %rdi # rdi = Buffer + xchgq %rdx, %rcx # rcx = Count, rdx = Buffer rep stosb - mov rax, rdx # rax = Buffer - pop rdi + movq %rdx, %rax # rax = Buffer + popq %rdi ret