From 8dacf702c37ae8e53a5f8b2d435936aa0e197b25 Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Wed, 7 Feb 2024 11:27:21 +0100 Subject: [PATCH] rely on __SSSE3__ macro rather that on architecture macros --- plugins/filters/bytedelta/bytedelta.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/filters/bytedelta/bytedelta.c b/plugins/filters/bytedelta/bytedelta.c index 87d4ed16..ba78120c 100644 --- a/plugins/filters/bytedelta/bytedelta.c +++ b/plugins/filters/bytedelta/bytedelta.c @@ -18,7 +18,15 @@ #include #include -#if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64 +/* Define the __SSSE3__ symbol if compiling with Visual C++ and + targeting the minimum architecture level. +*/ +#if !defined(__SSSE3__) && defined(_MSC_VER) && \ + (defined(_M_X64) || (defined(_M_IX86) && _M_IX86_FP >= 2)) + #define __SSSE3__ +#endif + +#if defined(__SSSE3__) // SSSE3 code path for x64/x64 #define CPU_HAS_SIMD 1 #include