]> git.sur5r.net Git - cc65/commitdiff
Fixed an optimization
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 11 Aug 2003 20:46:51 +0000 (20:46 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 11 Aug 2003 20:46:51 +0000 (20:46 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2263 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codeopt.c

index 4c4cb31a6ba8e5a819dfa0b9aef2254fc33aa9fa..eee07829d483ee33e7b249815d11a1c8baae2ba4 100644 (file)
@@ -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] == '<'                              &&