Fix infinite loop in move condition out of loop
This commit is contained in:
parent
89750c3f73
commit
30d942478f
|
@ -5584,7 +5584,7 @@ void InterCodeBasicBlock::GenerateTraces(bool expand, bool compact)
|
||||||
{
|
{
|
||||||
int sz = mInstructions.Size();
|
int sz = mInstructions.Size();
|
||||||
|
|
||||||
if (mFalseJump && sz > 0 && mInstructions[sz - 1]->mCode == IC_BRANCH && mInstructions[sz - 1]->mSrc[0].mType == IT_BOOL && mInstructions[sz - 1]->mSrc[0].mTemp < 0)
|
if (mFalseJump && sz > 0 && mInstructions[sz - 1]->mCode == IC_BRANCH && (mInstructions[sz - 1]->mSrc[0].mType == IT_BOOL || IsIntegerType(mInstructions[sz - 1]->mSrc[0].mType)) && mInstructions[sz - 1]->mSrc[0].mTemp < 0)
|
||||||
{
|
{
|
||||||
mInstructions[sz - 1]->mCode = IC_JUMP;
|
mInstructions[sz - 1]->mCode = IC_JUMP;
|
||||||
mInstructions[sz - 1]->mNumOperands = 0;
|
mInstructions[sz - 1]->mNumOperands = 0;
|
||||||
|
@ -20285,7 +20285,7 @@ void InterCodeProcedure::Close(void)
|
||||||
{
|
{
|
||||||
GrowingTypeArray tstack(IT_NONE);
|
GrowingTypeArray tstack(IT_NONE);
|
||||||
|
|
||||||
CheckFunc = !strcmp(mIdent->mString, "interpret_statement");
|
CheckFunc = !strcmp(mIdent->mString, "palette_draw");
|
||||||
CheckCase = false;
|
CheckCase = false;
|
||||||
|
|
||||||
mEntryBlock = mBlocks[0];
|
mEntryBlock = mBlocks[0];
|
||||||
|
|
|
@ -30258,6 +30258,7 @@ bool NativeCodeBasicBlock::MoveStoreYUp(int at)
|
||||||
|
|
||||||
if (ins.RequiresXReg()) mIns[at].mLive |= LIVE_CPU_REG_X;
|
if (ins.RequiresXReg()) mIns[at].mLive |= LIVE_CPU_REG_X;
|
||||||
if (ins.RequiresAccu()) mIns[at].mLive |= LIVE_CPU_REG_A;
|
if (ins.RequiresAccu()) mIns[at].mLive |= LIVE_CPU_REG_A;
|
||||||
|
if (ins.RequiresCarry()) mIns[at].mLive |= LIVE_CPU_REG_C;
|
||||||
|
|
||||||
mIns[at - 1] = mIns[at];
|
mIns[at - 1] = mIns[at];
|
||||||
mIns[at] = ins;
|
mIns[at] = ins;
|
||||||
|
|
Loading…
Reference in New Issue