From: MessyHack Date: Sat, 11 Jan 2025 06:38:56 +0000 (-0800) Subject: should check defined(_M_X64) not defined(_M_X86) when building with MSVC. X-Git-Tag: v1.5.7^2~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4234%2Fhead;p=thirdparty%2Fzstd.git should check defined(_M_X64) not defined(_M_X86) when building with MSVC. _M_X86 is only defined under MSVC 32Bit _M_X64 is only defined under MSVC 64Bit --- diff --git a/lib/common/bitstream.h b/lib/common/bitstream.h index bcfa09b89..a1dac889d 100644 --- a/lib/common/bitstream.h +++ b/lib/common/bitstream.h @@ -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];