mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 00:39:15 +02:00
* take care of the used fpu instruction set when saving/restoring function results on x86
git-svn-id: trunk@8617 -
This commit is contained in:
parent
86164b3a8d
commit
4cd15058df
@ -136,6 +136,17 @@ interface
|
|||||||
end;
|
end;
|
||||||
if pushedfpu then
|
if pushedfpu then
|
||||||
begin
|
begin
|
||||||
|
{$ifdef x86}
|
||||||
|
if use_sse(left.resultdef) then
|
||||||
|
begin
|
||||||
|
tmpreg := cg.getmmregister(current_asmdata.CurrAsmList,left.location.size);
|
||||||
|
cg.a_loadmm_loc_reg(current_asmdata.CurrAsmList,left.location.size,left.location,tmpreg,mms_movescalar);
|
||||||
|
location_reset(left.location,LOC_MMREGISTER,left.location.size);
|
||||||
|
left.location.register := tmpreg;
|
||||||
|
end
|
||||||
|
{$endif x86}
|
||||||
|
else
|
||||||
|
begin
|
||||||
tmpreg := cg.getfpuregister(current_asmdata.CurrAsmList,left.location.size);
|
tmpreg := cg.getfpuregister(current_asmdata.CurrAsmList,left.location.size);
|
||||||
cg.a_loadfpu_loc_reg(current_asmdata.CurrAsmList,left.location.size,left.location,tmpreg);
|
cg.a_loadfpu_loc_reg(current_asmdata.CurrAsmList,left.location.size,left.location,tmpreg);
|
||||||
location_reset(left.location,LOC_FPUREGISTER,left.location.size);
|
location_reset(left.location,LOC_FPUREGISTER,left.location.size);
|
||||||
@ -146,6 +157,7 @@ interface
|
|||||||
{$endif x86}
|
{$endif x86}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgaddnode.set_result_location_reg;
|
procedure tcgaddnode.set_result_location_reg;
|
||||||
|
Loading…
Reference in New Issue
Block a user