]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/BaseMemoryLibRepStr: Support IA32 processors without CMOVx
authorMichael Kinney <michael.d.kinney@intel.com>
Mon, 27 Apr 2015 19:41:19 +0000 (19:41 +0000)
committermdkinney <mdkinney@Edk2>
Mon, 27 Apr 2015 19:41:19 +0000 (19:41 +0000)
Remove use of CMOVx instruction from IA32 assembly files in BaseMemoryLibRepStr.
This matches compiler flags for all supported C compilers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17214 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm

index fd6324284e3197954ca8fda1a484cd6b6c95f889..44287d05dc6bc1518c5cd0664316fd96609e6c45 100644 (file)
@@ -4,7 +4,7 @@
 #  Base Memory Library that uses REP string instructions for\r
 #  high performance and small size. Optimized for use in PEI.\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -22,7 +22,7 @@
   MODULE_UNI_FILE                = BaseMemoryLibRepStr.uni\r
   FILE_GUID                      = e7884bf4-51a1-485b-982a-ff89129983bc\r
   MODULE_TYPE                    = BASE\r
-  VERSION_STRING                 = 1.0\r
+  VERSION_STRING                 = 1.1\r
   LIBRARY_CLASS                  = BaseMemoryLib \r
 \r
 \r
index e247d4ad09837ae2c48bb51692bb1a6402b1526e..585cda6f8c8a1100328576814f3a6cdf224c0e1b 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
@@ -47,6 +47,8 @@ ASM_PFX(InternalMemScanMem16):
     movl    16(%esp), %eax\r
     repne   scasw\r
     leal    -2(%edi), %eax\r
-    cmovnz  %ecx, %eax\r
+    jz      L0\r
+    movl    %ecx, %eax\r
+L0:    \r
     pop     %edi\r
     ret\r
index 0ee190e46a49c037c8f76fe97bb36db948a85478..c12eaff27aeed5acd7b6a250b7e73a4f2806a1f0 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 @@ 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
index 066fde42ced824eeafb772dcf0c0128915883a21..91f04fa8004bd3c409510b3f74c90cf9a93c57ec 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
@@ -47,6 +47,8 @@ ASM_PFX(InternalMemScanMem32):
     movl    16(%esp), %eax\r
     repne   scasl\r
     leal    -4(%edi), %eax\r
-    cmovnz  %ecx, %eax\r
+    jz      L0\r
+    movl    %ecx, %eax\r
+L0:    \r
     pop     %edi\r
     ret\r
index adbf295621b1de65b5ada9cd2a0957f86473ab43..b065620594ee009122c0f13c2db740f198c07617 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 @@ InternalMemScanMem32    PROC    USES    edi
     mov     eax, [esp + 16]\r
     repne   scasd\r
     lea     eax, [edi - 4]\r
-    cmovnz  eax, ecx\r
+    jz      @F\r
+    mov     eax, ecx\r
+@@:    \r
     ret\r
 InternalMemScanMem32    ENDP\r
 \r
index b3435d7fc3f1b4d01a6deb7ef4ea89039ee71a0c..5224cf7153a399b2d462f1a2d466b1eb4f38c848 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
@@ -56,6 +56,8 @@ L0:
     jne     L0\r
 L1:\r
     leal    -8(%edi), %eax\r
-    cmovne  %ecx, %eax\r
+    jz      L2\r
+    movl    %ecx, %eax\r
+L2:    \r
     pop     %edi\r
     ret\r
index 0a0f5d0468577eb52b54ea5c762184bee803319b..96e3b99f7260858cdf49342361a5a23015af0703 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
@@ -57,7 +57,9 @@ InternalMemScanMem64    PROC    USES    edi
     jne     @B\r
 @@:\r
     lea     eax, [edi - 8]\r
-    cmovne  eax, ecx\r
+    jz      @F\r
+    mov     eax, ecx\r
+@@:    \r
     ret\r
 InternalMemScanMem64    ENDP\r
 \r
index 5e451fd7b93d3aa12e4abf09fcddde907a7a14a0..d490ee7fd0451532119858e966fb1af0eb536f17 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
@@ -47,6 +47,8 @@ ASM_PFX(InternalMemScanMem8):
     movb    16(%esp), %al\r
     repne   scasb\r
     leal    -1(%edi), %eax\r
-    cmovnz  %ecx, %eax\r
+    jz      L0\r
+    movl    %ecx, %eax\r
+L0:    \r
     pop     %edi\r
     ret\r
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