Address test review comments
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/aes.c b/library/aes.c
index 0a61d1b..08e3caa 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -1824,6 +1824,13 @@
} else
#endif
#if defined(MBEDTLS_AESNI_HAVE_CODE)
+#if MBEDTLS_AESNI_HAVE_CODE == 1
+ mbedtls_printf(" AES note: AESNI code present (assembly implementation).\n");
+#elif MBEDTLS_AESNI_HAVE_CODE == 2
+ mbedtls_printf(" AES note: AESNI code present (intrinsics implementation).\n");
+#else
+#error Unrecognised value for MBEDTLS_AESNI_HAVE_CODE
+#endif
if (mbedtls_aesni_has_support(MBEDTLS_AESNI_AES)) {
mbedtls_printf(" AES note: using AESNI.\n");
} else
diff --git a/library/aesni.h b/library/aesni.h
index 97b3abb..82947e4 100644
--- a/library/aesni.h
+++ b/library/aesni.h
@@ -59,11 +59,6 @@
#define MBEDTLS_AESNI_HAVE_INTRINSICS
#endif
-/* Normally MBEDTLS_AESNI_HAVE_CODE is automatically set below. It may be
- * set from all.sh to ensure coverage of both asm and intrinsics, in which
- * case we do not over-ride it. */
-#if !defined(MBEDTLS_AESNI_HAVE_CODE)
-
/* Choose the implementation of AESNI, if one is available.
*
* Favor the intrinsics-based implementation if it's available, for better
@@ -75,7 +70,6 @@
#elif defined(MBEDTLS_HAVE_X86_64)
#define MBEDTLS_AESNI_HAVE_CODE 1 // via assembly
#endif
-#endif /* !defined(MBEDTLS_AESNI_HAVE_CODE) */
#if defined(MBEDTLS_AESNI_HAVE_CODE)