浏览代码

* set p to a valid instruction

git-svn-id: trunk@25912 -
florian 11 年之前
父节点
当前提交
1843ed59b5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/i386/popt386.pas

+ 2 - 0
compiler/i386/popt386.pas

@@ -1409,6 +1409,7 @@ begin
                           insertllitem(asml,hp2,hp2.next,hp1);
                           insertllitem(asml,hp2,hp2.next,hp1);
                           asml.remove(p);
                           asml.remove(p);
                           p.free;
                           p.free;
+                          p:=hp1;
                         end;
                         end;
                       if GetNextInstruction(p, hp1) and
                       if GetNextInstruction(p, hp1) and
                          MatchInstruction(hp1,A_LEA,[S_L]) and
                          MatchInstruction(hp1,A_LEA,[S_L]) and
@@ -1433,6 +1434,7 @@ begin
                               DebugMsg('Peephole MovLea2Add done',hp1);
                               DebugMsg('Peephole MovLea2Add done',hp1);
                               asml.remove(p);
                               asml.remove(p);
                               p.free;
                               p.free;
+                              p:=hp1;
                             end;
                             end;
                         end;
                         end;
                     end;
                     end;