1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@2256 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-08-10 16:12:04 +00:00
parent 817b2ac261
commit 38e102d2df

View File

@ -209,10 +209,12 @@ static void CheckDirectOp (StackOpData* D)
/* These insns are all ok and replaceable */ /* These insns are all ok and replaceable */
D->Flags |= OP_DIRECT; D->Flags |= OP_DIRECT;
} else if (E->AM == AM65_ZP_INDY && RegValIsKnown (E->RI->In.RegY) && } else if (E->AM == AM65_ZP_INDY && RegValIsKnown (E->RI->In.RegY) &&
strcmp (E->Arg, D->ZPLo) != 0 && strcmp (E->Arg, D->ZPHi) != 0) { strcmp (E->Arg, "sp") == 0) {
/* Load indirect with known offset is also ok, provided that /* A load from the stack with known offset is also ok, but in this
* the zeropage location used is not the same as the one we're * case we must reload the index register later. Please note that
* using for the temp storage. * a load indirect via other zero page locations is not ok, since
* these locations may change between the push and the actual
* operation.
*/ */
D->Flags |= (OP_DIRECT | OP_RELOAD_Y); D->Flags |= (OP_DIRECT | OP_RELOAD_Y);
} }