Fixed optimizer bug in or/xor
git-svn-id: svn://svn.cc65.org/cc65/trunk@1425 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -403,7 +403,7 @@ static unsigned Opt_tosorax (CodeSeg* S, unsigned Push, unsigned Or,
|
|||||||
X = NewCodeEntry (OP65_STX, AM65_ZP, ZPHi, 0, PushEntry->LI);
|
X = NewCodeEntry (OP65_STX, AM65_ZP, ZPHi, 0, PushEntry->LI);
|
||||||
CS_InsertEntry (S, X, Push+1);
|
CS_InsertEntry (S, X, Push+1);
|
||||||
++Or; /* Correct the index */
|
++Or; /* Correct the index */
|
||||||
if (DirectOr) {
|
if (!DirectOr) {
|
||||||
X = NewCodeEntry (OP65_STA, AM65_ZP, ZPLo, 0, PushEntry->LI);
|
X = NewCodeEntry (OP65_STA, AM65_ZP, ZPLo, 0, PushEntry->LI);
|
||||||
CS_InsertEntry (S, X, Push+1);
|
CS_InsertEntry (S, X, Push+1);
|
||||||
++Or; /* Correct the index */
|
++Or; /* Correct the index */
|
||||||
@@ -477,7 +477,7 @@ static unsigned Opt_tosxorax (CodeSeg* S, unsigned Push, unsigned Xor,
|
|||||||
X = NewCodeEntry (OP65_STX, AM65_ZP, ZPHi, 0, PushEntry->LI);
|
X = NewCodeEntry (OP65_STX, AM65_ZP, ZPHi, 0, PushEntry->LI);
|
||||||
CS_InsertEntry (S, X, Push+1);
|
CS_InsertEntry (S, X, Push+1);
|
||||||
++Xor; /* Correct the index */
|
++Xor; /* Correct the index */
|
||||||
if (DirectXor) {
|
if (!DirectXor) {
|
||||||
X = NewCodeEntry (OP65_STA, AM65_ZP, ZPLo, 0, PushEntry->LI);
|
X = NewCodeEntry (OP65_STA, AM65_ZP, ZPLo, 0, PushEntry->LI);
|
||||||
CS_InsertEntry (S, X, Push+1);
|
CS_InsertEntry (S, X, Push+1);
|
||||||
++Xor; /* Correct the index */
|
++Xor; /* Correct the index */
|
||||||
|
|||||||
Reference in New Issue
Block a user