]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm
MdePkg/BaseMemoryLibRepStr: Support IA32 processors without CMOVx
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibRepStr / Ia32 / ScanMem16.asm
index f267f1d6a9edef5d247b8766edb1746af9a92b96..c12eaff27aeed5acd7b6a250b7e73a4f2806a1f0 100644 (file)
@@ -1,10 +1,10 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2008, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
+; http://opensource.org/licenses/bsd-license.php.\r
 ;\r
 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -48,7 +48,9 @@ InternalMemScanMem16    PROC    USES    edi
     mov     eax, [esp + 16]\r
     repne   scasw\r
     lea     eax, [edi - 2]\r
-    cmovnz  eax, ecx\r
+    jz      @F\r
+    mov     eax, ecx\r
+@@:    \r
     ret\r
 InternalMemScanMem16    ENDP\r
 \r