Fix volatile loads with unused result
This commit is contained in:
parent
fc5c9f137a
commit
68e048b945
|
@ -2397,7 +2397,10 @@ bool InterInstruction::RemoveUnusedResultInstructions(InterInstruction* pre, Num
|
|||
{
|
||||
if (!requiredTemps[mDst.mTemp] && mDst.mTemp >= 0)
|
||||
{
|
||||
if (!HasSideEffect(mCode))
|
||||
if (mCode == IC_LOAD && mVolatile)
|
||||
{
|
||||
}
|
||||
else if (!HasSideEffect(mCode))
|
||||
{
|
||||
mCode = IC_NONE;
|
||||
mDst.mTemp = -1;
|
||||
|
|
|
@ -11996,6 +11996,9 @@ bool NativeCodeBasicBlock::MoveAbsoluteLoadStoreUp(int at)
|
|||
if (mIns[at + 1].mMode == ASMIM_ABSOLUTE_Y && mIns[j].ChangesYReg())
|
||||
return false;
|
||||
|
||||
if (mIns[j].mType == ASMIT_JSR)
|
||||
return false;
|
||||
|
||||
j--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue