Fix NEON detection on Aarch32 and Aarch64
I wish GCC would get its head out of its ass and define the apprpriate defines. NEON/ASIMD cannot be disgorged from Aarch32/Aarch64 just like SSE2 cannot be disgorged from x86_64. They are core instruction setspull/461/head
parent
6e35e7387a
commit
7779fa3e7a
2
config.h
2
config.h
|
|
@ -458,7 +458,7 @@ NAMESPACE_END
|
||||||
|
|
||||||
// Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
|
// Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
|
||||||
#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
|
#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
|
||||||
# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM)
|
# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(__aarch32__) || defined(__aarch64__) || defined(_M_ARM)
|
||||||
# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1
|
# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
6
cpu.cpp
6
cpu.cpp
|
|
@ -11,7 +11,11 @@
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include <algorithm>
|
#include "stdcpp.h"
|
||||||
|
|
||||||
|
#if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
|
||||||
|
# include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
#ifndef CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
||||||
2
cpu.h
2
cpu.h
|
|
@ -22,7 +22,7 @@
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
# endif
|
# endif
|
||||||
# if defined(__ARM_NEON) || defined(_MSC_VER)
|
# if defined(__ARM_NEON) || defined(__aarch32__) || defined(__aarch64__) || defined(_MSC_VER)
|
||||||
# include <arm_neon.h>
|
# include <arm_neon.h>
|
||||||
# endif
|
# endif
|
||||||
# if defined(__GNUC__) && !defined(__apple_build_version__)
|
# if defined(__GNUC__) && !defined(__apple_build_version__)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue