From: Lasse Collin Date: Mon, 7 Apr 2025 19:36:58 +0000 (+0300) Subject: liblzma: Remove MSVC hack from CLMUL CRC X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5fd88dfc3d2b4178dc6da65b02a63a4ef9280c5;p=thirdparty%2Fxz.git liblzma: Remove MSVC hack from CLMUL CRC It's not enough with MSVC 19.29 (VS 2019) even if the hack was also applied to the CRC32 code. The tests crash when built for 32-bit x86. --- diff --git a/src/liblzma/check/crc64_fast.c b/src/liblzma/check/crc64_fast.c index 8a6770a4..e382bc7e 100644 --- a/src/liblzma/check/crc64_fast.c +++ b/src/liblzma/check/crc64_fast.c @@ -146,14 +146,6 @@ crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc) extern LZMA_API(uint64_t) lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc) { -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \ - && defined(_M_IX86) && defined(CRC64_ARCH_OPTIMIZED) - // VS2015-2022 might corrupt the ebx register on 32-bit x86 when - // the CLMUL code is enabled. This hack forces MSVC to store and - // restore ebx. This is only needed here, not in lzma_crc32(). - __asm mov ebx, ebx -#endif - #if defined(CRC64_GENERIC) && defined(CRC64_ARCH_OPTIMIZED) return crc64_func(buf, size, crc);