Browse Source

Modify code to avoid error when compiling with -CriotR option

git-svn-id: trunk@44145 -
pierre 5 years ago
parent
commit
40a6059143
1 changed files with 5 additions and 4 deletions
  1. 5 4
      compiler/rgobj.pas

+ 5 - 4
compiler/rgobj.pas

@@ -1598,11 +1598,12 @@ unit rgobj;
           {        while compiling the compiler. }
           {        while compiling the compiler. }
           tmpr:=NR_STACK_POINTER_REG;
           tmpr:=NR_STACK_POINTER_REG;
           { e.g. AVR does not have a stack pointer register }
           { e.g. AVR does not have a stack pointer register }
-{$push}{$warnings off}
-          if (RS_STACK_POINTER_REG<>RS_INVALID) and
-{$pop}
-            (regtype=getregtype(tmpr)) then
+{$if defined(RS_STACK_POINTER_REG)}
+  {$if (RS_STACK_POINTER_REG<>RS_INVALID)}
+          if (regtype=getregtype(tmpr)) then
             include(adj_colours,RS_STACK_POINTER_REG);
             include(adj_colours,RS_STACK_POINTER_REG);
+  {$ifend}
+{$ifend}
           {Assume a spill by default...}
           {Assume a spill by default...}
           found:=false;
           found:=false;
           {Search for a colour not in this list.}
           {Search for a colour not in this list.}