Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf    |  2 +-
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf     |  2 +-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf |  2 +-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf     |  2 +-
 .../BaseCryptLib/SysCall/Ia32/MathLShiftS64.S      | 62 ----------------------
 .../BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm   | 54 +++++++++++++++++++
 6 files changed, 58 insertions(+), 66 deletions(-)
 delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.S
 create mode 100644 
CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm

diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
index b1a28a8..5cfe308 100644
--- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -72,7 +72,7 @@
   SysCall/Ia32/MathMultS64x64.nasm  | GCC
   SysCall/Ia32/MathDivU64x64.nasm   | GCC
   SysCall/Ia32/MathRemainderU64x64.nasm | GCC
-  SysCall/Ia32/MathLShiftS64.S      | GCC
+  SysCall/Ia32/MathLShiftS64.nasm   | GCC
   SysCall/Ia32/MathRShiftU64.S      | GCC
 
   Rand/CryptRandTsc.c
diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index 26b5562..c39c7e5 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -82,7 +82,7 @@
   SysCall/Ia32/MathMultS64x64.nasm  | GCC
   SysCall/Ia32/MathDivU64x64.nasm   | GCC
   SysCall/Ia32/MathRemainderU64x64.nasm | GCC
-  SysCall/Ia32/MathLShiftS64.S      | GCC
+  SysCall/Ia32/MathLShiftS64.nasm   | GCC
   SysCall/Ia32/MathRShiftU64.S      | GCC
 
 [Packages]
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
index ece9209..6903496 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -77,7 +77,7 @@
   SysCall/Ia32/MathMultS64x64.nasm  | GCC
   SysCall/Ia32/MathDivU64x64.nasm   | GCC
   SysCall/Ia32/MathRemainderU64x64.nasm | GCC
-  SysCall/Ia32/MathLShiftS64.S      | GCC
+  SysCall/Ia32/MathLShiftS64.nasm   | GCC
   SysCall/Ia32/MathRShiftU64.S      | GCC
 
   Rand/CryptRandTsc.c
diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
index 6e876ab..ee8bf48 100644
--- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -77,7 +77,7 @@
   SysCall/Ia32/MathMultS64x64.nasm  | GCC
   SysCall/Ia32/MathDivU64x64.nasm   | GCC
   SysCall/Ia32/MathRemainderU64x64.nasm | GCC
-  SysCall/Ia32/MathLShiftS64.S      | GCC
+  SysCall/Ia32/MathLShiftS64.nasm   | GCC
   SysCall/Ia32/MathRShiftU64.S      | GCC
 
   Rand/CryptRandTsc.c
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.S 
b/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.S
deleted file mode 100644
index e89f553..0000000
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.S
+++ /dev/null
@@ -1,62 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2009 - 2010, 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
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   MathLShiftS64.S
-#
-# Abstract:
-#
-#   64-bit Math Worker Function.
-#   Shifts a 64-bit signed value left by a certain number of bits.
-#
-#------------------------------------------------------------------------------
-
-    .686:
-    .code:
-
-ASM_GLOBAL ASM_PFX(__ashldi3)
-
-#------------------------------------------------------------------------------
-#
-# void __cdecl __ashldi3 (void)
-#
-#------------------------------------------------------------------------------
-ASM_PFX(__ashldi3):
-    #
-    # Handle shifting of 64 or more bits (return 0)
-    #
-    cmpb    $64, %cl
-    jae     ReturnZero
-
-    #
-    # Handle shifting of between 0 and 31 bits
-    #
-    cmpb    $32, %cl
-    jae     More32
-    shld    %cl, %eax, %edx
-    shl     %cl, %eax
-    ret
-
-    #
-    # Handle shifting of between 32 and 63 bits
-    #
-More32:
-    movl    %eax, %edx
-    xor     %eax, %eax
-    and     $31, %cl
-    shl     %cl, %edx
-    ret
-
-ReturnZero:
-    xor     %eax, %eax
-    xor     %edx, %edx
-    ret
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm 
b/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm
new file mode 100644
index 0000000..77402bb
--- /dev/null
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm
@@ -0,0 +1,54 @@
+;------------------------------------------------------------------------------
+; @file
+;   64-bit Math Worker Function.
+;   Shifts a 64-bit signed value left by a certain number of bits.
+;
+; Copyright (c) 2009 - 2014, 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
+; http://opensource.org/licenses/bsd-license.php.
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;------------------------------------------------------------------------------
+
+SECTION .text
+
+;------------------------------------------------------------------------------
+;
+; void __cdecl __ashldi3 (void)
+;
+;------------------------------------------------------------------------------
+global ASM_PFX(__ashldi3)
+ASM_PFX(__ashldi3):
+    ;
+    ; Handle shifting of 64 or more bits (return 0)
+    ;
+    cmp     cl, 64
+    jae     ReturnZero
+
+    ;
+    ; Handle shifting of between 0 and 31 bits
+    ;
+    cmp     cl, 32
+    jae     More32
+    shld    edx, eax, cl
+    shl     eax, cl
+    ret
+
+    ;
+    ; Handle shifting of between 32 and 63 bits
+    ;
+More32:
+    mov     edx, eax
+    xor     eax, eax
+    and     cl, 31
+    shl     edx, cl
+    ret
+
+ReturnZero:
+    xor     eax,eax
+    xor     edx,edx
+    ret
-- 
2.1.1


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to