Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
base: enable ETC__CPU_ARCH__X86_64_V2 on MSVC
If I understand the #148 discussion correctly, a user overrode WUFFS_BASE__CPU_ARCH__X86_FAMILY (without also providing /arch:AVX) to enable SSE4.2 code (even though, technically, x86_64 doesn't guarantee SSE4.2, only SSE2). This seemed to work fine in practice, but was unsupported by Wuffs and 'broke' by fixing #145, now looking for WUFFS_BASE__CPU_ARCH__X86_64 instead of WUFFS_BASE__CPU_ARCH__X86_FAMILY. WUFFS_BASE__CPU_ARCH__X86_FAMILY has since been renamed to WUFFS_PRIVATE_IMPL__CPU_ARCH__X86_FAMILY and then removed entirely. As SSE4.2 (roughly equivalent to x86-64-v2) seems to work fine at compile time (with the existing cpuid detection at runtime), enable it by default for MSVC, without need /arch. Enabling x86-64-v3 too, by default, is held back for now, pending further confirmation from MSVC users. The #148 user was exercising Wuffs' PNG codec, which uses SSE4.2 but not AVX or AVX2. Currently, only Wuffs' JPEG codec (and YCbCr conversion) uses AVX or AVX2. GCC and Clang don't need this fiddliness, because they support "__attribute__((target(arg)))". Updates #148
- Loading branch information