Browse Source

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 years ago
parent
commit
587acf6452
1 changed files with 5 additions and 2 deletions
  1. 5 2
      compiler/rgobj.pas

+ 5 - 2
compiler/rgobj.pas

@@ -1389,7 +1389,7 @@ unit rgobj;
         colourednodes : Tsuperregisterset;
         adj_colours:set of 0..255;
         found : boolean;
-
+        tmpr: tregister;
     begin
       spillednodes.clear;
       {Reset colours}
@@ -1413,7 +1413,10 @@ unit rgobj;
                 if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then
                   include(adj_colours,reginfo[a].colour);
               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);
           {Assume a spill by default...}
           found:=false;