]> git.sur5r.net Git - cc65/blobdiff - src/cc65/coptptrload.h
added optimization for indexed pointer load of a constant, e.g.: y = ((unsigned char...
[cc65] / src / cc65 / coptptrload.h
index fd93bf5c2cf55e708dcf9166520c94dfc44f71c5..4581ccb45f7c6ef465f07feaa520dcc79155a005 100644 (file)
@@ -356,6 +356,27 @@ unsigned OptPtrLoad17 (CodeSeg* S);
 ** the step with less than 200% so it gets executed when -Oi is in effect.
 */
 
+unsigned OptPtrLoad18 (CodeSeg* S);
+/* Search for the sequence:
+**
+**      ldx     #$xx
+**      lda     #$yy
+**      clc
+**      adc     xxx
+**      bcc     L
+**      inx
+** L:   ldy     #$00
+**      jsr     ldauidx
+**
+** and replace it by:
+**
+**      ldy     xxx
+**      ldx     #$00
+**      lda     $xxyy,y
+**
+** This is similar to OptPtrLoad3 but works on a constant address
+** instead of a label. Also, the initial X and A loads are reversed.
+*/
 
 
 /* End of coptptrload.h */