Handle more opcodes in OptCmp2

git-svn-id: svn://svn.cc65.org/cc65/trunk@2482 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-10-08 21:23:39 +00:00
parent 4cbf8b352d
commit 9a2b4dc849

View File

@@ -6,9 +6,9 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2001-2002 Ullrich von Bassewitz */ /* (C) 2001-2003 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* R<EFBFBD>merstrasse 52 */
/* D-70597 Stuttgart */ /* D-70794 Filderstadt */
/* EMail: uz@cc65.org */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
@@ -361,10 +361,12 @@ unsigned OptCmp2 (CodeSeg* S)
/* Check for the sequence */ /* Check for the sequence */
if ((L[0]->OPC == OP65_ADC || if ((L[0]->OPC == OP65_ADC ||
L[0]->OPC == OP65_AND || L[0]->OPC == OP65_AND ||
L[0]->OPC == OP65_ASL ||
L[0]->OPC == OP65_DEA || L[0]->OPC == OP65_DEA ||
L[0]->OPC == OP65_EOR || L[0]->OPC == OP65_EOR ||
L[0]->OPC == OP65_INA || L[0]->OPC == OP65_INA ||
L[0]->OPC == OP65_LDA || L[0]->OPC == OP65_LDA ||
L[0]->OPC == OP65_LSR ||
L[0]->OPC == OP65_ORA || L[0]->OPC == OP65_ORA ||
L[0]->OPC == OP65_PLA || L[0]->OPC == OP65_PLA ||
L[0]->OPC == OP65_SBC || L[0]->OPC == OP65_SBC ||
@@ -376,7 +378,7 @@ unsigned OptCmp2 (CodeSeg* S)
CE_KnownImm (L[1]) && CE_KnownImm (L[1]) &&
L[1]->Num == 0) { L[1]->Num == 0) {
/* Check for the call to boolxx. We cannot remove the compare if /* Check for the call to boolxx. We only remove the compare if
* the carry flag is evaluated later, because the load will not * the carry flag is evaluated later, because the load will not
* set the carry flag. * set the carry flag.
*/ */