X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fcoptadd.h;h=cc2afe48b8e1abcfeef9af4a21bff0287db6810c;hb=7aefd9b4e7b67908b7b3c38b6003c7f1a8d3ee2d;hp=545552bcd2fe70143874fee7b16520cf3a9ea51a;hpb=21111ba235f184c962985fd79c4782eaa5990c83;p=cc65 diff --git a/src/cc65/coptadd.h b/src/cc65/coptadd.h index 545552bcd..cc2afe48b 100644 --- a/src/cc65/coptadd.h +++ b/src/cc65/coptadd.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2001 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@cc65.org */ +/* (C) 2001-2005, Ullrich von Bassewitz */ +/* Römerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -97,6 +97,47 @@ unsigned OptAdd2 (CodeSeg* S); */ unsigned OptAdd3 (CodeSeg* S); +/* Search for the sequence + * + * jsr pushax + * ldx #$00 + * lda xxx + * jsr tosaddax + * + * and replace it by + * + * clc + * adc xxx + * bcc L1 + * inx + * L1: + */ + +unsigned OptAdd4 (CodeSeg* S); +/* Search for the sequence + * + * jsr pushax + * lda xxx + * ldx yyy + * jsr tosaddax + * + * and replace it by + * + * clc + * adc xxx + * pha + * txa + * adc yyy + * tax + * pla + */ + +unsigned OptAdd5 (CodeSeg* S); +/* Search for a call to incaxn and replace it by an 8 bit add if the X register + * is not used later. + */ + +unsigned OptAdd6 (CodeSeg* S); /* Search for the sequence * * adc ...