mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 12:20:19 +02:00
Add code for writing 80-bit data with soft 80-bit extended when FPC_SOFT_FPUX80 is defined
git-svn-id: trunk@37297 -
This commit is contained in:
parent
59edd81a26
commit
735f9363d8
@ -250,6 +250,12 @@ Implementation
|
|||||||
{$ifdef memdebug}
|
{$ifdef memdebug}
|
||||||
cclasses,
|
cclasses,
|
||||||
{$endif memdebug}
|
{$endif memdebug}
|
||||||
|
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
|
||||||
|
{$else}
|
||||||
|
{$ifdef FPC_SOFT_FPUX80}
|
||||||
|
sfpux80,
|
||||||
|
{$endif}
|
||||||
|
{$endif}
|
||||||
script,fmodule,verbose,
|
script,fmodule,verbose,
|
||||||
cpuinfo,
|
cpuinfo,
|
||||||
aasmcpu;
|
aasmcpu;
|
||||||
@ -1045,6 +1051,10 @@ Implementation
|
|||||||
ccomp: comp;
|
ccomp: comp;
|
||||||
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
|
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
|
||||||
eextended: extended;
|
eextended: extended;
|
||||||
|
{$else}
|
||||||
|
{$ifdef FPC_SOFT_FPUX80}
|
||||||
|
eextended: floatx80;
|
||||||
|
{$endif}
|
||||||
{$endif cpuextended}
|
{$endif cpuextended}
|
||||||
begin
|
begin
|
||||||
if do_line then
|
if do_line then
|
||||||
@ -1087,6 +1097,19 @@ Implementation
|
|||||||
eextended:=extended(tai_realconst(hp).value.s80val);
|
eextended:=extended(tai_realconst(hp).value.s80val);
|
||||||
pdata:=@eextended;
|
pdata:=@eextended;
|
||||||
end;
|
end;
|
||||||
|
{$else}
|
||||||
|
{$ifdef FPC_SOFT_FPUX80}
|
||||||
|
aitrealconst_s80bit:
|
||||||
|
begin
|
||||||
|
if sizeof(tai_realconst(hp).value.s80val) = sizeof(double) then
|
||||||
|
eextended:=float64_to_floatx80(float64(double(tai_realconst(hp).value.s80val)))
|
||||||
|
else if sizeof(tai_realconst(hp).value.s80val) = sizeof(single) then
|
||||||
|
eextended:=float32_to_floatx80(float32(single(tai_realconst(hp).value.s80val)))
|
||||||
|
else
|
||||||
|
internalerror(2017091901);
|
||||||
|
pdata:=@eextended;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
{$endif cpuextended}
|
{$endif cpuextended}
|
||||||
aitrealconst_s64comp:
|
aitrealconst_s64comp:
|
||||||
begin
|
begin
|
||||||
@ -1780,6 +1803,8 @@ Implementation
|
|||||||
ddouble : double;
|
ddouble : double;
|
||||||
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
|
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
|
||||||
eextended : extended;
|
eextended : extended;
|
||||||
|
{$else}
|
||||||
|
eextended : floatx80;
|
||||||
{$endif}
|
{$endif}
|
||||||
ccomp : comp;
|
ccomp : comp;
|
||||||
tmp : word;
|
tmp : word;
|
||||||
@ -1850,6 +1875,19 @@ Implementation
|
|||||||
eextended:=extended(tai_realconst(hp).value.s80val);
|
eextended:=extended(tai_realconst(hp).value.s80val);
|
||||||
pdata:=@eextended;
|
pdata:=@eextended;
|
||||||
end;
|
end;
|
||||||
|
{$else}
|
||||||
|
{$ifdef FPC_SOFT_FPUX80}
|
||||||
|
aitrealconst_s80bit:
|
||||||
|
begin
|
||||||
|
if sizeof(tai_realconst(hp).value.s80val) = sizeof(double) then
|
||||||
|
eextended:=float64_to_floatx80(float64(double(tai_realconst(hp).value.s80val)))
|
||||||
|
else if sizeof(tai_realconst(hp).value.s80val) = sizeof(single) then
|
||||||
|
eextended:=float32_to_floatx80(float32(single(tai_realconst(hp).value.s80val)))
|
||||||
|
else
|
||||||
|
internalerror(2017091901);
|
||||||
|
pdata:=@eextended;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
{$endif cpuextended}
|
{$endif cpuextended}
|
||||||
aitrealconst_s64comp:
|
aitrealconst_s64comp:
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user