X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibRepStr%2FX64%2FScanMem64.S;h=90f185c6ccb8885ff33a29095f145ecf0dad43cd;hb=1f558705b245d17ee9a530124b044685ea555e61;hp=917c37c3c5b6064d63d84accbf7e0275ad98ae38;hpb=132f41f0a92082775d931067089a63ca50367225;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S index 917c37c3c5..90f185c6cc 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.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 @@ -42,16 +42,15 @@ # IN UINT64 Value # ); #------------------------------------------------------------------------------ -.intel_syntax noprefix ASM_GLOBAL ASM_PFX(InternalMemScanMem64) ASM_PFX(InternalMemScanMem64): - push rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx + pushq %rdi + movq %rcx, %rdi + movq %rdx, %rcx + movq %r8, %rax repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - pop rdi + leaq -8(%rdi), %rax + cmovnz %rcx, %rax # set rax to 0 if not found + popq %rdi ret