From d9c786fee68349b4ffe3400cbde2de879d4747f1 Mon Sep 17 00:00:00 2001 From: Karoly Balogh Date: Sat, 25 May 2024 00:00:22 +0300 Subject: [PATCH] m68k: also allow TST from before Sxx instructions with explicit .b size to be optimized away --- compiler/m68k/aoptcpu.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/m68k/aoptcpu.pas b/compiler/m68k/aoptcpu.pas index 5408fecacb..368ab7213d 100644 --- a/compiler/m68k/aoptcpu.pas +++ b/compiler/m68k/aoptcpu.pas @@ -231,7 +231,7 @@ unit aoptcpu; MatchInstruction(next,A_TST,[taicpu(p).opsize]) and MatchOperand(taicpu(p).oper[1]^,taicpu(next).oper[0]^) and GetNextInstruction(next,next2) and - MatchInstruction(next2,[A_BXX,A_SXX],[S_NO]) and + MatchInstruction(next2,[A_BXX,A_SXX],[S_NO,S_B]) and (taicpu(next2).condition in [C_NE,C_EQ,C_PL,C_MI]) then begin opstr:=opname(p);