improve various issues
- duplicate definition - wrong comments - redundant include statement Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
782b966666
commit
f65f71eef3
4 changed files with 11 additions and 32 deletions
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "mbedtls/aes.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_ARCH_IS_ARM64)
|
||||
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
#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_AESNI_C) && \
|
||||
(defined(MBEDTLS_ARCH_IS_X64) || defined(MBEDTLS_ARCH_IS_X86))
|
||||
|
||||
|
@ -65,6 +61,9 @@
|
|||
#define MBEDTLS_AESNI_HAVE_CODE 2 // via intrinsics
|
||||
#elif defined(MBEDTLS_HAVE_ASM) && \
|
||||
defined(__GNUC__) && defined(MBEDTLS_ARCH_IS_X64)
|
||||
/* 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(__GNUC__)
|
||||
# error "Must use `-mpclmul -msse2 -maes` for MBEDTLS_AESNI_C"
|
||||
|
|
|
@ -38,9 +38,14 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* Some versions of ASan result in errors about not enough registers */
|
||||
#if defined(__GNUC__) && defined(MBEDTLS_ARCH_IS_X86) && \
|
||||
defined(MBEDTLS_HAVE_ASM) && !defined(MBEDTLS_HAVE_ASAN)
|
||||
/*
|
||||
* - `padlock` is implements with GNUC assembly for x86 target.
|
||||
* - Some versions of ASan result in errors about not enough registers.
|
||||
*/
|
||||
#if defined(MBEDTLS_PADLOCK_C) && \
|
||||
defined(__GNUC__) && defined(MBEDTLS_ARCH_IS_X86) && \
|
||||
defined(MBEDTLS_HAVE_ASM) && \
|
||||
!defined(MBEDTLS_HAVE_ASAN)
|
||||
|
||||
#define MBEDTLS_VIA_PADLOCK_HAVE_CODE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue