From 85f01b833cdb5f553758dc7314ee6aec46d8b57d Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:49:10 +0200 Subject: [PATCH] Fix invalid index propagation --- oscar64/NativeCodeGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 6520e6b..cbe92e2 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -46923,7 +46923,7 @@ bool NativeCodeBasicBlock::PeepHoleOptimizerIterateN(int i, int pass) return true; } } - else + else if (mIns[i + 3].mAddress != mIns[i + 1].mAddress) { mProc->ResetPatched(); if (CheckForwardSumYPointer(this, mIns[i + 3].mAddress, mIns[i + 1].mAddress, mIns[i + 3], i + 7, yval, 3)) @@ -49510,7 +49510,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc) mInterProc = proc; mInterProc->mLinkerObject->mNativeProc = this; - CheckFunc = !strcmp(mInterProc->mIdent->mString, "clz"); + CheckFunc = !strcmp(mInterProc->mIdent->mString, "format_insert2"); int nblocks = proc->mBlocks.Size(); tblocks = new NativeCodeBasicBlock * [nblocks];