2 ms·
All SSE instructions can be encoded into VEX and won’t trigger the issue. It’s just an unfortunate combination of compiler and linker settings, where compiler u
by Const-me 6y ago
All SSE instructions can be encoded into VEX and won’t trigger the issue. It’s just an unfortunate combination of compiler and linker settings, where compiler used legacy encoding despite AVX was enabled somewhere else.
Modern compilers are aware, e.g. check out gcc 10: https://godbolt.org/z/39v98r https://godbolt.org/z/39v98r I asked it to compile for Sandy Bridge and the compiler has encoded all vector instruction in VEX, you can tell by opcodes starting with v, e.g. vmovmskpd instead of just movmskpd: https://www.felixcloutier.com/x86/movmskpd https://www.felixcloutier.com/x86/movmskpd
- makomk 6y agoThat's not much help when the function being called is in a shared system library like ld.so or libc that needs to support being used both by older binaries that use SSE and newer ones that use AVX, which I think is the case here. People aren't just going to recompile every single program on the planet and break backwards compatibility with older systems in the process, so on some level I think there's no alternative but to work around this. (Also, remember that SSE is used for even non-vectorized floating point in modern software, and that a lot of the vectorized stuff is likely to be hand-optimized assembler.)
- gnufx 6y agoGNU libc, at least, has versions of a variety of functions for different SIMD variants with runtime dispatch. You can provide that with GCC attributes, or explicitly with the cpuid-like mechanisms typically used in linear algebra libraries, for instance.