Browse Source

* fixed bug fixref whereby a register of a reference was overwritten

git-svn-id: trunk@2212 -
Jonas Maebe 19 years ago
parent
commit
5e9db609e3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/powerpc/cgcpu.pas

+ 4 - 1
compiler/powerpc/cgcpu.pas

@@ -2062,7 +2062,10 @@ const
              else if (ref.index = NR_NO) then
                ref.index := tmpreg
              else
-               list.concat(taicpu.op_reg_reg_reg(A_ADD,ref.base,ref.base,tmpreg));
+               begin
+                 list.concat(taicpu.op_reg_reg_reg(A_ADD,tmpreg,ref.base,tmpreg));
+                 ref.base := tmpreg;
+               end;
              ref.symbol := nil;
            end;