소스 검색

* Remove register allocations of coalesced registers if the alias
register is spilled.

Yuriy Sydorov 3 년 전
부모
커밋
b96057adeb
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      compiler/rgobj.pas

+ 3 - 2
compiler/rgobj.pas

@@ -2467,8 +2467,9 @@ unit rgobj;
                   begin
                     if (getregtype(reg)=regtype) then
                       begin
-                        {A register allocation of a spilled register can be removed.}
-                        supreg:=getsupreg(reg);
+                        {A register allocation of the spilled register (and all coalesced registers) 
+                         must be removed.}
+                        supreg:=get_alias(getsupreg(reg));
                         if supregset_in(regs_to_spill_set,supreg) then
                           begin
                             { Remove loading of the register from its initial memory location