From: uz Date: Fri, 28 Aug 2009 09:29:11 +0000 (+0000) Subject: Relax the precondition for OPtStackOps somewhat. X-Git-Tag: V2.13.0rc1~196 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0643a9f77a866facd0c7b4976be9e790fbb7139;p=cc65 Relax the precondition for OPtStackOps somewhat. git-svn-id: svn://svn.cc65.org/cc65/trunk@4060 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/coptstop.c b/src/cc65/coptstop.c index f59d22d1a..65b2ea4b2 100644 --- a/src/cc65/coptstop.c +++ b/src/cc65/coptstop.c @@ -1302,9 +1302,6 @@ static int PreCondOk (StackOpData* D) } else if ((D->UsedRegs & REG_SREG) == REG_NONE) { D->ZPLo = "sreg"; D->ZPHi = "sreg+1"; - } else if ((D->UsedRegs & REG_PTR1) == REG_NONE) { - D->ZPLo = "ptr1"; - D->ZPHi = "ptr1+1"; } else if ((D->UsedRegs & REG_PTR2) == REG_NONE) { D->ZPLo = "ptr2"; D->ZPHi = "ptr2+1"; @@ -1418,7 +1415,7 @@ unsigned OptStackOps (CodeSeg* S) TrackLoads (&Data.Rhs, E, I); } - } else if (E->Info & OF_STORE) { + } else if (E->Info & OF_STORE && (E->Chg & REG_ZP) == 0) { /* Too dangerous - there may be a change of a variable * within the sequence.