From 8eb1b6cb6b8d5bee646d4c8ba8b48099bc18507c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 16 Jan 2017 05:35:53 -0500 Subject: [PATCH] Update CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE availability (Issue 362) PMULL and PMULL2 are available on Aarch64 only, and not Aarch32 or A-32 --- config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 702707f6..6fd21bfc 100644 --- a/config.h +++ b/config.h @@ -491,13 +491,15 @@ NAMESPACE_END # endif #endif -// Requires ARMv8 and ACLE 2.0. GCC requires 4.8 and above. +// Requires ARMv8, ACLE 2.0 and Aarch64. GCC requires 4.8 and above. // LLVM Clang requires 3.5. Apple Clang does not support it at the moment. // 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(CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) # if defined(__ARM_FEATURE_CRYPTO) && !defined(__apple_build_version__) -# define CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE 1 +# if defined(__arm64__) || defined(__aarch64__) +# define CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE 1 +# endif # endif #endif