X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibMmx%2FX64%2FScanMem16.S;h=8f1899606af3047f96f284d8da6b1c650b885685;hp=b777aac426488ab4c36d1c1e3cd3c0f36c498290;hb=2fc59a003ed9104f9feebe0e418f2a04a50f3284;hpb=b1ff428c96518b7f4810eff4688d60ac7c65fba5 diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S index b777aac426..8f1899606a 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S +++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S @@ -3,11 +3,11 @@ # #------------------------------------------------------------------------------ # -# Copyright (c) 2006, 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 +# http://opensource.org/licenses/bsd-license.php. # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -42,16 +42,15 @@ # IN UINT16 Value # ); #------------------------------------------------------------------------------ -.intel_syntax noprefix -.globl ASM_PFX(InternalMemScanMem16) +ASM_GLOBAL ASM_PFX(InternalMemScanMem16) ASM_PFX(InternalMemScanMem16): - push rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx + pushq %rdi + movq %rcx, %rdi + movq %r8, %rax + movq %rdx, %rcx repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - pop rdi + leaq -2(%rdi), %rax + cmovnz %rcx, %rax + popq %rdi ret