Fix missing int range adaption on complex address optimization
This commit is contained in:
parent
0b8304b40d
commit
9013952431
|
@ -18964,6 +18964,7 @@ bool InterCodeBasicBlock::PeepholeReplaceOptimization(const GrowingVariableArray
|
||||||
{
|
{
|
||||||
mInstructions[i + 2]->mSrc[1].mIntConst += mInstructions[i + 0]->mSrc[0].mIntConst;
|
mInstructions[i + 2]->mSrc[1].mIntConst += mInstructions[i + 0]->mSrc[0].mIntConst;
|
||||||
mInstructions[i + 1]->mSrc[1] = mInstructions[i + 0]->mSrc[1];
|
mInstructions[i + 1]->mSrc[1] = mInstructions[i + 0]->mSrc[1];
|
||||||
|
mInstructions[i + 1]->mDst.mRange.Reset();
|
||||||
mInstructions[i + 0]->mSrc[1].mFinal = false;
|
mInstructions[i + 0]->mSrc[1].mFinal = false;
|
||||||
mInstructions[i + 1]->mSrc[0].mFinal = false;
|
mInstructions[i + 1]->mSrc[0].mFinal = false;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
@ -18987,11 +18988,14 @@ bool InterCodeBasicBlock::PeepholeReplaceOptimization(const GrowingVariableArray
|
||||||
mInstructions[i + 0]->mSrc[0].mIntConst += mInstructions[i + 1]->mSrc[0].mIntConst;
|
mInstructions[i + 0]->mSrc[0].mIntConst += mInstructions[i + 1]->mSrc[0].mIntConst;
|
||||||
mInstructions[i + 1]->mSrc[1].mFinal = false;
|
mInstructions[i + 1]->mSrc[1].mFinal = false;
|
||||||
mInstructions[i + 2]->mSrc[1] = mInstructions[i + 1]->mSrc[1];
|
mInstructions[i + 2]->mSrc[1] = mInstructions[i + 1]->mSrc[1];
|
||||||
|
mInstructions[i + 0]->mDst.mRange.Reset();
|
||||||
|
mInstructions[i + 1]->mDst.mRange.Reset();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mInstructions[i + 1]->mSrc[0].mIntConst += mInstructions[i + 0]->mSrc[0].mIntConst;
|
mInstructions[i + 1]->mSrc[0].mIntConst += mInstructions[i + 0]->mSrc[0].mIntConst;
|
||||||
mInstructions[i + 0]->mSrc[1].mFinal = false;
|
mInstructions[i + 0]->mSrc[1].mFinal = false;
|
||||||
|
mInstructions[i + 1]->mDst.mRange.Reset();
|
||||||
mInstructions[i + 2]->mSrc[0] = mInstructions[i + 0]->mSrc[1];
|
mInstructions[i + 2]->mSrc[0] = mInstructions[i + 0]->mSrc[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21742,7 +21746,7 @@ void InterCodeProcedure::Close(void)
|
||||||
{
|
{
|
||||||
GrowingTypeArray tstack(IT_NONE);
|
GrowingTypeArray tstack(IT_NONE);
|
||||||
|
|
||||||
CheckFunc = !strcmp(mIdent->mString, "bmu_line");
|
CheckFunc = !strcmp(mIdent->mString, "copy_left");
|
||||||
CheckCase = false;
|
CheckCase = false;
|
||||||
|
|
||||||
mEntryBlock = mBlocks[0];
|
mEntryBlock = mBlocks[0];
|
||||||
|
|
|
@ -50208,7 +50208,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
||||||
mInterProc = proc;
|
mInterProc = proc;
|
||||||
mInterProc->mLinkerObject->mNativeProc = this;
|
mInterProc->mLinkerObject->mNativeProc = this;
|
||||||
|
|
||||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "testpow");
|
CheckFunc = !strcmp(mInterProc->mIdent->mString, "copy_left");
|
||||||
|
|
||||||
int nblocks = proc->mBlocks.Size();
|
int nblocks = proc->mBlocks.Size();
|
||||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||||
|
|
Loading…
Reference in New Issue