Fix value forwarding register forgetting memory reference
This commit is contained in:
parent
2d2c696aa4
commit
ebc41560d9
|
@ -158,7 +158,10 @@ inline void sidfx_loop_ch(byte ch)
|
||||||
channels[ch].cnt--;
|
channels[ch].cnt--;
|
||||||
channels[ch].com = com;
|
channels[ch].com = com;
|
||||||
channels[ch].priority = com->priority;
|
channels[ch].priority = com->priority;
|
||||||
|
if (com->time0)
|
||||||
channels[ch].state = SIDFX_RESET_0;
|
channels[ch].state = SIDFX_RESET_0;
|
||||||
|
else
|
||||||
|
channels[ch].state = SIDFX_READY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -18684,6 +18684,7 @@ bool NativeCodeBasicBlock::SimplifyDiamond(NativeCodeProcedure* proc)
|
||||||
mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress;
|
mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress;
|
||||||
mFalseJump->mExitRequiredRegs += mIns[sz].mAddress;
|
mFalseJump->mExitRequiredRegs += mIns[sz].mAddress;
|
||||||
}
|
}
|
||||||
|
mIns[sz].mLive |= LIVE_MEM;
|
||||||
|
|
||||||
mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDY, mIns[sz]));
|
mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDY, mIns[sz]));
|
||||||
changed = true;
|
changed = true;
|
||||||
|
@ -18709,6 +18710,8 @@ bool NativeCodeBasicBlock::SimplifyDiamond(NativeCodeProcedure* proc)
|
||||||
mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress;
|
mFalseJump->mEntryRequiredRegs += mIns[sz].mAddress;
|
||||||
mFalseJump->mExitRequiredRegs += mIns[sz].mAddress;
|
mFalseJump->mExitRequiredRegs += mIns[sz].mAddress;
|
||||||
}
|
}
|
||||||
|
mIns[sz].mLive |= LIVE_MEM;
|
||||||
|
|
||||||
mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDX, mIns[sz]));
|
mTrueJump->mTrueJump->mIns.Insert(0, NativeCodeInstruction(mIns[sz].mIns, ASMIT_LDX, mIns[sz]));
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
@ -51489,7 +51492,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
||||||
mInterProc = proc;
|
mInterProc = proc;
|
||||||
mInterProc->mLinkerObject->mNativeProc = this;
|
mInterProc->mLinkerObject->mNativeProc = this;
|
||||||
|
|
||||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "fighter_status");
|
CheckFunc = !strcmp(mInterProc->mIdent->mString, "fighter_input");
|
||||||
|
|
||||||
int nblocks = proc->mBlocks.Size();
|
int nblocks = proc->mBlocks.Size();
|
||||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||||
|
@ -52923,6 +52926,8 @@ void NativeCodeProcedure::Optimize(void)
|
||||||
if (mEntryBlock->JoinXYCascade())
|
if (mEntryBlock->JoinXYCascade())
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if (step == 9 && cnt < 10)
|
if (step == 9 && cnt < 10)
|
||||||
{
|
{
|
||||||
|
@ -53051,7 +53056,6 @@ void NativeCodeProcedure::Optimize(void)
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (step == 8)
|
if (step == 8)
|
||||||
{
|
{
|
||||||
ResetVisited();
|
ResetVisited();
|
||||||
|
|
Loading…
Reference in New Issue