]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
should check defined(_M_X64) not defined(_M_X86) when building with MSVC. 4234/head
authorMessyHack <messyhack@gmail.com>
Sat, 11 Jan 2025 06:38:56 +0000 (22:38 -0800)
committerMessyHack <messyhack@gmail.com>
Sat, 11 Jan 2025 06:47:48 +0000 (22:47 -0800)
_M_X86 is only defined under MSVC 32Bit
_M_X64 is only defined under MSVC 64Bit

lib/common/bitstream.h

index bcfa09b8904d1b8e29570f3d4113b21ed6a85e3e..a1dac889d3a227b6a86e80c5e2035af57136b8ad 100644 (file)
@@ -309,7 +309,7 @@ FORCE_INLINE_TEMPLATE size_t BIT_getMiddleBits(BitContainerType bitContainer, U3
      * such cpus old (pre-Haswell, 2013) and their performance is not of that
      * importance.
      */
-#if defined(__x86_64__) || defined(_M_X86)
+#if defined(__x86_64__) || defined(_M_X64)
     return (bitContainer >> (start & regMask)) & ((((U64)1) << nbBits) - 1);
 #else
     return (bitContainer >> (start & regMask)) & BIT_mask[nbBits];