From 2d77e8b35f89cf9c4e223f05cd6f985c445529af Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 27 Mar 2001 22:57:20 +0000 Subject: [PATCH] Make the last change more generic git-svn-id: svn://svn.cc65.org/cc65/trunk@681 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/optimize.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cc65/optimize.c b/src/cc65/optimize.c index 4676deaaa..4c84c214e 100644 --- a/src/cc65/optimize.c +++ b/src/cc65/optimize.c @@ -1765,19 +1765,19 @@ static void OptLoads (void) /* Search for * - * adc #xx + * adc xx * bcc *+3 * inx * * Remove the handling of the high byte if the X register * is not used any more */ - } else if (LineMatch (L, "\tadc\t#") && - GetNextCodeLines (L, L2, 3) && + } else if (LineMatch (L, "\tadc\t") && + GetNextCodeLines (L, L2, 3) && LineFullMatch (L2[0], "\tbcc\t*+3") && LineFullMatch (L2[1], "\tinx") && - L2[1]->Next && - IsHint (L2[1]->Next, "x:!") && + L2[1]->Next && + IsHint (L2[1]->Next, "x:!") && !RegXUsed (L2[1])) { /* Delete the lines */ @@ -1785,14 +1785,14 @@ static void OptLoads (void) /* Search for * - * sbc #xx + * sbc xx * bcs *+3 * dex * * Remove the handling of the high byte if the X register * is not used any more */ - } else if (LineMatch (L, "\tsbc\t#") && + } else if (LineMatch (L, "\tsbc\t") && GetNextCodeLines (L, L2, 3) && LineFullMatch (L2[0], "\tbcs\t*+3") && LineFullMatch (L2[1], "\tdex") && @@ -1809,7 +1809,7 @@ static void OptLoads (void) if (!LineFullMatch (L, "\tldx\t#$00")) { /* Next line */ goto NextLine; - } + } /* Search for: * -- 2.39.5