From 42d704ad5e286fe8ad8b8aca0af4c78543abd3f1 Mon Sep 17 00:00:00 2001 From: MessyHack Date: Fri, 10 Jan 2025 22:38:56 -0800 Subject: [PATCH] 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 --- lib/common/bitstream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.47.2