mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 08:48:08 +02:00
Also use union with double field to ensure correct alignment for float64 type from genmath.inc source
git-svn-id: trunk@45779 -
This commit is contained in:
parent
ac5407268c
commit
834dbf5f80
@ -62,21 +62,26 @@
|
||||
type
|
||||
PReal = ^Real;
|
||||
{ also necessary for Int() on systems with 64bit floats (JM) }
|
||||
{ union required to get correct alignement for floating point type }
|
||||
{$ifndef FPC_SYSTEM_HAS_float64}
|
||||
{$ifdef ENDIAN_LITTLE}
|
||||
float64 = record
|
||||
{$ifndef FPC_DOUBLE_HILO_SWAPPED}
|
||||
low,high: longint;
|
||||
case byte of
|
||||
1: (dummy : double);
|
||||
{$ifndef FPC_DOUBLE_HILO_SWAPPED}
|
||||
2: (low,high: longint);
|
||||
{$else}
|
||||
high,low: longint;
|
||||
2: (high,low: longint);
|
||||
{$endif FPC_DOUBLE_HILO_SWAPPED}
|
||||
end;
|
||||
{$else}
|
||||
float64 = record
|
||||
case byte of
|
||||
1: (dummy : double);
|
||||
{$ifndef FPC_DOUBLE_HILO_SWAPPED}
|
||||
high,low: longint;
|
||||
2: (high,low: longint);
|
||||
{$else}
|
||||
low,high: longint;
|
||||
2: (low,high: longint);
|
||||
{$endif FPC_DOUBLE_HILO_SWAPPED}
|
||||
end;
|
||||
{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user