Fix over eager lda/sta movement
This commit is contained in:
parent
1e0450cd8a
commit
16810b63d4
|
@ -15835,6 +15835,8 @@ bool NativeCodeBasicBlock::MoveImmediateStoreUp(int at)
|
||||||
return false;
|
return false;
|
||||||
else if (usey && mIns[i].ChangesYReg())
|
else if (usey && mIns[i].ChangesYReg())
|
||||||
return false;
|
return false;
|
||||||
|
else if (mIns[at + 1].mMode == ASMIM_INDIRECT_Y && (mIns[i].ChangesZeroPage(mIns[at + 1].mAddress) || mIns[i].ChangesZeroPage(mIns[at + 1].mAddress + 1)))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -15897,6 +15899,8 @@ bool NativeCodeBasicBlock::MoveImmediateStoreDown(int at)
|
||||||
return false;
|
return false;
|
||||||
else if (usey && mIns[i].ChangesYReg())
|
else if (usey && mIns[i].ChangesYReg())
|
||||||
return false;
|
return false;
|
||||||
|
else if (mIns[at + 1].mMode == ASMIM_INDIRECT_Y && (mIns[i].ChangesZeroPage(mIns[at + 1].mAddress) || mIns[i].ChangesZeroPage(mIns[at + 1].mAddress + 1)))
|
||||||
|
return false;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -15983,6 +15987,10 @@ bool NativeCodeBasicBlock::MoveLoadStoreDown(int at)
|
||||||
return false;
|
return false;
|
||||||
else if (usey && mIns[i].ChangesYReg())
|
else if (usey && mIns[i].ChangesYReg())
|
||||||
return false;
|
return false;
|
||||||
|
else if (mIns[at].mMode == ASMIM_INDIRECT_Y && (mIns[i].ChangesZeroPage(mIns[at].mAddress) || mIns[i].ChangesZeroPage(mIns[at].mAddress + 1)))
|
||||||
|
return false;
|
||||||
|
else if (mIns[at + 1].mMode == ASMIM_INDIRECT_Y && (mIns[i].ChangesZeroPage(mIns[at + 1].mAddress) || mIns[i].ChangesZeroPage(mIns[at + 1].mAddress + 1)))
|
||||||
|
return false;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -44463,7 +44471,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
||||||
{
|
{
|
||||||
mInterProc = proc;
|
mInterProc = proc;
|
||||||
|
|
||||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "main");
|
CheckFunc = !strcmp(mInterProc->mIdent->mString, "PlayingState::InitMaps");
|
||||||
|
|
||||||
int nblocks = proc->mBlocks.Size();
|
int nblocks = proc->mBlocks.Size();
|
||||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||||
|
|
Loading…
Reference in New Issue