From dc5a88b6a42aad95774731ad418b03e79f16fd0b Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Wed, 13 Sep 2023 17:40:25 +0800 Subject: [PATCH] aesni: make AESNI only operate on X86 and X86_64 Signed-off-by: Pengyu Lv --- include/mbedtls/aesni.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/aesni.h b/include/mbedtls/aesni.h index 9a573c46387e..b16ccc3e7272 100644 --- a/include/mbedtls/aesni.h +++ b/include/mbedtls/aesni.h @@ -50,7 +50,8 @@ #define MBEDTLS_HAVE_X86 #endif -#if defined(MBEDTLS_AESNI_C) +#if defined(MBEDTLS_AESNI_C) && \ + (defined(MBEDTLS_HAVE_X86_64) || defined(MBEDTLS_HAVE_X86)) /* Can we do AESNI with intrinsics? * (Only implemented with certain compilers, only for certain targets.)