blob: daeb7a12adcd1b01130507a2d5759bd0f28d75f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
80-bit floating-point math on ppc64le
From [this comment](https://github.com/ptitSeb/box64/issues/242#issuecomment-1052656727) by @ptitSeb :
> SSE/SSE2 instruction are converted t the underling SIMD instruction. Same for x87 that are converted to Float and Double operation (ignoring 80bits operation for most part).
[According to](https://github.com/FEX-Emu/FEX/issues/2409#issuecomment-1432585400) @awilfox :
> There is quad-float support in hardware with ISA 3.0 (Power9).
It might be interesting to support 80-bit x87 math on POWER9 via quad-precision floating-point math, for a speed-up when the default [BOX64_X87_NO80BITS=0](https://github.com/ptitSeb/box64/blob/main/docs/USAGE.md#box64_x87_no80bits-) is used.
My understanding is that quad float is only hardware-accelerated in POWER9 and higher (so POWER8LE users would need to disable it), and is only aliased to `long double` on a subset of distros (e.g. recent Fedora, grep [Talospace](https://talospace.com/) for articles that mention "long double").
It looks to me like the GCC options you want are `-mfloat128 -mfloat128-hardware`, and then use the `__float128` data type instead of `long double` so that it works as expected on older distros.
|