* do not use a_call_ref for procedures allocating all registers since it break spilling, see also issue #28639, resolves issue #28639

git-svn-id: trunk@31608 -
This commit is contained in:
florian 2015-09-11 20:56:05 +00:00
parent 8096ad3d1b
commit fbda104d54

View File

@ -48,7 +48,7 @@ interface
implementation
uses
cgobj,
globtype,cgobj,
cgbase,cpubase,cgx86,cga,aasmdata,aasmcpu,
hlcgobj;
@ -88,7 +88,9 @@ implementation
function tx86callnode.can_call_ref(var ref: treference): boolean;
begin
tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,ref);
result:=true;
{ do not use a ref. for calling conventions which allocate all registers, the reg. allocator cannot handle this, see
also issue #28639, I were not able to create a simple example though to cause the resulting endless spilling }
result:=not(procdefinition.proccalloption in [pocall_far16,pocall_pascal,pocall_oldfpccall]);
end;