Răsfoiți Sursa

* 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 -
florian 10 ani în urmă
părinte
comite
fbda104d54
1 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 4 2
      compiler/x86/nx86cal.pas

+ 4 - 2
compiler/x86/nx86cal.pas

@@ -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;