]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
liblzma: Fix incorrect #ifdef for x86 SSE2 support.
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Nov 2022 12:35:58 +0000 (14:35 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Nov 2022 12:35:58 +0000 (14:35 +0200)
__SSE2__ is the correct macro for SSE2 support with GCC, Clang,
and ICC. __SSE2_MATH__ means doing floating point math with SSE2
instead of 387. Often the latter macro is defined if the first
one is but it was still a bug.

src/liblzma/common/memcmplen.h

index a80428b9d4caeb38ecac185db8f99f827dd9b645..5a481a02c9d897bc688427681c934e75c39c5663 100644 (file)
@@ -76,8 +76,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
 
 #elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
                && defined(HAVE__MM_MOVEMASK_EPI8) \
-               && ((defined(__GNUC__) && defined(__SSE2_MATH__)) \
-                       || (defined(__INTEL_COMPILER) && defined(__SSE2__)) \
+               && (defined(__SSE2__) \
                        || (defined(_MSC_VER) && defined(_M_IX86_FP) \
                                && _M_IX86_FP >= 2))
        // NOTE: This will use 128-bit unaligned access which