Revision: 17214
          http://sourceforge.net/p/edk2/code/17214
Author:   mdkinney
Date:     2015-04-27 19:41:19 +0000 (Mon, 27 Apr 2015)
Log Message:
-----------
MdePkg/BaseMemoryLibRepStr: Support IA32 processors without CMOVx

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 <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
    trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf       
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf       
2015-04-27 19:41:19 UTC (rev 17214)
@@ -4,7 +4,7 @@
 #  Base Memory Library that uses REP string instructions for
 #  high performance and small size. Optimized for use in PEI.
 #
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
@@ -22,7 +22,7 @@
   MODULE_UNI_FILE                = BaseMemoryLibRepStr.uni
   FILE_GUID                      = e7884bf4-51a1-485b-982a-ff89129983bc
   MODULE_TYPE                    = BASE
-  VERSION_STRING                 = 1.0
+  VERSION_STRING                 = 1.1
   LIBRARY_CLASS                  = BaseMemoryLib 
 
 

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S      
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S      
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 # 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
@@ -47,6 +47,8 @@
     movl    16(%esp), %eax
     repne   scasw
     leal    -2(%edi), %eax
-    cmovnz  %ecx, %eax
+    jz      L0
+    movl    %ecx, %eax
+L0:    
     pop     %edi
     ret

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm    
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm    
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 ; 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
@@ -48,7 +48,9 @@
     mov     eax, [esp + 16]
     repne   scasw
     lea     eax, [edi - 2]
-    cmovnz  eax, ecx
+    jz      @F
+    mov     eax, ecx
+@@:    
     ret
 InternalMemScanMem16    ENDP
 

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S      
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S      
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 # 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
@@ -47,6 +47,8 @@
     movl    16(%esp), %eax
     repne   scasl
     leal    -4(%edi), %eax
-    cmovnz  %ecx, %eax
+    jz      L0
+    movl    %ecx, %eax
+L0:    
     pop     %edi
     ret

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm    
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm    
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 ; 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
@@ -48,7 +48,9 @@
     mov     eax, [esp + 16]
     repne   scasd
     lea     eax, [edi - 4]
-    cmovnz  eax, ecx
+    jz      @F
+    mov     eax, ecx
+@@:    
     ret
 InternalMemScanMem32    ENDP
 

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S      
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S      
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 # 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
@@ -56,6 +56,8 @@
     jne     L0
 L1:
     leal    -8(%edi), %eax
-    cmovne  %ecx, %eax
+    jz      L2
+    movl    %ecx, %eax
+L2:    
     pop     %edi
     ret

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm    
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm    
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 ; 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
@@ -57,7 +57,9 @@
     jne     @B
 @@:
     lea     eax, [edi - 8]
-    cmovne  eax, ecx
+    jz      @F
+    mov     eax, ecx
+@@:    
     ret
 InternalMemScanMem64    ENDP
 

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S       
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S       
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 # 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
@@ -47,6 +47,8 @@
     movb    16(%esp), %al
     repne   scasb
     leal    -1(%edi), %eax
-    cmovnz  %ecx, %eax
+    jz      L0
+    movl    %ecx, %eax
+L0:    
     pop     %edi
     ret

Modified: trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm
===================================================================
--- trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm     
2015-04-27 19:38:39 UTC (rev 17213)
+++ trunk/edk2/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm     
2015-04-27 19:41:19 UTC (rev 17214)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 ; 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
@@ -48,7 +48,9 @@
     mov     al, [esp + 16]
     repne   scasb
     lea     eax, [edi - 1]
-    cmovnz  eax, ecx
+    jz      @F
+    mov     eax, ecx
+@@:    
     ret
 InternalMemScanMem8 ENDP
 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to