From 12d1c3ad4fe58f056af1d332e4f0cc9cc672eca0 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Thu, 30 Nov 2023 09:38:38 +0000 Subject: [PATCH] Use MBEDTLS_HAVE_NEON_INTRINSICS in aesce Signed-off-by: Dave Rodgman --- library/aesce.c | 2 +- library/aesce.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/library/aesce.c b/library/aesce.c index 2879be5a1..afbb369eb 100644 --- a/library/aesce.c +++ b/library/aesce.c @@ -45,7 +45,7 @@ #include "aesce.h" -#if defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(__ARM_NEON) +#if defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(MBEDTLS_HAVE_NEON_INTRINSICS) /* Compiler version checks. */ #if defined(__clang__) diff --git a/library/aesce.h b/library/aesce.h index cf12d7f8d..6b64f45d0 100644 --- a/library/aesce.h +++ b/library/aesce.h @@ -15,11 +15,13 @@ #define MBEDTLS_AESCE_H #include "mbedtls/build_info.h" +#include "common.h" #include "mbedtls/aes.h" -#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8_A) && defined(__ARM_NEON) +#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8_A) && \ + defined(MBEDTLS_HAVE_NEON_INTRINSICS) #define MBEDTLS_AESCE_HAVE_CODE @@ -124,6 +126,6 @@ int mbedtls_aesce_setkey_enc(unsigned char *rk, #error "AES hardware acceleration not supported on this platform" #endif -#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARMV8_A && __ARM_NEON */ +#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARMV8_A && MBEDTLS_HAVE_NEON_INTRINSICS */ #endif /* MBEDTLS_AESCE_H */