[fpc-devel] Extended in Win64
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue May 6 15:21:47 CEST 2008
On 06 May 2008, at 15:02, petr.kristan at epos.cz wrote:
> Why on Win64 on AMD64 is Extended type 64bit same as double and on
> Win32, Linux32 and
> Linux64 is 80bit.
Because the original win64 releases did not support the use of the
80x87 floating point unit, and it's still considered to be deprecated.
The SSE/SSE2/SSE3/SSE4 units do not support the 80 bit floating point
type.
> It breaks for example this construction:
>
> procedure Swap(var X, Y: Double); overload;
> procedure Swap(var X, Y: Extended); overload;
This construction also doesn't work on all non-x86 platforms. The
proper way is to use the following macros to conditionalise your code:
FPC_HAS_TYPE_SINGLE
FPC_HAS_TYPE_DOUBLE
FPC_HAS_TYPE_EXTENDED
Jonas
More information about the fpc-devel
mailing list