Improve include logic for <arm_acle.h> under GCC
parent
f86aca7258
commit
d37afa9ab0
5
cpu.h
5
cpu.h
|
|
@ -20,7 +20,7 @@
|
||||||
# if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
|
# if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
|
||||||
# include <arm_neon.h>
|
# include <arm_neon.h>
|
||||||
# endif
|
# endif
|
||||||
# if (__ARM_ACLE >= 200)
|
# if defined(__ARM_FEATURE_CRC32) || (__ARM_ACLE >= 200)
|
||||||
# include <arm_acle.h>
|
# include <arm_acle.h>
|
||||||
# endif
|
# endif
|
||||||
#endif // ARM-32 or ARM-64
|
#endif // ARM-32 or ARM-64
|
||||||
|
|
@ -242,6 +242,7 @@ void CRYPTOPP_API DetectArmFeatures();
|
||||||
|
|
||||||
//! \brief Determine if an ARM processor has Advanced SIMD available
|
//! \brief Determine if an ARM processor has Advanced SIMD available
|
||||||
//! \returns true if the hardware is capable of Advanced SIMD at runtime, false otherwise.
|
//! \returns true if the hardware is capable of Advanced SIMD at runtime, false otherwise.
|
||||||
|
//! \details Runtime support requires compile time support.
|
||||||
inline bool HasNEON()
|
inline bool HasNEON()
|
||||||
{
|
{
|
||||||
if (!g_ArmDetectionDone)
|
if (!g_ArmDetectionDone)
|
||||||
|
|
@ -251,6 +252,8 @@ inline bool HasNEON()
|
||||||
|
|
||||||
//! \brief Determine if an ARM processor has CRC32 available
|
//! \brief Determine if an ARM processor has CRC32 available
|
||||||
//! \returns true if the hardware is capable of CRC32 at runtime, false otherwise.
|
//! \returns true if the hardware is capable of CRC32 at runtime, false otherwise.
|
||||||
|
//! \details Runtime support requires compile time support. When compiling with GCC, you may
|
||||||
|
//! need to compile with <tt>-march=armv8-a+crc</tt>.
|
||||||
inline bool HasCRC32()
|
inline bool HasCRC32()
|
||||||
{
|
{
|
||||||
if (!g_ArmDetectionDone)
|
if (!g_ArmDetectionDone)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue