aboutsummaryrefslogtreecommitdiff
path: root/include/openssl/cpu.h
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2017-06-08 16:53:28 -0400
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2017-06-09 00:29:10 +0000
commit3b33f3eb2deb05f20850393c18122b14955cfd42 (patch)
tree3e128afb123d32dfa5361fe91517ec7f25535f8d /include/openssl/cpu.h
parent619b323a5e82e79a01a44e5986640492892f86c6 (diff)
downloadboringssl-3b33f3eb2deb05f20850393c18122b14955cfd42.zip
boringssl-3b33f3eb2deb05f20850393c18122b14955cfd42.tar.gz
boringssl-3b33f3eb2deb05f20850393c18122b14955cfd42.tar.bz2
Set static armcaps based on __ARM_FEATURE_CRYPTO.
Originally we had some confusion around whether the features could be toggled individually or not. Per the ARM C Language Extensions doc[1], __ARM_FEATURE_CRYPTO implies the "crypto extension" which encompasses all of them. The runtime CPUID equivalent can report the features individually, but it seems no one separates them in practice, for now. (If they ever do, probably there'll be a new set of #defines.) [1] http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf Change-Id: I12915dfc308f58fb005286db75e50d8328eeb3ea Reviewed-on: https://boringssl-review.googlesource.com/16991 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'include/openssl/cpu.h')
-rw-r--r--include/openssl/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/openssl/cpu.h b/include/openssl/cpu.h
index 81cc5ba..5ccf14b 100644
--- a/include/openssl/cpu.h
+++ b/include/openssl/cpu.h
@@ -156,7 +156,7 @@ static inline int CRYPTO_is_NEON_capable(void) {
}
static inline int CRYPTO_is_ARMv8_AES_capable(void) {
-#if defined(OPENSSL_STATIC_ARMCAP_AES)
+#if defined(OPENSSL_STATIC_ARMCAP_AES) || defined(__ARM_FEATURE_CRYPTO)
return 1;
#else
return 0;
@@ -164,7 +164,7 @@ static inline int CRYPTO_is_ARMv8_AES_capable(void) {
}
static inline int CRYPTO_is_ARMv8_PMULL_capable(void) {
-#if defined(OPENSSL_STATIC_ARMCAP_PMULL)
+#if defined(OPENSSL_STATIC_ARMCAP_PMULL) || defined(__ARM_FEATURE_CRYPTO)
return 1;
#else
return 0;