浏览代码

* Xtensa: fix crash in TCpuAsmOptimizer.RegLoadedWithNewValue

git-svn-id: trunk@49132 -
florian 4 年之前
父节点
当前提交
9a39124118
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      compiler/xtensa/aoptcpu.pas

+ 1 - 4
compiler/xtensa/aoptcpu.pas

@@ -145,10 +145,7 @@ Implementation
     begin
     begin
       p := taicpu(hp);
       p := taicpu(hp);
       Result := false;
       Result := false;
-      if not ((assigned(hp)) and (hp.typ = ait_instruction)) then
-        exit;
-
-      if Result then
+      if not(assigned(hp) and (hp.typ = ait_instruction) and (p.ops > 0)) then
         exit;
         exit;
 
 
       case p.opcode of
       case p.opcode of