Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytedelta: rely on __SSSE3__ macro rather that on architecture macros #586

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion plugins/filters/bytedelta/bytedelta.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
#include <stdint.h>
#include <stdio.h>

#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__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It assumes that SSE2 is available when SSSE3 is

// SSSE3 code path for x64/x64
#define CPU_HAS_SIMD 1
#include <emmintrin.h>
Expand Down