1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022).

I haven't tested with MSVC myself and there doesn't seem to be
information about the problem online, so I'm relying on the bug report.

Thanks to Iouri Kharon for the bug report and the patch.
This commit is contained in:
Lasse Collin 2023-01-09 12:22:05 +02:00
parent 790a12a95a
commit 36edc65ab4

View file

@ -279,6 +279,12 @@ crc64_clmul(const uint8_t *buf, size_t size, uint64_t crc)
const __m128i initial_crc = _mm_cvtsi64_si128(~crc); const __m128i initial_crc = _mm_cvtsi64_si128(~crc);
#endif #endif
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
&& defined(_M_IX86)
// Workaround for MSVC when compiling for 32-bit x86:
__asm mov ebx, ebx ; force store ebx: VS2015-2022 destroy it :(
#endif
__m128i v0, v1, v2, v3; __m128i v0, v1, v2, v3;
#ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS #ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS