summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-01-07 19:31:15 +0200
committerLasse Collin <lasse.collin@tukaani.org>2023-01-08 00:20:42 +0200
commitceb805011747d04a915f3f39e4bed9eed151c634 (patch)
tree5321f59f5e5ee96791e3977b8009be7ef7832588 /CMakeLists.txt
parent8d372bd94066b1a5b0570b2550f83c2868486adf (diff)
downloadxz-ceb805011747d04a915f3f39e4bed9eed151c634.tar.gz
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a58d74..ef17563 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; }