improve aesni check for x86_64
`MBEDTLS_AESNI_C` does not depends on `MBEDTLS_HAVE_ASM`
when intrinsic is available.
And compiler relative checks only work on x86_64, it should
be only checked on x86_64.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/aes.c b/library/aes.c
index 52e361a..4cb9ce1 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -40,8 +40,7 @@
#endif
#endif
-#if defined(MBEDTLS_HAVE_ASM) && \
- (defined(__amd64__) || defined(__x86_64__))
+#if defined(__amd64__) || defined(__x86_64__)
#if !defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
#endif