You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
diff --git a/library/aesni.h b/library/aesni.h
|
|
index 754c984c79..59e27afd3e 100644
|
|
--- a/library/aesni.h
|
|
+++ b/library/aesni.h
|
|
@@ -35,7 +35,7 @@
|
|
/* GCC-like compilers: currently, we only support intrinsics if the requisite
|
|
* target flag is enabled when building the library (e.g. `gcc -mpclmul -msse2`
|
|
* or `clang -maes -mpclmul`). */
|
|
-#if (defined(__GNUC__) || defined(__clang__)) && defined(__AES__) && defined(__PCLMUL__)
|
|
+#if defined(__GNUC__) || defined(__clang__)
|
|
#define MBEDTLS_AESNI_HAVE_INTRINSICS
|
|
#endif
|
|
/* For 32-bit, we only support intrinsics */
|
|
diff --git a/library/aesni.c b/library/aesni.c
|
|
index 2857068..3e104ab 100644
|
|
--- a/library/aesni.c
|
|
+++ b/library/aesni.c
|
|
@@ -31,16 +31,14 @@
|
|
#include <immintrin.h>
|
|
#endif
|
|
|
|
-#if defined(MBEDTLS_ARCH_IS_X86)
|
|
#if defined(MBEDTLS_COMPILER_IS_GCC)
|
|
#pragma GCC push_options
|
|
#pragma GCC target ("pclmul,sse2,aes")
|
|
#define MBEDTLS_POP_TARGET_PRAGMA
|
|
-#elif defined(__clang__) && (__clang_major__ >= 5)
|
|
+#elif defined(__clang__)
|
|
#pragma clang attribute push (__attribute__((target("pclmul,sse2,aes"))), apply_to=function)
|
|
#define MBEDTLS_POP_TARGET_PRAGMA
|
|
#endif
|
|
-#endif
|
|
|
|
#if !defined(MBEDTLS_AES_USE_HARDWARE_ONLY)
|
|
/*
|