mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Update comments in config.h
Some comments in config.h were old. Time for a refresh. Switch from CRYPTOPP_BOOL_ARM64 to CRYPTOPP_BOOL_ARMV8. Aarch32 is ARMv8, and that's the important part.
This commit is contained in:
parent
fbb9b40397
commit
0aa217b91c
@ -14,3 +14,5 @@ mkdir -p "$ANDROID_NDK_ROOT"
|
||||
|
||||
# https://stackoverflow.com/a/47028911/608639
|
||||
touch "$ANDROID_HOME/repositories.cfg"
|
||||
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0
|
||||
|
33
config.h
33
config.h
@ -57,7 +57,7 @@
|
||||
|
||||
// Define this to disable ASM, intrinsics and built-ins. The library will be
|
||||
// compiled using C++ only. The library code will not include SSE2 (and
|
||||
// above), NEON, Aarch32, Aarch64, Power4, Power7 or Power8. Note the compiler
|
||||
// above), NEON, Aarch32, Aarch64, or Altivec (and above). Note the compiler
|
||||
// may use higher ISAs depending on compiler options, but the library will not
|
||||
// explictly use the ISAs. When disabling ASM, it is best to do it from
|
||||
// config.h to ensure the library and all programs share the setting.
|
||||
@ -400,16 +400,8 @@ NAMESPACE_END
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// 4127: conditional expression is constant
|
||||
// 4231: nonstandard extension used : 'extern' before template explicit instantiation
|
||||
// 4250: dominance
|
||||
// 4251: member needs to have dll-interface
|
||||
// 4275: base needs to have dll-interface
|
||||
// 4505: unreferenced local function
|
||||
// 4512: assignment operator not generated
|
||||
// 4660: explicitly instantiating a class that's already implicitly instantiated
|
||||
// 4661: no suitable definition provided for explicit template instantiation request
|
||||
// 4786: identifier was truncated in debug information
|
||||
// 4355: 'this' : used in base member initializer list
|
||||
// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
|
||||
# pragma warning(disable: 4127 4512 4661 4910)
|
||||
// Security related, possible defects
|
||||
@ -441,9 +433,11 @@ NAMESPACE_END
|
||||
|
||||
// ***************** Platform and CPU features ********************
|
||||
|
||||
// Linux provides X32, which is 32-bit integers, longs and pointers on x86_64 using the full x86_64 register set.
|
||||
// Detect via __ILP32__ (http://wiki.debian.org/X32Port). However, __ILP32__ shows up in more places than
|
||||
// the System V ABI specs calls out, like on some Solaris installations and just about any 32-bit system with Clang.
|
||||
// Linux provides X32, which is 32-bit integers, longs and pointers on x86_64
|
||||
// using the full x86_64 register set. Detect via __ILP32__
|
||||
// (http://wiki.debian.org/X32Port). However, __ILP32__ shows up in more places
|
||||
// than the System V ABI specs calls out, like on some Solaris installations
|
||||
// and just about any 32-bit system with Clang.
|
||||
#if (defined(__ILP32__) || defined(_ILP32)) && defined(__x86_64__)
|
||||
#define CRYPTOPP_BOOL_X32 1
|
||||
#endif
|
||||
@ -457,23 +451,22 @@ NAMESPACE_END
|
||||
#define CRYPTOPP_BOOL_X64 1
|
||||
#endif
|
||||
|
||||
// Undo the ASM and Intrinsic related defines due to X32.
|
||||
// Undo the ASM related defines due to X32.
|
||||
#if CRYPTOPP_BOOL_X32
|
||||
# undef CRYPTOPP_BOOL_X64
|
||||
# undef CRYPTOPP_X64_ASM_AVAILABLE
|
||||
# undef CRYPTOPP_X64_MASM_AVAILABLE
|
||||
#endif
|
||||
|
||||
// Microsoft plans to support ARM-64, but its not clear how to detect it.
|
||||
// TODO: Add MSC_VER and ARM-64 platform define when available
|
||||
#if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
|
||||
#define CRYPTOPP_BOOL_ARM64 1
|
||||
#elif defined(__arm__) || defined(__aarch32__) || defined(_M_ARM)
|
||||
// Microsoft added ARM64 define December 2017.
|
||||
#if defined(__arm64__) || defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM64)
|
||||
#define CRYPTOPP_BOOL_ARMV8 1
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
#define CRYPTOPP_BOOL_ARM32 1
|
||||
#endif
|
||||
|
||||
// AltiVec and Power8 crypto
|
||||
#if defined(__powerpc64__) || defined(_ARCH_PPC64)
|
||||
#if defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64)
|
||||
#define CRYPTOPP_BOOL_PPC64 1
|
||||
#elif defined(__powerpc__) || defined(_ARCH_PPC)
|
||||
#define CRYPTOPP_BOOL_PPC32 1
|
||||
@ -629,7 +622,7 @@ NAMESPACE_END
|
||||
|
||||
// ***************** ARM CPU features ********************
|
||||
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
|
||||
// We don't have an ARM big endian test rig. Disable
|
||||
// ARM-BE ASM and instrinsics until we can test it.
|
||||
|
4
cpu.cpp
4
cpu.cpp
@ -435,7 +435,7 @@ void DetectX86Features()
|
||||
|
||||
// *************************** ARM-32, Aarch32 and Aarch64 ***************************
|
||||
|
||||
#elif (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#elif (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
|
||||
bool CRYPTOPP_SECTION_INIT g_ArmDetectionDone = false;
|
||||
bool CRYPTOPP_SECTION_INIT g_hasARMv7 = false;
|
||||
@ -1050,7 +1050,7 @@ public:
|
||||
{
|
||||
#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|
||||
CryptoPP::DetectX86Features();
|
||||
#elif CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
|
||||
#elif CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8
|
||||
CryptoPP::DetectArmFeatures();
|
||||
#elif CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
CryptoPP::DetectPowerpcFeatures();
|
||||
|
4
cpu.h
4
cpu.h
@ -337,7 +337,7 @@ inline int GetCacheLineSize()
|
||||
|
||||
// ***************************** ARM-32, Aarch32 and Aarch64 ***************************** //
|
||||
|
||||
#if CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 || CRYPTOPP_DOXYGEN_PROCESSING
|
||||
#if CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || CRYPTOPP_DOXYGEN_PROCESSING
|
||||
|
||||
// Hide from Doxygen
|
||||
#ifndef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
@ -579,7 +579,7 @@ inline bool HasSM4()
|
||||
|
||||
//@}
|
||||
|
||||
#endif // CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
|
||||
#endif // CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8
|
||||
|
||||
// ***************************** PowerPC ***************************** //
|
||||
|
||||
|
@ -49,7 +49,7 @@ extern "C" {
|
||||
}
|
||||
#endif // Not CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
||||
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
|
||||
bool CPU_ProbeCRC32()
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ extern "C" {
|
||||
}
|
||||
#endif // Not CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
||||
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
bool CPU_ProbePMULL()
|
||||
{
|
||||
#if defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
|
||||
|
2
lea.h
2
lea.h
@ -15,7 +15,7 @@
|
||||
#include "secblock.h"
|
||||
#include "algparam.h"
|
||||
|
||||
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
# define CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || \
|
||||
CRYPTOPP_BOOL_ARM64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
CRYPTOPP_BOOL_ARMV8 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
# define CRYPTOPP_RIJNDAEL_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
||||
|
@ -75,7 +75,7 @@ extern "C" {
|
||||
}
|
||||
#endif // Not CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
||||
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
bool CPU_ProbeAES()
|
||||
{
|
||||
#if defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
|
||||
|
@ -73,7 +73,7 @@ extern "C" {
|
||||
}
|
||||
#endif // Not CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
||||
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
bool CPU_ProbeSHA1()
|
||||
{
|
||||
#if defined(CRYPTOPP_NO_CPU_FEATURE_PROBES)
|
||||
|
4
simon.h
4
simon.h
@ -18,13 +18,13 @@
|
||||
#include "secblock.h"
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
# define CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
# define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
4
speck.h
4
speck.h
@ -18,13 +18,13 @@
|
||||
#include "secblock.h"
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
# define CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64 || \
|
||||
CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8 || \
|
||||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||
# define CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
@ -356,7 +356,7 @@ bool TestSettings()
|
||||
std::cout << ", hasSHA == " << hasSHA << ", isP4 == " << isP4;
|
||||
std::cout << "\n";
|
||||
|
||||
#elif (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
|
||||
#elif (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARMV8)
|
||||
|
||||
# if defined(__arm__)
|
||||
bool hasARMv7 = HasARMv7();
|
||||
|
Loading…
Reference in New Issue
Block a user