浏览代码

Try to fix mipsel-android by making sure P does not point to a freed instruction

git-svn-id: trunk@45812 -
pierre 5 年之前
父节点
当前提交
0c6998bb11
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/mips/aoptcpu.pas

+ 3 - 1
compiler/mips/aoptcpu.pas

@@ -876,7 +876,7 @@ unit aoptcpu;
                                             end;
                                           { hp2 is still at b yyy }
                                           GetNextInstruction(hp2,hp1);
-                                          { hp2 is now at xxx: }
+                                          { hp1 is now at xxx: }
                                           condition:=inverse_cond(condition);
                                           GetNextInstruction(hp1,hp1);
                                           { hp1 is now at <several movs 2> }
@@ -891,6 +891,8 @@ unit aoptcpu;
                                           asml.remove(hp3);
                                           hp3.free;
                                           { remove jmp }
+                                          if (p=hp2) then
+                                            GetNextInstruction(hp2,p);
                                           tasmlabel(taicpu(hp2).oper[taicpu(hp2).ops-1]^.ref^.symbol).decrefs;
                                           RemoveDelaySlot(hp2);
                                           asml.remove(hp2);