From 6cf573a87c50bb2aacca8f25dace22a0d983207e Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Thu, 4 Jul 2024 12:47:16 -0500 Subject: [PATCH] Generate better code for equality comparisons against -1/0xFFFF. --- Gen.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gen.pas b/Gen.pas index 4bdf47d..1bf63d8 100644 --- a/Gen.pas +++ b/Gen.pas @@ -2259,6 +2259,8 @@ if (op^.optype in [cgByte,cgUByte,cgWord,cgUWord]) and end {if} else if num = 1 then GenImplied(m_dea) + else if num = -1 then + GenImplied(m_ina) else GenNative(m_cmp_imm, immediate, num, nil, 0); if opcode = pc_fjp then