X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibRepStr%2FIa32%2FScanMem16.S;h=585cda6f8c8a1100328576814f3a6cdf224c0e1b;hp=a7ed192b8eefe182540450e9050a26dde028da49;hb=cfe41b57abb8ba26e4bd1c0b09c8b3506a7c55df;hpb=b1ff428c96518b7f4810eff4688d60ac7c65fba5 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S index a7ed192b8e..585cda6f8c 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S @@ -1,10 +1,10 @@ #------------------------------------------------------------------------------ # -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2006 - 2015, 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. @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------------ -.globl _InternalMemScanMem16 +ASM_GLOBAL ASM_PFX(InternalMemScanMem16) #------------------------------------------------------------------------------ # CONST VOID * @@ -40,13 +40,15 @@ # IN UINT16 Value # ); #------------------------------------------------------------------------------ -_InternalMemScanMem16: +ASM_PFX(InternalMemScanMem16): push %edi movl 12(%esp), %ecx movl 8(%esp), %edi movl 16(%esp), %eax repne scasw leal -2(%edi), %eax - cmovnz %ecx, %eax + jz L0 + movl %ecx, %eax +L0: pop %edi ret