Fix behaviour for Armv8 targets without Neon
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
f82e0c4701
commit
ece803b0ae
2 changed files with 10 additions and 4 deletions
|
@ -57,7 +57,7 @@
|
|||
|
||||
#include "aesce.h"
|
||||
|
||||
#if defined(MBEDTLS_ARCH_IS_ARMV8)
|
||||
#if defined(MBEDTLS_ARCH_IS_ARMV8) && defined(__ARM_NEON)
|
||||
|
||||
/* Compiler version checks. */
|
||||
#if defined(__clang__)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* \file aesce.h
|
||||
*
|
||||
* \brief Support hardware AES acceleration on Armv8-A processors with
|
||||
* the Armv8-A Cryptographic Extension in AArch64 execution state.
|
||||
* the Armv8-A Cryptographic Extension.
|
||||
*
|
||||
* \warning These functions are only for internal use by other library
|
||||
* functions; you must not call them directly.
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include "mbedtls/aes.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8)
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARMV8) && defined(__ARM_NEON)
|
||||
|
||||
#define MBEDTLS_AESCE_HAVE_CODE
|
||||
|
||||
|
@ -128,6 +128,12 @@ int mbedtls_aesce_setkey_enc(unsigned char *rk,
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARM64 */
|
||||
#else
|
||||
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#error "AES hardware acceleration not supported on this platform"
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_AESCE_C && MBEDTLS_ARCH_IS_ARMV8 && __ARM_NEON */
|
||||
|
||||
#endif /* MBEDTLS_AESCE_H */
|
||||
|
|
Loading…
Reference in a new issue