浏览代码

--- Merging r30110 into '.':
U compiler/mips/aoptcpu.pas

git-svn-id: branches/fixes_3_0@32666 -

Jonas Maebe 9 年之前
父节点
当前提交
cb6fd57009
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/mips/aoptcpu.pas

+ 3 - 1
compiler/mips/aoptcpu.pas

@@ -310,7 +310,9 @@ unit aoptcpu;
 
   function TCpuAsmOptimizer.TryRemoveMovToRefIndex(var p: tai; next: taicpu): boolean;
     begin
-      result:=(next.oper[1]^.typ=top_ref) and
+      result:=(next.ops>1) and
+        (next.oper[1]^.typ=top_ref) and
+        (next.oper[1]^.ref^.refaddr<>addr_full) and
         (next.oper[1]^.ref^.base=taicpu(p).oper[0]^.reg) and
         (not RegModifiedBetween(taicpu(p).oper[1]^.reg,p,next)) and
         Assigned(FindRegDealloc(taicpu(p).oper[0]^.reg,tai(next.next)));