Browse Source

Added correction to AllocRegBetween

J. Gareth "Curious Kit" Moreton 3 years ago
parent
commit
6b26fa0f9a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/aoptobj.pas

+ 1 - 0
compiler/aoptobj.pas

@@ -1410,6 +1410,7 @@ Unit AoptObj;
             hp := tai_regalloc.alloc(reg,nil);
             hp := tai_regalloc.alloc(reg,nil);
             insertllItem(p1.previous,p1,hp);
             insertllItem(p1.previous,p1,hp);
             IncludeRegInUsedRegs(reg,initialusedregs);
             IncludeRegInUsedRegs(reg,initialusedregs);
+            lastRemovedWasDealloc := True; { If no tai_regallocs are found at all, treat as if the last one was a deallocation }
           end;
           end;
         while assigned(p1) and
         while assigned(p1) and
               (p1 <> p2) do
               (p1 <> p2) do