diff options
author | Guo Mang <mang.guo@intel.com> | 2016-12-22 16:04:07 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2016-12-26 19:14:43 +0800 |
commit | a7761b860e8b8f77caa1c220e684a228988faa1c (patch) | |
tree | d5fc8e714d9d4bd60f02b2143ce3538b1649a3eb /CryptoPkg/Library/IntrinsicLib | |
parent | 08b9f4f8ea456e32f3286eb59aaa87f7f42c16d3 (diff) | |
download | edk2-platforms-a7761b860e8b8f77caa1c220e684a228988faa1c.tar.xz |
CryptoPkg: Move to new location
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'CryptoPkg/Library/IntrinsicLib')
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni | 22 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/CopyMem.c | 23 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S | 62 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c | 54 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S | 66 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c | 57 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf | 82 | ||||
-rw-r--r-- | CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 46 |
8 files changed, 0 insertions, 412 deletions
diff --git a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni b/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni deleted file mode 100644 index c40b856a49..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni +++ /dev/null @@ -1,22 +0,0 @@ -// /** @file
-// Intrinsic Routines Wrapper Library Instance.
-//
-// This module is intrinsic routines wrapper library instance.
-//
-// Copyright (c) 2010 - 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.
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Intrinsic Routines Wrapper Library Instance"
-
-#string STR_MODULE_DESCRIPTION #language en-US "This module is intrinsic routines wrapper library instance."
-
diff --git a/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/CryptoPkg/Library/IntrinsicLib/CopyMem.c deleted file mode 100644 index 6cc52b22e1..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/CopyMem.c +++ /dev/null @@ -1,23 +0,0 @@ -/** @file
- Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based
- Cryptographic Library.
-
-Copyright (c) 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.
-
-**/
-
-#include <Base.h>
-#include <Library/BaseMemoryLib.h>
-
-/* Copies bytes between buffers */
-void * memcpy (void *dest, const void *src, unsigned int count)
-{
- return CopyMem (dest, src, (UINTN)count);
-}
diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S b/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S deleted file mode 100644 index 7031a59a71..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S +++ /dev/null @@ -1,62 +0,0 @@ -#------------------------------------------------------------------------------
-#
-# Copyright (c) 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.
-#
-# 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/IntrinsicLib/Ia32/MathLShiftS64.c b/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c deleted file mode 100644 index 0c0835d400..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c +++ /dev/null @@ -1,54 +0,0 @@ -/** @file
- 64-bit Math Worker Function.
- The 32-bit versions of C compiler generate calls to library routines
- to handle 64-bit math. These functions use non-standard calling conventions.
-
-Copyright (c) 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.
-
-**/
-
-
-/*
- * Shifts a 64-bit signed value left by a particular number of bits.
- */
-__declspec(naked) void __cdecl _allshl (void)
-{
- _asm {
- ;
- ; Handle shifting of 64 or more bits (return 0)
- ;
- cmp cl, 64
- jae short ReturnZero
-
- ;
- ; Handle shifting of between 0 and 31 bits
- ;
- cmp cl, 32
- jae short 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
- }
-}
diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S b/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S deleted file mode 100644 index 24142b088e..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S +++ /dev/null @@ -1,66 +0,0 @@ -#------------------------------------------------------------------------------
-#
-# Copyright (c) 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.
-#
-# Module Name:
-#
-# MathRShiftU64.S
-#
-# Abstract:
-#
-# 64-bit Math Worker Function.
-# Shifts a 64-bit unsigned value right by a certain number of bits.
-#
-#------------------------------------------------------------------------------
-
-
- .686:
- .code:
-
-ASM_GLOBAL ASM_PFX(__ashrdi3)
-
-#------------------------------------------------------------------------------
-#
-# void __cdecl __ashrdi3 (void)
-#
-#------------------------------------------------------------------------------
-ASM_PFX(__ashrdi3):
- #
- # Checking: Only handle 64bit shifting or more
- #
- cmpb $64, %cl
- jae _Exit
-
- #
- # Handle shifting between 0 and 31 bits
- #
- cmpb $32, %cl
- jae More32
- shrd %cl, %edx, %eax
- shr %cl, %edx
- ret
-
- #
- # Handle shifting of 32-63 bits
- #
-More32:
- movl %edx, %eax
- xor %edx, %edx
- and $31, %cl
- shr %cl, %eax
- ret
-
- #
- # Invalid number (less then 32bits), return 0
- #
-_Exit:
- xor %eax, %eax
- xor %edx, %edx
- ret
diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c b/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c deleted file mode 100644 index 86b10040dd..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file
- 64-bit Math Worker Function.
- The 32-bit versions of C compiler generate calls to library routines
- to handle 64-bit math. These functions use non-standard calling conventions.
-
-Copyright (c) 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.
-
-**/
-
-
-/*
- * Shifts a 64-bit unsigned value right by a certain number of bits.
- */
-__declspec(naked) void __cdecl _aullshr (void)
-{
- _asm {
- ;
- ; Checking: Only handle 64bit shifting or more
- ;
- cmp cl, 64
- jae _Exit
-
- ;
- ; Handle shifting between 0 and 31 bits
- ;
- cmp cl, 32
- jae More32
- shrd eax, edx, cl
- shr edx, cl
- ret
-
- ;
- ; Handle shifting of 32-63 bits
- ;
-More32:
- mov eax, edx
- xor edx, edx
- and cl, 31
- shr eax, cl
- ret
-
- ;
- ; Invalid number (less then 32bits), return 0
- ;
-_Exit:
- xor eax, eax
- xor edx, edx
- ret
- }
-}
diff --git a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf b/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf deleted file mode 100644 index de61dc40ea..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +++ /dev/null @@ -1,82 +0,0 @@ -## @file
-# Intrinsic Routines Wrapper Library Instance.
-#
-# Copyright (c) 2010 - 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.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = BaseIntrinsicLib
- MODULE_UNI_FILE = BaseIntrinsicLib.uni
- FILE_GUID = 63850097-3E97-4c4f-A52D-C811A0106105
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = IntrinsicLib
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF
-#
-
-[Sources]
- MemoryIntrinsics.c
-
-[Sources.IA32]
- CopyMem.c
-
- Ia32/MathLShiftS64.c | MSFT
- Ia32/MathRShiftU64.c | MSFT
-
- Ia32/MathLShiftS64.c | INTEL
- Ia32/MathRShiftU64.c | INTEL
-
- Ia32/MathLShiftS64.S | GCC
- Ia32/MathRShiftU64.S | GCC
-
-[Sources.X64]
- CopyMem.c
-
-[Sources.IPF]
- CopyMem.c | MSFT
- CopyMem.c | INTEL
-#
-# In tools_def.txt, GCC rename symbol name memcpy to be CopyMem for IPF,
-# i.e. "DEFINE GCC_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem",
-# so there will be no source file CopyMem.c for GCC compiler family.
-#
-
-[Packages]
- MdePkg/MdePkg.dec
-
-[LibraryClasses]
- BaseMemoryLib
-
-[BuildOptions]
- #
- # Override MSFT build option to remove /Oi and /GL
- #
- MSFT:DEBUG_VS2003_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm
- MSFT:RELEASE_VS2003_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX-
- MSFT:DEBUG_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm
- MSFT:RELEASE_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX-
- MSFT:DEBUG_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
- MSFT:RELEASE_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF
- MSFT:DEBUG_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
- MSFT:RELEASE_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF
- MSFT:DEBUG_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
- MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF
- MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
- MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF
- MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /Zi
- MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32
- INTEL:*_*_*_CC_FLAGS = /Oi-
- GCC:*_*_*_CC_FLAGS = -fno-builtin
\ No newline at end of file diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c deleted file mode 100644 index 9d6867ebce..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c +++ /dev/null @@ -1,46 +0,0 @@ -/** @file
- Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based
- Cryptographic Library.
-
-Copyright (c) 2010 - 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.
-
-**/
-
-#include <Base.h>
-#include <Library/BaseMemoryLib.h>
-
-/* OpenSSL will use floating point support, and C compiler produces the _fltused
- symbol by default. Simply define this symbol here to satisfy the linker. */
-int _fltused = 1;
-
-/* Sets buffers to a specified character */
-void * memset (void *dest, char ch, unsigned int count)
-{
- //
- // NOTE: Here we use one base implementation for memset, instead of the direct
- // optimized SetMem() wrapper. Because the IntrinsicLib has to be built
- // without whole program optimization option, and there will be some
- // potential register usage errors when calling other optimized codes.
- //
-
- //
- // Declare the local variables that actually move the data elements as
- // volatile to prevent the optimizer from replacing this function with
- // the intrinsic memset()
- //
- volatile UINT8 *Pointer;
-
- Pointer = (UINT8 *)dest;
- while (count-- != 0) {
- *(Pointer++) = ch;
- }
-
- return dest;
-}
|