I think this dates to when CRYPTO_is_*_capable were inline functions in public headers, so they couldn't access OPENSSL_armcap_P directly. Now they can. Change-Id: Ic06fffa7f5056401118b62d690dfe6b21bc30f86 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62345 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Bob Beck <bbe@google.com> Reviewed-by: Bob Beck <bbe@google.com>chromium-stable
parent
7ce5d41410
commit
5edba0bcc9
3 changed files with 4 additions and 55 deletions
@ -1,36 +0,0 @@ |
||||
/* Copyright (c) 2014, Google Inc.
|
||||
* |
||||
* Permission to use, copy, modify, and/or distribute this software for any |
||||
* purpose with or without fee is hereby granted, provided that the above |
||||
* copyright notice and this permission notice appear in all copies. |
||||
* |
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
||||
|
||||
#include "internal.h" |
||||
|
||||
#if (defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)) && \ |
||||
!defined(OPENSSL_STATIC_ARMCAP) |
||||
|
||||
#include <openssl/arm_arch.h> |
||||
|
||||
|
||||
int CRYPTO_is_NEON_capable_at_runtime(void) { |
||||
return (OPENSSL_armcap_P & ARMV7_NEON) != 0; |
||||
} |
||||
|
||||
int CRYPTO_is_ARMv8_AES_capable_at_runtime(void) { |
||||
return (OPENSSL_armcap_P & ARMV8_AES) != 0; |
||||
} |
||||
|
||||
int CRYPTO_is_ARMv8_PMULL_capable_at_runtime(void) { |
||||
return (OPENSSL_armcap_P & ARMV8_PMULL) != 0; |
||||
} |
||||
|
||||
#endif /* (defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)) && |
||||
!defined(OPENSSL_STATIC_ARMCAP) */ |
Loading…
Reference in new issue