* 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:
florian 2012-02-22 20:13:38 +00:00
parent 6278c2473e
commit f0f64a573b

View File

@ -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}