mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Move M128_CAST and CONST_M128_CAST to config_asm.h
This commit is contained in:
parent
67daaa2560
commit
fee14910ea
@ -23,10 +23,6 @@
|
|||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
// Squash MS LNK4221 and libtool warnings
|
// Squash MS LNK4221 and libtool warnings
|
||||||
extern const char ARIA_SIMD_FNAME[] = __FILE__;
|
extern const char ARIA_SIMD_FNAME[] = __FILE__;
|
||||||
|
|
||||||
|
@ -211,6 +211,12 @@
|
|||||||
# undef CRYPTOPP_CLMUL_AVAILABLE
|
# undef CRYPTOPP_CLMUL_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
||||||
|
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
||||||
|
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
||||||
|
#define M256_CAST(x) ((__m256i *)(void *)(x))
|
||||||
|
#define CONST_M256_CAST(x) ((const __m256i *)(const void *)(x))
|
||||||
|
|
||||||
#endif // CRYPTOPP_DISABLE_ASM
|
#endif // CRYPTOPP_DISABLE_ASM
|
||||||
|
|
||||||
#endif // X86, X32, X64
|
#endif // X86, X32, X64
|
||||||
|
4
gcm.cpp
4
gcm.cpp
@ -44,10 +44,6 @@ NAMESPACE_BEGIN(CryptoPP)
|
|||||||
#endif
|
#endif
|
||||||
#endif // CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|
#endif // CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
word16 GCM_Base::s_reductionTable[256];
|
word16 GCM_Base::s_reductionTable[256];
|
||||||
volatile bool GCM_Base::s_reductionTableInitialized = false;
|
volatile bool GCM_Base::s_reductionTableInitialized = false;
|
||||||
|
|
||||||
|
@ -56,8 +56,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#define UINT64_CAST(x) ((uint64_t *)(void *)(x))
|
#define UINT64_CAST(x) ((uint64_t *)(void *)(x))
|
||||||
#define CONST_UINT64_CAST(x) ((const uint64_t *)(const void *)(x))
|
#define CONST_UINT64_CAST(x) ((const uint64_t *)(const void *)(x))
|
||||||
|
|
||||||
|
@ -54,10 +54,6 @@ CRYPTOPP_ALIGN_DATA(16)
|
|||||||
const word64
|
const word64
|
||||||
rho56[2] = {W64LIT(0x0007060504030201), W64LIT(0x080F0E0D0C0B0A09)};
|
rho56[2] = {W64LIT(0x0007060504030201), W64LIT(0x080F0E0D0C0B0A09)};
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
#if defined(__XOP__)
|
#if defined(__XOP__)
|
||||||
# define ROL64in128(a, o) _mm_roti_epi64((a), (o))
|
# define ROL64in128(a, o) _mm_roti_epi64((a), (o))
|
||||||
# define ROL64in128_8(a) ROL64in128((a), 8)
|
# define ROL64in128_8(a) ROL64in128((a), 8)
|
||||||
|
@ -46,8 +46,6 @@
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_LSH256_SSE2_AVAILABLE)
|
#if defined(CRYPTOPP_LSH256_SSE2_AVAILABLE)
|
||||||
# include <emmintrin.h>
|
# include <emmintrin.h>
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
# if defined(__XOP__)
|
# if defined(__XOP__)
|
||||||
# include <ammintrin.h>
|
# include <ammintrin.h>
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
@ -62,16 +60,10 @@
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_LSH256_AVX_AVAILABLE)
|
#if defined(CRYPTOPP_LSH256_AVX_AVAILABLE)
|
||||||
# include <immintrin.h>
|
# include <immintrin.h>
|
||||||
# define M256_CAST(x) ((__m256i *)(void *)(x))
|
|
||||||
# define CONST_M256_CAST(x) ((const __m256i *)(const void *)(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CRYPTOPP_HAVE_ATTRIBUTE_TARGET)
|
#if defined(CRYPTOPP_HAVE_ATTRIBUTE_TARGET)
|
||||||
# include <x86intrin.h>
|
# include <x86intrin.h>
|
||||||
# undef M128_CAST
|
|
||||||
# undef CONST_M128_CAST
|
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ANONYMOUS_NAMESPACE_BEGIN
|
ANONYMOUS_NAMESPACE_BEGIN
|
||||||
|
@ -46,8 +46,6 @@
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_LSH512_SSE2_AVAILABLE)
|
#if defined(CRYPTOPP_LSH512_SSE2_AVAILABLE)
|
||||||
# include <emmintrin.h>
|
# include <emmintrin.h>
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
# if defined(__XOP__)
|
# if defined(__XOP__)
|
||||||
# include <ammintrin.h>
|
# include <ammintrin.h>
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
@ -62,8 +60,6 @@
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_LSH512_AVX_AVAILABLE)
|
#if defined(CRYPTOPP_LSH512_AVX_AVAILABLE)
|
||||||
# include <immintrin.h>
|
# include <immintrin.h>
|
||||||
# define M256_CAST(x) ((__m256i *)(void *)(x))
|
|
||||||
# define CONST_M256_CAST(x) ((const __m256i *)(const void *)(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CRYPTOPP_LSH512_AVX2_AVAILABLE)
|
#if defined(CRYPTOPP_LSH512_AVX2_AVAILABLE)
|
||||||
@ -72,10 +68,6 @@
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_HAVE_ATTRIBUTE_TARGET)
|
#if defined(CRYPTOPP_HAVE_ATTRIBUTE_TARGET)
|
||||||
# include <x86intrin.h>
|
# include <x86intrin.h>
|
||||||
# undef M128_CAST
|
|
||||||
# undef CONST_M128_CAST
|
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ANONYMOUS_NAMESPACE_BEGIN
|
ANONYMOUS_NAMESPACE_BEGIN
|
||||||
|
@ -61,10 +61,6 @@
|
|||||||
# define EXCEPTION_EXECUTE_HANDLER 1
|
# define EXCEPTION_EXECUTE_HANDLER 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
// Squash MS LNK4221 and libtool warnings
|
// Squash MS LNK4221 and libtool warnings
|
||||||
extern const char RIJNDAEL_SIMD_FNAME[] = __FILE__;
|
extern const char RIJNDAEL_SIMD_FNAME[] = __FILE__;
|
||||||
|
|
||||||
|
@ -47,10 +47,6 @@
|
|||||||
# define EXCEPTION_EXECUTE_HANDLER 1
|
# define EXCEPTION_EXECUTE_HANDLER 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clang intrinsic casts
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
// Squash MS LNK4221 and libtool warnings
|
// Squash MS LNK4221 and libtool warnings
|
||||||
extern const char SHA_SIMD_FNAME[] = __FILE__;
|
extern const char SHA_SIMD_FNAME[] = __FILE__;
|
||||||
|
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
# include <immintrin.h>
|
# include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
|
|
||||||
// Squash MS LNK4221 and libtool warnings
|
// Squash MS LNK4221 and libtool warnings
|
||||||
extern const char SHACAL2_SIMD_FNAME[] = __FILE__;
|
extern const char SHACAL2_SIMD_FNAME[] = __FILE__;
|
||||||
|
|
||||||
|
@ -286,14 +286,6 @@ inline void SIMON128_Dec_6_Blocks(uint64x2_t &block0, uint64x2_t &block1,
|
|||||||
|
|
||||||
#if (CRYPTOPP_SSSE3_AVAILABLE)
|
#if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#ifndef M128_CAST
|
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#endif
|
|
||||||
#ifndef CONST_M128_CAST
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// GCC double casts, https://www.spinics.net/lists/gcchelp/msg47735.html
|
// GCC double casts, https://www.spinics.net/lists/gcchelp/msg47735.html
|
||||||
#ifndef DOUBLE_CAST
|
#ifndef DOUBLE_CAST
|
||||||
# define DOUBLE_CAST(x) ((double *)(void *)(x))
|
# define DOUBLE_CAST(x) ((double *)(void *)(x))
|
||||||
|
@ -261,14 +261,6 @@ inline void SPECK128_Dec_6_Blocks(uint64x2_t &block0, uint64x2_t &block1,
|
|||||||
|
|
||||||
#if defined(CRYPTOPP_SSSE3_AVAILABLE)
|
#if defined(CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
|
|
||||||
// Clang intrinsic casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
|
||||||
#ifndef M128_CAST
|
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
#endif
|
|
||||||
#ifndef CONST_M128_CAST
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// GCC double casts, https://www.spinics.net/lists/gcchelp/msg47735.html
|
// GCC double casts, https://www.spinics.net/lists/gcchelp/msg47735.html
|
||||||
#ifndef DOUBLE_CAST
|
#ifndef DOUBLE_CAST
|
||||||
# define DOUBLE_CAST(x) ((double *)(void *)(x))
|
# define DOUBLE_CAST(x) ((double *)(void *)(x))
|
||||||
|
3
xts.cpp
3
xts.cpp
@ -22,9 +22,6 @@
|
|||||||
// 0.3 to 0.4 cpb profit
|
// 0.3 to 0.4 cpb profit
|
||||||
#if defined(__SSE2__) || defined(_M_X64)
|
#if defined(__SSE2__) || defined(_M_X64)
|
||||||
# include <emmintrin.h>
|
# include <emmintrin.h>
|
||||||
// Clang intrinsic casts
|
|
||||||
# define M128_CAST(x) ((__m128i *)(void *)(x))
|
|
||||||
# define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64)
|
#if defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64)
|
||||||
|
Loading…
Reference in New Issue
Block a user