[Info-vax] xcc long double implementation
gah4
gah4 at u.washington.edu
Tue Sep 7 17:56:35 EDT 2021
On Friday, September 3, 2021 at 5:03:59 AM UTC-7, osuv... at gmail.com wrote:
> The long double data type on the X86 cross compiler is broken, seriously broken.
> I'm just curious about what format they intend it to be.
> The sizeof operator says it's 16 bytes, implying it's using 128-bits.
> Are they assuming the assuming the hardware doesn't support 128-bit fp
> and trying to do a software implementation?
The sizeof operator includes any padding needed. So, being 16 does NOT imply that
it is using 16 bytes, but only that when padded appropriately it will take that many.
Either 8 or 16 byte alignment will round 10 up to 16.
The original idea behind the 80 bit format was to allow extra precision for
intermediate results in calculations. It does that somewhat well, though compilers
complicate even that. Some compilers try to keep values in registers between
statements, giving unexpected extra precision. When compared to results without
that precision, surprising differences occur.
But otherwise, it mostly works well for intermediate values. I never wanted to
use it otherwise. I sometimes do wish for true REAL*16 like IBM S/370 and VAX
have, and more recently RISC-V has, at least an option for it.
It seems that there are now real servers with RISC-V chips, but I don't know if
they implement it.
More information about the Info-vax
mailing list