From 9a39124118cc4b065774f84a7a7d7cfdcc8456c1 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 7 Apr 2021 13:54:58 +0000 Subject: [PATCH] * Xtensa: fix crash in TCpuAsmOptimizer.RegLoadedWithNewValue git-svn-id: trunk@49132 - --- compiler/xtensa/aoptcpu.pas | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/xtensa/aoptcpu.pas b/compiler/xtensa/aoptcpu.pas index c3c593cc0a..1c68ee17dc 100644 --- a/compiler/xtensa/aoptcpu.pas +++ b/compiler/xtensa/aoptcpu.pas @@ -145,10 +145,7 @@ Implementation begin p := taicpu(hp); 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; case p.opcode of