mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:09:15 +02:00
* don't pack softfpu helper records and added dummy for proper alignment, generates much better code on CPUs like arm
git-svn-id: trunk@20398 -
This commit is contained in:
parent
6278c2473e
commit
f0f64a573b
@ -129,24 +129,40 @@ TYPE
|
|||||||
sbits64 = int64;
|
sbits64 = int64;
|
||||||
|
|
||||||
{$ifdef ENDIAN_LITTLE}
|
{$ifdef ENDIAN_LITTLE}
|
||||||
float64 = packed record
|
float64 = record
|
||||||
low: bits32;
|
case byte of
|
||||||
high: bits32;
|
1: (low,high : bits32);
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : double);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
int64rec = packed record
|
int64rec = record
|
||||||
low: bits32;
|
case byte of
|
||||||
high: bits32;
|
1: (low,high : bits32);
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : int64);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
floatx80 = packed record
|
floatx80 = record
|
||||||
low : qword;
|
case byte of
|
||||||
high : word;
|
1: (low : qword;high : word);
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : extended);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
float128 = packed record
|
float128 = record
|
||||||
low : qword;
|
case byte of
|
||||||
high : qword;
|
1: (low,high : qword);
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : qword);
|
||||||
end;
|
end;
|
||||||
{$else}
|
{$else}
|
||||||
float64 = record
|
float64 = record
|
||||||
@ -157,18 +173,31 @@ TYPE
|
|||||||
2: (dummy : double);
|
2: (dummy : double);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
int64rec = packed record
|
int64rec = record
|
||||||
high,low : bits32;
|
case byte of
|
||||||
|
1: high,low : bits32;
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : int64);
|
||||||
|
end;
|
||||||
|
|
||||||
|
floatx80 = record
|
||||||
|
case byte of
|
||||||
|
1: (high : word;low : qword);
|
||||||
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
|
// and avoid expensive unpacking/packing operations
|
||||||
|
2: (dummy : qword);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
floatx80 = packed record
|
float128 = record
|
||||||
high : word;
|
case byte of
|
||||||
low : qword;
|
1: (high : qword;low : qword);
|
||||||
end;
|
// force the record to be aligned like a double
|
||||||
|
// else *_to_double will fail for cpus like sparc
|
||||||
float128 = packed record
|
// and avoid expensive unpacking/packing operations
|
||||||
high : qword;
|
2: (dummy : qword);
|
||||||
low : qword;
|
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user