Use MBEDTLS_ARCH_IS_ARMV8_A not MBEDTLS_ARCH_IS_ARMV8
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
cb5c9fb0c2
commit
9fd1b526c3
3 changed files with 11 additions and 11 deletions
|
@ -35,7 +35,7 @@
|
|||
#include "mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#if !((defined(MBEDTLS_ARCH_IS_ARMV8) && defined(MBEDTLS_AESCE_C)) || \
|
||||
#if !((defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(MBEDTLS_AESCE_C)) || \
|
||||
(defined(MBEDTLS_ARCH_IS_X64) && defined(MBEDTLS_AESNI_C)) || \
|
||||
(defined(MBEDTLS_ARCH_IS_X86) && defined(MBEDTLS_AESNI_C)))
|
||||
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
|
||||
#if defined(__clang__) && (__clang_major__ >= 4)
|
||||
|
||||
/* Ideally, we would simply use MBEDTLS_ARCH_IS_ARMV8 in the following #if,
|
||||
/* Ideally, we would simply use MBEDTLS_ARCH_IS_ARMV8_A in the following #if,
|
||||
* but that is defined by build_info.h, and we need this block to happen first. */
|
||||
#if defined(__ARM_ARCH)
|
||||
#if __ARM_ARCH >= 8
|
||||
#define MBEDTLS_AESCE_ARCH_IS_ARMV8
|
||||
#define MBEDTLS_AESCE_ARCH_IS_ARMV8_A
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_AESCE_ARCH_IS_ARMV8) && !defined(__ARM_FEATURE_CRYPTO)
|
||||
#if defined(MBEDTLS_AESCE_ARCH_IS_ARMV8_A) && !defined(__ARM_FEATURE_CRYPTO)
|
||||
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
||||
*
|
||||
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
#include "aesce.h"
|
||||
|
||||
#if defined(MBEDTLS_ARCH_IS_ARMV8) && defined(__ARM_NEON)
|
||||
#if defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(__ARM_NEON)
|
||||
|
||||
/* Compiler version checks. */
|
||||
#if defined(__clang__)
|
||||
|
@ -611,6 +611,6 @@ void mbedtls_aesce_gcm_mult(unsigned char c[16],
|
|||
#undef MBEDTLS_POP_TARGET_PRAGMA
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_ARCH_IS_ARMV8 */
|
||||
#endif /* MBEDTLS_ARCH_IS_ARMV8_A */
|
||||
|
||||
#endif /* MBEDTLS_AESCE_C */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "mbedtls/aes.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8) && defined(__ARM_NEON)
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(__ARM_NEON)
|
||||
|
||||
#define MBEDTLS_AESCE_HAVE_CODE
|
||||
|
||||
|
@ -130,10 +130,10 @@ int mbedtls_aesce_setkey_enc(unsigned char *rk,
|
|||
|
||||
#else
|
||||
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY) && defined(MBEDTLS_ARCH_IS_ARMV8)
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY) && defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||
#error "AES hardware acceleration not supported on this platform"
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARMV8 && __ARM_NEON */
|
||||
#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARMV8_A && __ARM_NEON */
|
||||
|
||||
#endif /* MBEDTLS_AESCE_H */
|
||||
|
|
Loading…
Reference in a new issue