1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-15 06:27:36 +00:00

The OptNegXXX function were actually handling bnega... runtime stuff. Renamed

them accordingly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5731 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-06-23 16:17:56 +00:00
parent bb41dccfe3
commit 4333c76710
3 changed files with 61 additions and 61 deletions

View File

@@ -1179,12 +1179,12 @@ static OptFunc DOptLoad2 = { OptLoad2, "OptLoad2", 200, 0,
static OptFunc DOptRTS = { OptRTS, "OptRTS", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptRTSJumps1 = { OptRTSJumps1, "OptRTSJumps1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptRTSJumps2 = { OptRTSJumps2, "OptRTSJumps2", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegA1 = { OptNegA1, "OptNegA1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegA2 = { OptNegA2, "OptNegA2", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegAX1 = { OptNegAX1, "OptNegAX1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegAX2 = { OptNegAX2, "OptNegAX2", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegAX3 = { OptNegAX3, "OptNegAX3", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptNegAX4 = { OptNegAX4, "OptNegAX4", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegA1 = { OptBNegA1, "OptBNegA1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegA2 = { OptBNegA2, "OptBNegA2", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegAX1 = { OptBNegAX1, "OptBNegAX1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegAX2 = { OptBNegAX2, "OptBNegAX2", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegAX3 = { OptBNegAX3, "OptBNegAX3", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptBNegAX4 = { OptBNegAX4, "OptBNegAX4", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptPrecalc = { OptPrecalc, "OptPrecalc", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptPtrLoad1 = { OptPtrLoad1, "OptPtrLoad1", 100, 0, 0, 0, 0, 0 };
static OptFunc DOptPtrLoad2 = { OptPtrLoad2, "OptPtrLoad2", 100, 0, 0, 0, 0, 0 };
@@ -1271,12 +1271,12 @@ static OptFunc* OptFuncs[] = {
&DOptJumpTarget3,
&DOptLoad1,
&DOptLoad2,
&DOptNegA1,
&DOptNegA2,
&DOptNegAX1,
&DOptNegAX2,
&DOptNegAX3,
&DOptNegAX4,
&DOptBNegA1,
&DOptBNegA2,
&DOptBNegAX1,
&DOptBNegAX2,
&DOptBNegAX3,
&DOptBNegAX4,
&DOptPrecalc,
&DOptPtrLoad1,
&DOptPtrLoad11,
@@ -1583,10 +1583,10 @@ static unsigned RunOptGroup1 (CodeSeg* S)
Changes += RunOptFunc (S, &DOptPtrLoad15, 1);
Changes += RunOptFunc (S, &DOptPtrLoad16, 1);
Changes += RunOptFunc (S, &DOptPtrLoad17, 1);
Changes += RunOptFunc (S, &DOptNegAX1, 1);
Changes += RunOptFunc (S, &DOptNegAX2, 1);
Changes += RunOptFunc (S, &DOptNegAX3, 1);
Changes += RunOptFunc (S, &DOptNegAX4, 1);
Changes += RunOptFunc (S, &DOptBNegAX1, 1);
Changes += RunOptFunc (S, &DOptBNegAX2, 1);
Changes += RunOptFunc (S, &DOptBNegAX3, 1);
Changes += RunOptFunc (S, &DOptBNegAX4, 1);
Changes += RunOptFunc (S, &DOptAdd1, 1);
Changes += RunOptFunc (S, &DOptAdd2, 1);
Changes += RunOptFunc (S, &DOptAdd4, 1);
@@ -1640,8 +1640,8 @@ static unsigned RunOptGroup3 (CodeSeg* S)
do {
C = 0;
C += RunOptFunc (S, &DOptNegA1, 1);
C += RunOptFunc (S, &DOptNegA2, 1);
C += RunOptFunc (S, &DOptBNegA1, 1);
C += RunOptFunc (S, &DOptBNegA2, 1);
C += RunOptFunc (S, &DOptStackOps, 1);
C += RunOptFunc (S, &DOptSub1, 1);
C += RunOptFunc (S, &DOptSub2, 1);

View File

@@ -6,8 +6,8 @@
/* */
/* */
/* */
/* (C) 2001-2005, Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* (C) 2001-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -41,12 +41,12 @@
/*****************************************************************************/
/* nega optimizations */
/* bnega optimizations */
/*****************************************************************************/
unsigned OptNegA1 (CodeSeg* S)
unsigned OptBNegA1 (CodeSeg* S)
/* Check for
*
* ldx #$00
@@ -98,7 +98,7 @@ unsigned OptNegA1 (CodeSeg* S)
unsigned OptNegA2 (CodeSeg* S)
unsigned OptBNegA2 (CodeSeg* S)
/* Check for
*
* lda ..
@@ -160,12 +160,12 @@ unsigned OptNegA2 (CodeSeg* S)
/*****************************************************************************/
/* negax optimizations */
/* bnegax optimizations */
/*****************************************************************************/
unsigned OptNegAX1 (CodeSeg* S)
unsigned OptBNegAX1 (CodeSeg* S)
/* On a call to bnegax, if X is zero, the result depends only on the value in
* A, so change the call to a call to bnega. This will get further optimized
* later if possible.
@@ -209,7 +209,7 @@ unsigned OptNegAX1 (CodeSeg* S)
unsigned OptNegAX2 (CodeSeg* S)
unsigned OptBNegAX2 (CodeSeg* S)
/* Search for the sequence:
*
* ldy #xx
@@ -282,7 +282,7 @@ unsigned OptNegAX2 (CodeSeg* S)
unsigned OptNegAX3 (CodeSeg* S)
unsigned OptBNegAX3 (CodeSeg* S)
/* Search for the sequence:
*
* lda xx
@@ -343,7 +343,7 @@ unsigned OptNegAX3 (CodeSeg* S)
unsigned OptNegAX4 (CodeSeg* S)
unsigned OptBNegAX4 (CodeSeg* S)
/* Search for the sequence:
*
* jsr xxx

View File

@@ -6,9 +6,9 @@
/* */
/* */
/* */
/* (C) 2001 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* (C) 2001-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
@@ -44,12 +44,12 @@
/*****************************************************************************/
/* nega optimizations */
/* bnega optimizations */
/*****************************************************************************/
unsigned OptNegA1 (CodeSeg* S);
unsigned OptBNegA1 (CodeSeg* S);
/* Check for
*
* ldx #$00
@@ -59,7 +59,7 @@ unsigned OptNegA1 (CodeSeg* S);
* Remove the ldx if the lda does not use it.
*/
unsigned OptNegA2 (CodeSeg* S);
unsigned OptBNegA2 (CodeSeg* S);
/* Check for
*
* lda ..
@@ -72,18 +72,18 @@ unsigned OptNegA2 (CodeSeg* S);
/*****************************************************************************/
/* negax optimizations */
/* bnegax optimizations */
/*****************************************************************************/
unsigned OptNegAX1 (CodeSeg* S);
unsigned OptBNegAX1 (CodeSeg* S);
/* On a call to bnegax, if X is zero, the result depends only on the value in
* A, so change the call to a call to bnega. This will get further optimized
* later if possible.
*/
unsigned OptNegAX2 (CodeSeg* S);
unsigned OptBNegAX2 (CodeSeg* S);
/* Search for the sequence:
*
* lda (xx),y
@@ -101,7 +101,7 @@ unsigned OptNegAX2 (CodeSeg* S);
* jeq/jne ...
*/
unsigned OptNegAX3 (CodeSeg* S);
unsigned OptBNegAX3 (CodeSeg* S);
/* Search for the sequence:
*
* lda xx
@@ -116,7 +116,7 @@ unsigned OptNegAX3 (CodeSeg* S);
* jeq/jne ...
*/
unsigned OptNegAX4 (CodeSeg* S);
unsigned OptBNegAX4 (CodeSeg* S);
/* Search for the sequence:
*
* jsr xxx