From 5d51cf75e889342e8484420fed95ef2611c8a5bc Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:14:28 +0100 Subject: [PATCH] Fix cross block zp move optimization --- oscar64/NativeCodeGenerator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 652dee1..b82173c 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -21368,6 +21368,9 @@ bool NativeCodeBasicBlock::IsExitARegZP(int addr, int& index) const bool NativeCodeBasicBlock::CanJoinEntryLoadStoreZP(int saddr, int daddr) { + if (mFalseJump && mExitRequiredRegs[daddr]) + return false; + int at = mIns.Size() - 1; while (at >= 0) { @@ -45168,7 +45171,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc) { mInterProc = proc; - CheckFunc = !strcmp(mInterProc->mIdent->mString, "enemies_check"); + CheckFunc = !strcmp(mInterProc->mIdent->mString, "player_move"); int nblocks = proc->mBlocks.Size(); tblocks = new NativeCodeBasicBlock * [nblocks];