aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid/cpuid_arm.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-07-09 20:51:13 -0400
committerJack Lloyd <[email protected]>2018-07-09 20:51:13 -0400
commit19b1dd0bb0dc12576659dc5a7a48212a2993e3b2 (patch)
tree1644cbd4cf3479f092122a44eaef8d568efdd5b6 /src/lib/utils/cpuid/cpuid_arm.cpp
parentb48a14a985f9bef9e0b5ea2260bfc33aa6148480 (diff)
Fix ARMv7 build
These hwcaps dont exist in 32-bit mode
Diffstat (limited to 'src/lib/utils/cpuid/cpuid_arm.cpp')
-rw-r--r--src/lib/utils/cpuid/cpuid_arm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/utils/cpuid/cpuid_arm.cpp b/src/lib/utils/cpuid/cpuid_arm.cpp
index b0d338e55..beb80f7d0 100644
--- a/src/lib/utils/cpuid/cpuid_arm.cpp
+++ b/src/lib/utils/cpuid/cpuid_arm.cpp
@@ -167,6 +167,8 @@ uint64_t CPUID::detect_cpu_features(size_t* cache_line_size)
detected_features |= CPUID::CPUID_ARM_SHA1_BIT;
if(hwcap_crypto & ARM_hwcap_bit::SHA2_bit)
detected_features |= CPUID::CPUID_ARM_SHA2_BIT;
+
+#if defined(BOTAN_TARGET_ARCH_IS_ARM64)
if(hwcap_crypto & ARM_hwcap_bit::SHA3_bit)
detected_features |= CPUID::CPUID_ARM_SHA3_BIT;
if(hwcap_crypto & ARM_hwcap_bit::SM3_bit)
@@ -177,6 +179,7 @@ uint64_t CPUID::detect_cpu_features(size_t* cache_line_size)
detected_features |= CPUID::CPUID_ARM_SHA2_512_BIT;
if(hwcap_crypto & ARM_hwcap_bit::SVE_bit)
detected_features |= CPUID::CPUID_ARM_SVE_BIT;
+#endif
#elif defined(BOTAN_TARGET_OS_IS_IOS)