[fpc-devel] 64 Bit / 32 Bit

Daniël Mantione daniel.mantione at freepascal.org
Thu Oct 4 12:36:13 CEST 2007



Op Thu, 4 Oct 2007, schreef Michael Schnell:

> 
> > It is supported but deprecated because x87 fpu simply gives compilers a
> > headache.
> Are there new floating point instruction in the 64 bit instruction set and the
> old instructions are still there but not necessary to access the floating
> point hardware ?
> 
> If so, why would any 64 bit compiler use the old instructions at all ?
> 
> Do you suggest that the 80 bit IEEE floating point type is not supported by
> the 64 bit instruction set (so that the old instructions are necessary to
> handle this data type) ? Why would the CPU designers omit this type ?

The x86 has nowadays 2 fpu's: the x87 and SSE. SSE does single and 
(if SSE2 present) double precision, the x87 single double and extended.
On x86_64 the calling conventions have been designed to use the SSE 
registers.

This is also the difference between Windows and Linux: Under Linux, the 
extended precision is still defined in the calling convention, under Win64 
it is not. It can still be used, but you need your own propietary calling 
convention.

Still, we're planning to support the extended on all platforms by means of 
softfloat. It could perhaps be a bit strange to do softfloat on Win64 if 
it can be done in hardware. But that is a future discussion.

Daniël


More information about the fpc-devel mailing list