5 ms·
> Modern x86 systems use SSE registers Are your sure of this? It's my understanding that SSE registers require the use of a special API and standard floating p
by DubiousPusher 7y ago
> Modern x86 systems use SSE registers
Are your sure of this? It's my understanding that SSE registers require the use of a special API and standard floating point operations do not use them.
But the last time I worked with them was writing a SIMD vector library 7 years ago.
- hrydgard 7y agoCompilers now exclusively target the SSE registers (with scalar SSE instructions like mulss), and they did 7 years ago too.
- account42 7y agohttps://gcc.gnu.org/onlinedocs/gcc/x86-Options.html https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html -mfpmath=unit Generate floating-point arithmetic for selected unit unit. The choices for unit are: ‘387’ Use the standard 387 floating-point coprocessor present on the majority of chips and emulated otherwise. Code compiled with this option runs almost everywhere. The temporary results are computed in 80-bit precision instead of the precision specified by the type, resulting in slightly different results compared to most of other chips. See -ffloat-store for more detailed description. This is the default choice for non-Darwin x86-32 targets.
- berkut 7y agoI'm pretty certain all 64-bit x86 (so amd64) systems support SSE 2, so FP calcs are done with these registers.
- titzer 7y ago> It's my understanding that SSE registers require the use of a special API and standard floating point operations do not use them. No, SSE registers are used by most compilers that do floating point these days. They support all the usual IEEE float math operations and a host of bit twiddling operations as well as vector operations. The vector operations do still require using compiler intrinsics in C++, although some autovectorization does occur in gcc, icc, and llvm.
- DubiousPusher 7y agoAh yes. This is what I was remembering. For vector operations you have to use special intrinsics
- Tuna-Fish 7y ago64-bit x86 CPUs are defined to support SSE2 as a minimum, and all 64-bit operating systems use it by default. For 32-bit systems, you still theoretically have to check, but I think every halfway modern compiler also uses SSE2 as the default target.