enable runtime detection when padlock enabled and plain c disabled
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
cc068ae631
commit
c628486cd9
2 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,8 @@
|
|||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY) || \
|
||||
(defined(MBEDTLS_HAVE_X86) && defined(MBEDTLS_PADLOCK_C))
|
||||
/*
|
||||
* AES-NI support detection routine
|
||||
*/
|
||||
|
|
|
@ -97,7 +97,8 @@ extern "C" {
|
|||
*
|
||||
* \return 1 if CPU has support for the feature, 0 otherwise
|
||||
*/
|
||||
#if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY) || \
|
||||
(defined(MBEDTLS_HAVE_X86) && defined(MBEDTLS_PADLOCK_C))
|
||||
int mbedtls_aesni_has_support(unsigned int what);
|
||||
#else
|
||||
#define mbedtls_aesni_has_support(what) 1
|
||||
|
|
Loading…
Reference in a new issue