mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-07 22:27:01 -04:00
aesni: refine the condition of MBEDTLS_HAVE_X86_64
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
dc5a88b6a4
commit
e707dc1bb5
@ -36,12 +36,10 @@
|
||||
#define MBEDTLS_AESNI_AES 0x02000000u
|
||||
#define MBEDTLS_AESNI_CLMUL 0x00000002u
|
||||
|
||||
/* Can we do AESNI with inline assembly?
|
||||
* (Only implemented with gas syntax, only for 64-bit.)
|
||||
*/
|
||||
#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && \
|
||||
(defined(__amd64__) || defined(__x86_64__)) && \
|
||||
!defined(MBEDTLS_HAVE_X86_64)
|
||||
#if !defined(MBEDTLS_HAVE_X86_64) && \
|
||||
(defined(__amd64__) || defined(__x86_64__) || \
|
||||
defined(_M_X64) || defined(_M_AMD64)) && \
|
||||
!defined(_M_ARM64EC)
|
||||
#define MBEDTLS_HAVE_X86_64
|
||||
#endif
|
||||
|
||||
@ -78,7 +76,11 @@
|
||||
* favor the assembly-based implementation if it's available. We intend to
|
||||
* revise this in a later release of Mbed TLS 3.x. In the long run, we will
|
||||
* likely remove the assembly implementation. */
|
||||
#if defined(MBEDTLS_HAVE_X86_64)
|
||||
#if defined(MBEDTLS_HAVE_ASM) && \
|
||||
defined(__GNUC__) && defined(MBEDTLS_HAVE_X86_64)
|
||||
/* Can we do AESNI with inline assembly?
|
||||
* (Only implemented with gas syntax, only for 64-bit.)
|
||||
*/
|
||||
#define MBEDTLS_AESNI_HAVE_CODE 1 // via assembly
|
||||
#elif defined(MBEDTLS_AESNI_HAVE_INTRINSICS)
|
||||
#define MBEDTLS_AESNI_HAVE_CODE 2 // via intrinsics
|
||||
|
Loading…
x
Reference in New Issue
Block a user