فهرست منبع

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

git-svn-id: trunk@35921 -
sergei 8 سال پیش
والد
کامیت
5165497498
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      compiler/mips/aoptcpu.pas

+ 2 - 2
compiler/mips/aoptcpu.pas

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