diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index 81da526..9ca1c44 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -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; diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index c9c9654..43110af 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -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--; }