From e0643a9f77a866facd0c7b4976be9e790fbb7139 Mon Sep 17 00:00:00 2001 From: uz Date: Fri, 28 Aug 2009 09:29:11 +0000 Subject: [PATCH] Relax the precondition for OPtStackOps somewhat. git-svn-id: svn://svn.cc65.org/cc65/trunk@4060 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/coptstop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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. -- 2.39.5