diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2015-04-27 19:41:19 +0000 |
---|---|---|
committer | mdkinney <mdkinney@Edk2> | 2015-04-27 19:41:19 +0000 |
commit | cfe41b57abb8ba26e4bd1c0b09c8b3506a7c55df (patch) | |
tree | f2459a745d408e65b4502d139ac2fa3d87b6a718 /MdePkg/Library | |
parent | 88a75d260cadc67cc0edf6ad5f57241ed89a7d4b (diff) | |
download | edk2-cfe41b57abb8ba26e4bd1c0b09c8b3506a7c55df.zip edk2-cfe41b57abb8ba26e4bd1c0b09c8b3506a7c55df.tar.gz edk2-cfe41b57abb8ba26e4bd1c0b09c8b3506a7c55df.tar.bz2 |
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 <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
Diffstat (limited to 'MdePkg/Library')
9 files changed, 34 insertions, 18 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf index fd63242..44287d0 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf +++ b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf @@ -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
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S index e247d4a..585cda6 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S @@ -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 @@ ASM_PFX(InternalMemScanMem16): movl 16(%esp), %eax
repne scasw
leal -2(%edi), %eax
- cmovnz %ecx, %eax
+ jz L0
+ movl %ecx, %eax
+L0:
pop %edi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm index 0ee190e..c12eaff 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm @@ -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 @@ InternalMemScanMem16 PROC USES edi mov eax, [esp + 16]
repne scasw
lea eax, [edi - 2]
- cmovnz eax, ecx
+ jz @F
+ mov eax, ecx
+@@:
ret
InternalMemScanMem16 ENDP
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S index 066fde4..91f04fa 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S @@ -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 @@ ASM_PFX(InternalMemScanMem32): movl 16(%esp), %eax
repne scasl
leal -4(%edi), %eax
- cmovnz %ecx, %eax
+ jz L0
+ movl %ecx, %eax
+L0:
pop %edi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm index adbf295..b065620 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm @@ -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 @@ InternalMemScanMem32 PROC USES edi mov eax, [esp + 16]
repne scasd
lea eax, [edi - 4]
- cmovnz eax, ecx
+ jz @F
+ mov eax, ecx
+@@:
ret
InternalMemScanMem32 ENDP
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S index b3435d7..5224cf7 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S @@ -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 @@ L0: jne L0
L1:
leal -8(%edi), %eax
- cmovne %ecx, %eax
+ jz L2
+ movl %ecx, %eax
+L2:
pop %edi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm index 0a0f5d0..96e3b99 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm @@ -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 @@ InternalMemScanMem64 PROC USES edi jne @B
@@:
lea eax, [edi - 8]
- cmovne eax, ecx
+ jz @F
+ mov eax, ecx
+@@:
ret
InternalMemScanMem64 ENDP
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S index 5e451fd..d490ee7 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S @@ -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 @@ ASM_PFX(InternalMemScanMem8): movb 16(%esp), %al
repne scasb
leal -1(%edi), %eax
- cmovnz %ecx, %eax
+ jz L0
+ movl %ecx, %eax
+L0:
pop %edi
ret
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm index c64d41d..202d58f 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm @@ -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 @@ InternalMemScanMem8 PROC USES edi mov al, [esp + 16]
repne scasb
lea eax, [edi - 1]
- cmovnz eax, ecx
+ jz @F
+ mov eax, ecx
+@@:
ret
InternalMemScanMem8 ENDP
|