mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:39:20 +02:00
* 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:
parent
8096ad3d1b
commit
fbda104d54
@ -48,7 +48,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
cgobj,
|
globtype,cgobj,
|
||||||
cgbase,cpubase,cgx86,cga,aasmdata,aasmcpu,
|
cgbase,cpubase,cgx86,cga,aasmdata,aasmcpu,
|
||||||
hlcgobj;
|
hlcgobj;
|
||||||
|
|
||||||
@ -88,7 +88,9 @@ implementation
|
|||||||
function tx86callnode.can_call_ref(var ref: treference): boolean;
|
function tx86callnode.can_call_ref(var ref: treference): boolean;
|
||||||
begin
|
begin
|
||||||
tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,ref);
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user