Przeglądaj źródła

* fixed register allocation of gen_load_para_value() and backwards
extension of regalloc info in general

git-svn-id: trunk@4293 -

Jonas Maebe 19 lat temu
rodzic
commit
7bb3a1fe22
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 4 0
      compiler/psub.pas
  2. 1 1
      compiler/rgobj.pas

+ 4 - 0
compiler/psub.pas

@@ -792,7 +792,11 @@ implementation
             assign_regvars(code);
             assign_regvars(code);
 {$endif oldreg}
 {$endif oldreg}
             aktfilepos:=entrypos;
             aktfilepos:=entrypos;
+            { record which registers are allocated here, since all code }
+            { allocating registers comes after it                       }
+            cg.set_regalloc_extend_backwards(true);
             gen_load_para_value(templist);
             gen_load_para_value(templist);
+            cg.set_regalloc_extend_backwards(false);
 
 
             { caller paraloc info is also necessary in the stackframe_entry
             { caller paraloc info is also necessary in the stackframe_entry
               code of the ppc (and possibly other processors)               }
               code of the ppc (and possibly other processors)               }

+ 1 - 1
compiler/rgobj.pas

@@ -371,6 +371,7 @@ unit rgobj;
          if high(Ausable)=0 then
          if high(Ausable)=0 then
            internalerror(200210181);
            internalerror(200210181);
          extend_live_range_backwards := false;
          extend_live_range_backwards := false;
+         supregset_reset(extended_backwards,false,high(tsuperregister));
          first_imaginary:=Afirst_imaginary;
          first_imaginary:=Afirst_imaginary;
          maxreg:=Afirst_imaginary;
          maxreg:=Afirst_imaginary;
          regtype:=Aregtype;
          regtype:=Aregtype;
@@ -682,7 +683,6 @@ unit rgobj;
         if (b) then
         if (b) then
           begin
           begin
             { new registers may be allocated }
             { new registers may be allocated }
-            supregset_reset(extended_backwards,false,high(tsuperregister));
             supregset_reset(backwards_was_first,false,high(tsuperregister));
             supregset_reset(backwards_was_first,false,high(tsuperregister));
             do_extend_live_range_backwards := true;
             do_extend_live_range_backwards := true;
           end
           end