From 91a624fb70230a885656e74c89865270b27c9de9 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 20 Sep 2018 16:58:43 +0100 Subject: [PATCH] sshaes.c: add some missing clang target attributes. The helper functions mm_shuffle_pd_i0 and mm_shuffle_pd_i1 need the FUNC_ISA macro (which expands to __attribute__((target("sse4.1,aes"))) when building with clang) in order to avoid a build error complaining that their use of the _mm_shuffle_pd intrinsic is illegal without at least sse2. This build error is new in the recently released clang 7.0.0, compared to the svn trunk revision I was previously building with. But it certainly seems plausible to me, so I assume there's been some pre-release tightening up of the error reporting. In any case, those helper functions are only ever called from other functions with the same attribute, so it shouldn't cause trouble. --- sshaes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sshaes.c b/sshaes.c index 5259396f..c5c05d21 100644 --- a/sshaes.c +++ b/sshaes.c @@ -1243,6 +1243,7 @@ INLINE static int supports_aes_ni() * Wrapper of SHUFPD instruction for MSVC */ #ifdef _MSC_VER +FUNC_ISA INLINE static __m128i mm_shuffle_pd_i0(__m128i a, __m128i b) { union { @@ -1255,6 +1256,7 @@ INLINE static __m128i mm_shuffle_pd_i0(__m128i a, __m128i b) return ru.i; } +FUNC_ISA INLINE static __m128i mm_shuffle_pd_i1(__m128i a, __m128i b) { union {