mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-26 08:15:44 +00:00
Guard <arm_acle.h> include for GCC 4.8
Use system includes for <arm_neon.h> and <arm_acle.h>
This commit is contained in:
parent
81a272b046
commit
17bf824790
18
crc-simd.cpp
18
crc-simd.cpp
@ -10,20 +10,26 @@
|
||||
#include "config.h"
|
||||
#include "misc.h"
|
||||
|
||||
// Clang and GCC hoops...
|
||||
// We set CRYPTOPP_ARM_CRC32_AVAILABLE based on compiler version.
|
||||
// If the crypto is not available, then we have to disable it here.
|
||||
#if !(defined(__ARM_FEATURE_CRC32) || defined(_MSC_VER))
|
||||
# undef CRYPTOPP_ARM_CRC32_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_SSE42_AVAILABLE)
|
||||
# include "nmmintrin.h"
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
# include <nmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
||||
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
||||
// intrinsics without <arm_acle.h> included.
|
||||
#if (CRYPTOPP_ARM_CRC32_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION)
|
||||
# include "arm_acle.h"
|
||||
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8.
|
||||
#if (CRYPTOPP_ARM_CRC32_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) && \
|
||||
(!defined(CRYPTOPP_GCC_VERSION) || (CRYPTOPP_GCC_VERSION >= 40900))
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
|
||||
|
13
gcm-simd.cpp
13
gcm-simd.cpp
@ -31,19 +31,20 @@
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
# include "tmmintrin.h"
|
||||
# include "wmmintrin.h"
|
||||
# include <tmmintrin.h>
|
||||
# include <wmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||
# include "arm_neon.h"
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
||||
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
||||
// intrinsics without <arm_acle.h> included.
|
||||
#if (CRYPTOPP_ARM_PMULL_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION)
|
||||
# include "arm_acle.h"
|
||||
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8.
|
||||
#if (CRYPTOPP_ARM_PMULL_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) && \
|
||||
(!defined(CRYPTOPP_GCC_VERSION) || (CRYPTOPP_GCC_VERSION >= 40900))
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "stdcpp.h"
|
||||
|
||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||
# include "arm_neon.h"
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
|
||||
|
20
sha-simd.cpp
20
sha-simd.cpp
@ -11,25 +11,27 @@
|
||||
#include "sha.h"
|
||||
#include "misc.h"
|
||||
|
||||
// Clang and GCC hoops...
|
||||
// We set CRYPTOPP_ARM_SHA_AVAILABLE based on compiler version.
|
||||
// If the crypto is not available, then we have to disable it here.
|
||||
#if !(defined(__ARM_FEATURE_CRYPTO) || defined(_MSC_VER))
|
||||
# undef CRYPTOPP_ARM_SHA_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_SHANI_AVAILABLE)
|
||||
# include "nmmintrin.h"
|
||||
# include "immintrin.h"
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
# include <nmmintrin.h>
|
||||
# include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE)
|
||||
# include "arm_neon.h"
|
||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
||||
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
||||
// intrinsics without <arm_acle.h> included.
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION)
|
||||
# include "arm_acle.h"
|
||||
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8.
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) && \
|
||||
(!defined(CRYPTOPP_GCC_VERSION) || (CRYPTOPP_GCC_VERSION >= 40900))
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
|
||||
|
@ -23,19 +23,20 @@
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_SHANI_AVAILABLE)
|
||||
# include "nmmintrin.h"
|
||||
# include "immintrin.h"
|
||||
# include <nmmintrin.h>
|
||||
# include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE)
|
||||
# include "arm_neon.h"
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
||||
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
||||
// intrinsics without <arm_acle.h> included.
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION)
|
||||
# include "arm_acle.h"
|
||||
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8.
|
||||
#if (CRYPTOPP_ARM_SHA_AVAILABLE) && !defined(CRYPTOPP_APPLE_CLANG_VERSION) && \
|
||||
(!defined(CRYPTOPP_GCC_VERSION) || (CRYPTOPP_GCC_VERSION >= 40900))
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
// Clang __m128i casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
||||
|
Loading…
x
Reference in New Issue
Block a user