Browse Source

* Xtensa: fix crash in TCpuAsmOptimizer.RegLoadedWithNewValue

git-svn-id: trunk@49132 -
florian 4 years ago
parent
commit
9a39124118
1 changed files with 1 additions and 4 deletions
  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