]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm
MdePkg/BaseMemoryLibRepStr: Support IA32 processors without CMOVx
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibRepStr / Ia32 / ScanMem8.asm
index c64d41d6c1c2d845f7ddb6ed4316a045ab42b33c..202d58f790fa73315d5b11ab9d6f6e6c3de0a003 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\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
@@ -48,7 +48,9 @@ InternalMemScanMem8 PROC    USES    edi
     mov     al, [esp + 16]\r
     repne   scasb\r
     lea     eax, [edi - 1]\r
-    cmovnz  eax, ecx\r
+    jz      @F\r
+    mov     eax, ecx\r
+@@:    \r
     ret\r
 InternalMemScanMem8 ENDP\r
 \r