Browse Source

m68k: also allow TST from before Sxx instructions with explicit .b size to be optimized away

Karoly Balogh 1 year ago
parent
commit
d9c786fee6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/m68k/aoptcpu.pas

+ 1 - 1
compiler/m68k/aoptcpu.pas

@@ -231,7 +231,7 @@ unit aoptcpu;
         MatchInstruction(next,A_TST,[taicpu(p).opsize]) and
         MatchInstruction(next,A_TST,[taicpu(p).opsize]) and
         MatchOperand(taicpu(p).oper[1]^,taicpu(next).oper[0]^) and
         MatchOperand(taicpu(p).oper[1]^,taicpu(next).oper[0]^) and
         GetNextInstruction(next,next2) 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
         (taicpu(next2).condition in [C_NE,C_EQ,C_PL,C_MI]) then
         begin
         begin
           opstr:=opname(p);
           opstr:=opname(p);