浏览代码

fix infinite spilling on m68k, patch by Florian, additional IE workaround by me, based on a similar hack in the ARM cg...

git-svn-id: trunk@26465 -
Károly Balogh 11 年之前
父节点
当前提交
587acf6452
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      compiler/rgobj.pas

+ 5 - 2
compiler/rgobj.pas

@@ -1389,7 +1389,7 @@ unit rgobj;
         colourednodes : Tsuperregisterset;
         colourednodes : Tsuperregisterset;
         adj_colours:set of 0..255;
         adj_colours:set of 0..255;
         found : boolean;
         found : boolean;
-
+        tmpr: tregister;
     begin
     begin
       spillednodes.clear;
       spillednodes.clear;
       {Reset colours}
       {Reset colours}
@@ -1413,7 +1413,10 @@ unit rgobj;
                 if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then
                 if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then
                   include(adj_colours,reginfo[a].colour);
                   include(adj_colours,reginfo[a].colour);
               end;
               end;
-          if regtype=R_INTREGISTER then
+          { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
+          {        while compiling the compiler. }
+          tmpr:=NR_STACK_POINTER_REG;
+          if regtype=getregtype(tmpr) then
             include(adj_colours,RS_STACK_POINTER_REG);
             include(adj_colours,RS_STACK_POINTER_REG);
           {Assume a spill by default...}
           {Assume a spill by default...}
           found:=false;
           found:=false;