mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 08:37:25 +00:00
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
@ -35,9 +35,9 @@
|
|||||||
#include "mbedtls/error.h"
|
#include "mbedtls/error.h"
|
||||||
|
|
||||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
#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_X64) && defined(MBEDTLS_AESNI_C)) || \
|
||||||
(defined(MBEDTLS_ARCH_IS_X86) && defined(MBEDTLS_AESNI_C)))
|
(defined(MBEDTLS_ARCH_IS_X86) && defined(MBEDTLS_AESNI_C)))
|
||||||
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
|
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,15 +19,15 @@
|
|||||||
|
|
||||||
#if defined(__clang__) && (__clang_major__ >= 4)
|
#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. */
|
* but that is defined by build_info.h, and we need this block to happen first. */
|
||||||
#if defined(__ARM_ARCH)
|
#if defined(__ARM_ARCH)
|
||||||
#if __ARM_ARCH >= 8
|
#if __ARM_ARCH >= 8
|
||||||
#define MBEDTLS_AESCE_ARCH_IS_ARMV8
|
#define MBEDTLS_AESCE_ARCH_IS_ARMV8_A
|
||||||
#endif
|
#endif
|
||||||
#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.
|
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
||||||
*
|
*
|
||||||
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
#include "aesce.h"
|
#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. */
|
/* Compiler version checks. */
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
@ -611,6 +611,6 @@ void mbedtls_aesce_gcm_mult(unsigned char c[16],
|
|||||||
#undef MBEDTLS_POP_TARGET_PRAGMA
|
#undef MBEDTLS_POP_TARGET_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_ARCH_IS_ARMV8 */
|
#endif /* MBEDTLS_ARCH_IS_ARMV8_A */
|
||||||
|
|
||||||
#endif /* MBEDTLS_AESCE_C */
|
#endif /* MBEDTLS_AESCE_C */
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "mbedtls/aes.h"
|
#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
|
#define MBEDTLS_AESCE_HAVE_CODE
|
||||||
|
|
||||||
@ -130,10 +130,10 @@ int mbedtls_aesce_setkey_enc(unsigned char *rk,
|
|||||||
|
|
||||||
#else
|
#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"
|
#error "AES hardware acceleration not supported on this platform"
|
||||||
#endif
|
#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 */
|
#endif /* MBEDTLS_AESCE_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user