|
@@ -129,24 +129,40 @@ TYPE
|
|
|
sbits64 = int64;
|
|
|
|
|
|
{$ifdef ENDIAN_LITTLE}
|
|
|
- float64 = packed record
|
|
|
- low: bits32;
|
|
|
- high: bits32;
|
|
|
+ float64 = record
|
|
|
+ case byte of
|
|
|
+ 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;
|
|
|
|
|
|
- int64rec = packed record
|
|
|
- low: bits32;
|
|
|
- high: bits32;
|
|
|
+ int64rec = record
|
|
|
+ case byte of
|
|
|
+ 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;
|
|
|
|
|
|
- floatx80 = packed record
|
|
|
- low : qword;
|
|
|
- high : word;
|
|
|
+ floatx80 = record
|
|
|
+ case byte of
|
|
|
+ 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;
|
|
|
|
|
|
- float128 = packed record
|
|
|
- low : qword;
|
|
|
- high : qword;
|
|
|
+ float128 = record
|
|
|
+ case byte of
|
|
|
+ 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;
|
|
|
{$else}
|
|
|
float64 = record
|
|
@@ -157,18 +173,31 @@ TYPE
|
|
|
2: (dummy : double);
|
|
|
end;
|
|
|
|
|
|
- int64rec = packed record
|
|
|
- high,low : bits32;
|
|
|
- end;
|
|
|
+ int64rec = record
|
|
|
+ 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 = packed record
|
|
|
- high : word;
|
|
|
- low : qword;
|
|
|
+ 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;
|
|
|
|
|
|
- float128 = packed record
|
|
|
- high : qword;
|
|
|
- low : qword;
|
|
|
+ float128 = record
|
|
|
+ case byte of
|
|
|
+ 1: (high : qword;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;
|
|
|
{$endif}
|
|
|
|