Ver Fonte

* MIPS: fixed TCpuAsmOptimizer.InstructionLoadsFromReg, it now correctly considers instructions that read their first operand.

git-svn-id: trunk@35921 -
sergei há 8 anos atrás
pai
commit
5165497498
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      compiler/mips/aoptcpu.pas

+ 2 - 2
compiler/mips/aoptcpu.pas

@@ -157,12 +157,12 @@ unit aoptcpu;
         exit;
       p:=taicpu(hp);
 
-      i:=1;
+      i:=0;
       while(i<p.ops) do
         begin
           case p.oper[I]^.typ of
             top_reg:
-              result:=(p.oper[I]^.reg=reg) and (I<2);
+              result:=(p.oper[I]^.reg=reg) and (p.spilling_get_operation_type(I)<>operand_write);
             top_ref:
               result:=
                 (p.oper[I]^.ref^.base=reg) or