mirror of
https://github.com/cc65/cc65.git
synced 2024-10-07 07:59:27 +00:00
Correct wrong optimizer infos
git-svn-id: svn://svn.cc65.org/cc65/trunk@672 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c2a88fd697
commit
32535083e7
@ -144,7 +144,13 @@ static const struct {
|
|||||||
{ "\tjsr\tbool", 0, REG_NONE, REG_AX },
|
{ "\tjsr\tbool", 0, REG_NONE, REG_AX },
|
||||||
{ "\tjsr\tdecaxy", 1, REG_ALL, REG_AX },
|
{ "\tjsr\tdecaxy", 1, REG_ALL, REG_AX },
|
||||||
{ "\tjsr\tdecax", 0, REG_AX, REG_AX },
|
{ "\tjsr\tdecax", 0, REG_AX, REG_AX },
|
||||||
{ "\tjsr\tdecsp", 0, REG_NONE, REG_A },
|
{ "\tjsr\tdecsp2", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp3", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp4", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp5", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp6", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp7", 1, REG_NONE, REG_A },
|
||||||
|
{ "\tjsr\tdecsp8", 1, REG_NONE, REG_A },
|
||||||
{ "\tjsr\tldax0sp", 1, REG_Y, REG_AX },
|
{ "\tjsr\tldax0sp", 1, REG_Y, REG_AX },
|
||||||
{ "\tjsr\tldaxysp", 1, REG_Y, REG_AX },
|
{ "\tjsr\tldaxysp", 1, REG_Y, REG_AX },
|
||||||
{ "\tjsr\tpusha", 1, REG_A, REG_Y },
|
{ "\tjsr\tpusha", 1, REG_A, REG_Y },
|
||||||
@ -4029,8 +4035,13 @@ static Line* OptOneBlock (Line* L)
|
|||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
} else if (LineMatch (L, "\tjsr\tdecsp") && IsDigit (L->Line[10])) {
|
} else if (LineMatch (L, "\tjsr\tdecsp") && IsDigit (L->Line[10])) {
|
||||||
/* We know about this function */
|
if (L->Line[10] == '1') {
|
||||||
|
/* Destroys Y, leaves all other regs alone */
|
||||||
|
Y = -1;
|
||||||
|
} else {
|
||||||
|
/* Destroys A, leaves all other regs alone */
|
||||||
A = -1;
|
A = -1;
|
||||||
|
}
|
||||||
} else if (LineFullMatch (L, "\tjsr\tincax1")) {
|
} else if (LineFullMatch (L, "\tjsr\tincax1")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
@ -4129,7 +4140,7 @@ static Line* OptOneBlock (Line* L)
|
|||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 0;
|
A = 0;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush0ax")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush0ax")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
Y = 0;
|
Y = 0;
|
||||||
@ -4137,37 +4148,37 @@ static Line* OptOneBlock (Line* L)
|
|||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 1;
|
A = 1;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush2")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush2")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 2;
|
A = 2;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush3")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush3")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 3;
|
A = 3;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush4")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush4")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 4;
|
A = 4;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush5")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush5")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 5;
|
A = 5;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush6")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush6")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 6;
|
A = 6;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpush7")) {
|
} else if (LineFullMatch (L, "\tjsr\tpush7")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = 7;
|
A = 7;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (CPU != CPU_65C02 && LineFullMatch (L, "\tjsr\tpusha")) {
|
} else if (CPU != CPU_65C02 && LineFullMatch (L, "\tjsr\tpusha")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
Y = 0;
|
Y = 0;
|
||||||
@ -4206,19 +4217,19 @@ static Line* OptOneBlock (Line* L)
|
|||||||
} else if (LineFullMatch (L, "\tjsr\tpushw")) {
|
} else if (LineFullMatch (L, "\tjsr\tpushw")) {
|
||||||
/* We know about this function (calls pushax) */
|
/* We know about this function (calls pushax) */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpushw0sp")) {
|
} else if (LineFullMatch (L, "\tjsr\tpushw0sp")) {
|
||||||
/* We know about this function(calls pushax) */
|
/* We know about this function(calls pushax) */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpushwidx")) {
|
} else if (LineFullMatch (L, "\tjsr\tpushwidx")) {
|
||||||
/* We know about this function (calls pushax) */
|
/* We know about this function (calls pushax) */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tpushwysp")) {
|
} else if (LineFullMatch (L, "\tjsr\tpushwysp")) {
|
||||||
/* We know about this function (calls pushax) */
|
/* We know about this function (calls pushax) */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
Y = 1;
|
Y = 0;
|
||||||
} else if (LineFullMatch (L, "\tjsr\tresteax")) {
|
} else if (LineFullMatch (L, "\tjsr\tresteax")) {
|
||||||
/* We know about this function */
|
/* We know about this function */
|
||||||
A = X = -1;
|
A = X = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user