From: cuz Date: Mon, 11 Aug 2003 20:46:51 +0000 (+0000) Subject: Fixed an optimization X-Git-Tag: V2.12.0~1462 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a6ce40b1387725b563f639df6efdcee6f46cf26;p=cc65 Fixed an optimization git-svn-id: svn://svn.cc65.org/cc65/trunk@2263 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codeopt.c b/src/cc65/codeopt.c index 4c4cb31a6..eee07829d 100644 --- a/src/cc65/codeopt.c +++ b/src/cc65/codeopt.c @@ -673,20 +673,6 @@ static unsigned OptPtrLoad2 (CodeSeg* S) * ldy * ldx #$00 * lda (ptr1),y - * - * adc xxx - * sta ptr1 - * pha - * txa - * iny - * adc yyy - * sta ptr1+1 - * tax - * pla - * ldy - * ldx #$00 - * lda (ptr1),y - * jsr ldauidx */ { unsigned Changes = 0; @@ -799,7 +785,8 @@ static unsigned OptPtrLoad3 (CodeSeg* S) CE_KnownImm (L[6]) && L[6]->Num == 0 && CE_IsCallTo (L[7], "ldauidx") && - !CS_RangeHasLabel (S, I+1, 7) && + !CS_RangeHasLabel (S, I+1, 5) && + !CE_HasLabel (L[7]) && /* Check the label last because this is quite costly */ (Len = strlen (L[0]->Arg)) > 3 && L[0]->Arg[0] == '<' &&