From ceb805011747d04a915f3f39e4bed9eed151c634 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 7 Jan 2023 19:31:15 +0200 Subject: Build: Require that _mm_set_epi64x() is usable to enable CLMUL support. VS2013 doesn't have _mm_set_epi64x() so this way CLMUL gets disabled with VS2013. Thanks to Iouri Kharon for the bug report. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a58d740..ef17563e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -434,8 +434,9 @@ if(HAVE_IMMINTRIN_H) #if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__) __attribute__((__target__(\"ssse3,sse4.1,pclmul\"))) #endif - __m128i my_clmul(__m128i a, __m128i b) + __m128i my_clmul(__m128i a) { + const __m128i b = _mm_set_epi64x(1, 2); return _mm_clmulepi64_si128(a, b, 0); } int main(void) { return 0; } -- cgit v1.2.3