mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-01 13:13:28 +00:00
Restore aesni for i386
intrinsic code can be work on i386 also Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
240bb11171
commit
e62ff09569
@ -40,15 +40,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__amd64__) || defined(__x86_64__)
|
||||
#if defined(__amd64__) || defined(__x86_64__) || \
|
||||
defined(_M_X64) || defined(_M_AMD64)
|
||||
#if !defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
||||
#error "MBEDTLS_AES_USE_HARDWARE_ONLY not supported yet for i386."
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
#if defined(MBEDTLS_AES_USE_HARDWARE_ONLY) && !defined(MBEDTLS_AESNI_C)
|
||||
#error "MBEDTLS_AES_USE_HARDWARE_ONLY defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM)
|
||||
|
@ -41,7 +41,13 @@
|
||||
#define MBEDTLS_HAVE_X86_64
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64)
|
||||
#if !defined(MBEDTLS_HAVE_X86) && \
|
||||
(defined(__i386__) || defined(_M_IX86))
|
||||
#define MBEDTLS_HAVE_X86
|
||||
#endif
|
||||
|
||||
#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.)
|
||||
@ -67,7 +73,8 @@
|
||||
* In the long run, we will likely remove the assembly implementation. */
|
||||
#if defined(MBEDTLS_AESNI_HAVE_INTRINSICS)
|
||||
#define MBEDTLS_AESNI_HAVE_CODE 2 // via intrinsics
|
||||
#elif defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__)
|
||||
#elif defined(MBEDTLS_HAVE_ASM) && \
|
||||
defined(__GNUC__) && defined(MBEDTLS_HAVE_X86_64)
|
||||
#define MBEDTLS_AESNI_HAVE_CODE 1 // via assembly
|
||||
#else
|
||||
#error "MBEDTLS_AESNI_C defined, but neither intrinsics nor assembly available"
|
||||
|
Loading…
x
Reference in New Issue
Block a user