`#define CRYPTOPP_DISABLE_ASM 1` does not disable all assembler / builtins / intrinsics (as documented here: https://github.com/weidai11/cryptopp/blob/CRYPTOPP_8_9_0/config_asm.h#L30).

`cpu.cpp` on x86-64 Windows MSVC builds still wants `CPUID64` and `XGETBV64` which are only implemented in `x64dll.asm` (see https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L451 / https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L393 / https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L81). This makes building Crypto++ as pure C++ impossible.

@noloader The offending commit is https://github.com/weidai11/cryptopp/commit/e65fa006bec60192112f0a3f23174ef0528f8cc4 which removes the use of the MSVC-specific intrinsics for MSVC versions new enough to actually provide it. I suggest reverting the part of this commit that removes the use of `__cpuidex` and `_xgetbv`.

For OpenMPT, we are building Crypto++ with our own build system in which we define `CRYPTOPP_DISABLE_ASM 1`. This worked with 8.8.0, however it fails now with 8.9.0. Crypto++ is not performance critical in our case, thus we very much prefer a simple C++-only solution in order to keep the build system simple.

We are using Crypto++ to secure our automatic updates on older Windows versions which do not provide the necessary crypto primitives themselves. In the failing case, we use VS2017 to target Windows XP.

CRYPTOPP_DISABLE_ASM is broken in 8.9.0 for MSVC x64 builds
This is a GitHub Issue
repo:cryptopp
owner:weidai11
Title : CRYPTOPP_DISABLE_ASM is broken in 8.9.0 for MSVC x64 builds
Issue date:

--- start body ---
`#define CRYPTOPP_DISABLE_ASM 1` does not disable all assembler / builtins / intrinsics (as documented here: https://github.com/weidai11/cryptopp/blob/CRYPTOPP_8_9_0/config_asm.h#L30).

`cpu.cpp` on x86-64 Windows MSVC builds still wants `CPUID64` and `XGETBV64` which are only implemented in `x64dll.asm` (see https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L451 / https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L393 / https://github.com/weidai11/cryptopp/blob/843d74c7c97f9e19a615b8ff3c0ca06599ca501b/cpu.cpp#L81). This makes building Crypto++ as pure C++ impossible.

@noloader The offending commit is https://github.com/weidai11/cryptopp/commit/e65fa006bec60192112f0a3f23174ef0528f8cc4 which removes the use of the MSVC-specific intrinsics for MSVC versions new enough to actually provide it. I suggest reverting the part of this commit that removes the use of `__cpuidex` and `_xgetbv`.

For OpenMPT, we are building Crypto++ with our own build system in which we define `CRYPTOPP_DISABLE_ASM 1`. This worked with 8.8.0, however it fails now with 8.9.0. Crypto++ is not performance critical in our case, thus we very much prefer a simple C++-only solution in order to keep the build system simple.

We are using Crypto++ to secure our automatic updates on older Windows versions which do not provide the necessary crypto primitives themselves. In the failing case, we use VS2017 to target Windows XP.

--- end body ---
