Fix F16C build/runtime detection on Visual Studio
This attempts to fix the Visual Studio build for deciding on the code paths that we take depending on whether the running system uses a CPU that support F16C instructions:
Improve the compiler check in the Meson build files, since there are no
__buildint_cpu...()functions provided by Visual Studio. Also allow checking for F16C on 32-bit Visual Studio builds.
Implement runtime F16C instructions detection using the
__cpuid()intrinsic on Visual Studio, and call the corresponding implementation for
float_to_half4()accordingly. Note that
__attribute__is a GCCism, and there is no corresponding Visual Studio extension for
ifunc, so do something similar to what is done on Darwin.
__m128i_u const *cast with
__m128i const *on Visual Studio, since there is no
__m128i_uon Visual Studio, and it is safe to just use
With blessings, thank you!