[fpc-devel] softfloat: sizeOf( floatx80 )

Jonas Maebe jonas at freepascal.org
Sat Sep 28 10:55:07 CEST 2024


On 28/09/2024 10:26, Martin Frb via fpc-devel wrote:
> 
> In addition, now googled, on wikipedia there is only one format for 
> 80bits? (unless I missed something). But it's in a paragraph referring 
> to x86...
> https://en.wikipedia.org/wiki/Extended_precision#x86_extended_precision_format
> 
> 
>  From that any debugger on any platform seems to be able to read such a 
> float. So I presumed that for a given length there is a standard how the 
> number should be represented in memory?
> 
> I haven't tested if e.g. gdb would on a big endian be able to read an 
> 80bit float. Or if it would just say that is an invalid size for the 
> platform.

Some ABIs require aligning and padding the value in memory to 16 bytes 
(maybe some also to 12 bytes).

On trunk, it could be solved with packing + an align directive, although 
then you'd still have to hard-code the alignment per platform using 
ifdefs (or add an "alignof" intrinsic).


Jonas


More information about the fpc-devel mailing list