Add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE (GH #782)
I also suspect this has something to do with GH #768 and several otherspull/795/head
parent
7969f7181f
commit
e86a6b32eb
20
config.h
20
config.h
|
|
@ -291,12 +291,26 @@ const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
|
||||||
#define CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE 1
|
#define CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Some Clang cannot handle mixed asm with positional arguments, where the
|
// Some Clang and SunCC cannot handle mixed asm with positional arguments,
|
||||||
// body is Intel style with no prefix and the templates are AT&T style.
|
// where the body is Intel style with no prefix and the templates are
|
||||||
// Define this is the Makefile misdetects the configuration.
|
// AT&T style. Define this is the Makefile misdetects the configuration.
|
||||||
// Also see https://bugs.llvm.org/show_bug.cgi?id=39895 .
|
// Also see https://bugs.llvm.org/show_bug.cgi?id=39895 .
|
||||||
// #define CRYPTOPP_DISABLE_MIXED_ASM 1
|
// #define CRYPTOPP_DISABLE_MIXED_ASM 1
|
||||||
|
|
||||||
|
// Several compilers discard SIMD code that loads unaligned data. For example,
|
||||||
|
// Power7 can load unaligned data using vec_vsx_ld but GCC and Clang require
|
||||||
|
// 16-byte aligned arrays when using builtin function. Define this to disable
|
||||||
|
// Crypto++ code that uses problematic builtins or intrinsics.
|
||||||
|
// #define CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE 1
|
||||||
|
|
||||||
|
// This list will probably grow over time as more compilers are identified.
|
||||||
|
#if defined(CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE)
|
||||||
|
# define CRYPTOPP_DISABLE_LEA_SIMD 1
|
||||||
|
# define CRYPTOPP_DISABLE_SIMON_SIMD 1
|
||||||
|
# define CRYPTOPP_DISABLE_SPECK_SIMD 1
|
||||||
|
# define CRYPTOPP_DISABLE_SM4_SIMD 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// define hword, word, and dword. these are used for multiprecision integer arithmetic
|
// define hword, word, and dword. these are used for multiprecision integer arithmetic
|
||||||
// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
|
// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
|
||||||
#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
|
#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
|
||||||
|
|
|
||||||
4
lea.h
4
lea.h
|
|
@ -16,7 +16,9 @@
|
||||||
#include "algparam.h"
|
#include "algparam.h"
|
||||||
|
|
||||||
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||||
# define CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_LEA_SIMD
|
||||||
|
# define CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Yet another SunStudio/SunCC workaround. Failed self tests
|
// Yet another SunStudio/SunCC workaround. Failed self tests
|
||||||
|
|
|
||||||
8
simon.h
8
simon.h
|
|
@ -20,13 +20,17 @@
|
||||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||||
# define CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_SIMON_SIMD
|
||||||
|
# define CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||||
# define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_SIMON_SIMD
|
||||||
|
# define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Yet another SunStudio/SunCC workaround. Failed self tests
|
// Yet another SunStudio/SunCC workaround. Failed self tests
|
||||||
|
|
|
||||||
4
sm4.h
4
sm4.h
|
|
@ -19,7 +19,9 @@
|
||||||
#include "secblock.h"
|
#include "secblock.h"
|
||||||
|
|
||||||
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86)
|
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86)
|
||||||
# define CRYPTOPP_SM4_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_SM4_SIMD
|
||||||
|
# define CRYPTOPP_SM4_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
|
||||||
8
speck.h
8
speck.h
|
|
@ -20,13 +20,17 @@
|
||||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||||
# define CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_SPECK_SIMD
|
||||||
|
# define CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||||
# define CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 1
|
# ifndef CRYPTOPP_DISABLE_SPECK_SIMD
|
||||||
|
# define CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Yet another SunStudio/SunCC workaround. Failed self tests
|
// Yet another SunStudio/SunCC workaround. Failed self tests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue