Up to now MSVC has being used with the default mode, which uses SSE2 instructions for scalar floating-point and vector calculations. https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170
This patchset allows users to specify the CPU for which the generated code should be optimized for in the same way it's done for GCC: by passing the CPU name. When no name is provided 'native' is assumed meaning that the code should be optimized for the machine compiling the code. MSVC does not provide this functionality natively, so logic was added. This additional logic relies on a table which stores instruction set availability (like AXV512F) for different CPUs. To make it easier to update this table a new devtool was also added. v3: - Added subdir('msvc') to config/x86/meson.build (now that other required patches are merged). Andre Muezerie (2): config: allow AVX512 instructions to be used with MSVC devtools/dump-cpu-flags: add tool to update CPU flags table config/x86/meson.build | 1 + config/x86/msvc/meson.build | 287 +++++++++++++++++++++ devtools/dump-cpu-flags/README.md | 25 ++ devtools/dump-cpu-flags/cpu-names.txt | 120 +++++++++ devtools/dump-cpu-flags/dump-cpu-flags.cpp | 119 +++++++++ devtools/dump-cpu-flags/dump-cpu-flags.py | 41 +++ 6 files changed, 593 insertions(+) create mode 100644 config/x86/msvc/meson.build create mode 100644 devtools/dump-cpu-flags/README.md create mode 100644 devtools/dump-cpu-flags/cpu-names.txt create mode 100644 devtools/dump-cpu-flags/dump-cpu-flags.cpp create mode 100644 devtools/dump-cpu-flags/dump-cpu-flags.py -- 2.48.1.vfs.0.0