4 ms·
x87 is 80-bit floating point. They literally don't fit inside of 64-bit doubles of SSE. The extra bits need to be emulated. EDIT: And I'm sure there's some pr
by dragontamer 4y ago
x87 is 80-bit floating point. They literally don't fit inside of 64-bit doubles of SSE.
The extra bits need to be emulated.
EDIT: And I'm sure there's some program out there that actually relies on those extra 16-bits of precision, and they'd be pissed if their least-significant bit had a fraction-of-a-bit more error per operation.
- gpderetta 4y agoThey are not emulated, they run at optimal latency (in fact on Ice Lake FADD has better latency than ADDSD!), although at a lower throughput as there are less dedicated execution units.
- dragontamer 4y agoThat's a strong point. I guess they really aren't emulated then. That really makes me wonder how the 80-bits are stored then. I guess the "stack" is just part of the register-renaming mechanism? Huh... AVX registers are 256-bits, so I guess 80-bits fits in each one.
- gpderetta 4y agoYes, x86 stack per se doesn't exist anymore and it is mapped to the general register file. I have no idea how the 80 bits are handled. I thought that the AVX registers mapped to multiple entries in the file, but maybe I'm wrong.
- monocasa 4y agoIts own register file (that is shared with the AVX-512 K mask registers). https://travisdowns.github.io/blog/2020/05/26/kreg2.html https://travisdowns.github.io/blog/2020/05/26/kreg2.html
- gpderetta 4y agoNice find! In fact I think I must have read this article when it made the rounds. Then I must have promptly forgotten it :)