X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibMmx%2FX64%2FScanMem32.S;h=56ff2ea9be11c70ded55383d43505ba69800ba41;hb=1fef058f4b8fefc455bb171e4908c3e835b1b492;hp=8f1804ce06431df2a3bd5dc3113e7aa0f022e8d5;hpb=b1ff428c96518b7f4810eff4688d60ac7c65fba5;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S index 8f1804ce06..56ff2ea9be 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S +++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S @@ -3,7 +3,7 @@ # #------------------------------------------------------------------------------ # -# Copyright (c) 2006, Intel Corporation +# 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 @@ -42,16 +42,15 @@ # IN UINT32 Value # ); #------------------------------------------------------------------------------ -.intel_syntax noprefix -.globl ASM_PFX(InternalMemScanMem32) +ASM_GLOBAL ASM_PFX(InternalMemScanMem32) ASM_PFX(InternalMemScanMem32): - push rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - pop rdi + pushq %rdi + movq %rcx, %rdi + movq %r8, %rax + movq %rdx, %rcx + repne scasl + leaq -4(%rdi), %rax + cmovnz %rcx, %rax + popq %rdi ret