Browse Source

Fix error in register allocation inside fixref method

Pierre Muller 4 days ago
parent
commit
49c9a1f323
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/loongarch64/cgcpu.pas

+ 1 - 1
compiler/loongarch64/cgcpu.pas

@@ -1619,7 +1619,7 @@ implementation
           begin
             if ref.offset<>0 then
               begin
-                if (tmpreg<>NR_NO) and (ref.index=tmpreg) then
+                if (tmpreg<>NR_NO) and ((ref.index=tmpreg) or (ref.base=tmpreg)) then
                   begin
                     tmpreg2:=getintregister(list,OS_INT);
                     ltmpreg:=tmpreg2;