Bump version number
This commit is contained in:
parent
03be76f7f5
commit
121f0476e1
|
@ -7107,6 +7107,92 @@ bool InterCodeBasicBlock::MergeIndexedLoadStore(const GrowingInstructionPtrArra
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool CheckSimplifyPointerOffsets(const InterInstruction* ins, int temp, int& mino, int& maxo)
|
||||||
|
{
|
||||||
|
if (ins->mDst.mTemp == temp)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (ins->mCode == IC_LOAD && ins->mSrc[0].mTemp == temp)
|
||||||
|
{
|
||||||
|
if (ins->mSrc[0].mIntConst < mino)
|
||||||
|
mino = ins->mSrc[0].mIntConst;
|
||||||
|
if (ins->mSrc[0].mIntConst > maxo)
|
||||||
|
maxo = ins->mSrc[0].mIntConst;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ins->mCode == IC_STORE && ins->mSrc[1].mTemp == temp)
|
||||||
|
{
|
||||||
|
if (ins->mSrc[0].mTemp == temp)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (ins->mSrc[1].mIntConst < mino)
|
||||||
|
mino = ins->mSrc[1].mIntConst;
|
||||||
|
if (ins->mSrc[1].mIntConst > maxo)
|
||||||
|
maxo = ins->mSrc[1].mIntConst;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ins->mNumOperands; i++)
|
||||||
|
if (ins->mSrc[i].mTemp == temp)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool InterCodeBasicBlock::SimplifyPointerOffsets(void)
|
||||||
|
{
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
if (!mVisited)
|
||||||
|
{
|
||||||
|
mVisited = true;
|
||||||
|
|
||||||
|
for (int i = 0; i < mInstructions.Size(); i++)
|
||||||
|
{
|
||||||
|
InterInstruction* ins = mInstructions[i];
|
||||||
|
|
||||||
|
if (ins->mCode == IC_LEA && (ins->mSrc[0].mTemp < 0 || ins->mSrc[1].mTemp < 0) && !mExitRequiredTemps[ins->mDst.mTemp])
|
||||||
|
{
|
||||||
|
int minoffset = 65535, maxoffset = -65535;
|
||||||
|
|
||||||
|
int j = i + 1;
|
||||||
|
while (j < mInstructions.Size() && CheckSimplifyPointerOffsets(mInstructions[j], ins->mDst.mTemp, minoffset, maxoffset))
|
||||||
|
j++;
|
||||||
|
|
||||||
|
if (j == mInstructions.Size() && (minoffset < 0 || maxoffset > 255) && maxoffset - minoffset < 256)
|
||||||
|
{
|
||||||
|
if (ins->mSrc[0].mTemp < 0)
|
||||||
|
ins->mSrc[0].mIntConst += minoffset;
|
||||||
|
else
|
||||||
|
ins->mSrc[1].mIntConst += minoffset;
|
||||||
|
|
||||||
|
changed = true;
|
||||||
|
|
||||||
|
for (int j = i + 1; j < mInstructions.Size(); j++)
|
||||||
|
{
|
||||||
|
InterInstruction* tins = mInstructions[j];
|
||||||
|
if (tins->mCode == IC_LOAD && tins->mSrc[0].mTemp == ins->mDst.mTemp)
|
||||||
|
tins->mSrc[0].mIntConst -= minoffset;
|
||||||
|
else if (tins->mCode == IC_STORE && tins->mSrc[1].mTemp == ins->mDst.mTemp)
|
||||||
|
tins->mSrc[1].mIntConst -= minoffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTrueJump && mTrueJump->SimplifyPointerOffsets())
|
||||||
|
changed = true;
|
||||||
|
if (mFalseJump && mFalseJump->SimplifyPointerOffsets())
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool InterCodeBasicBlock::SimplifyIntegerNumeric(const GrowingInstructionPtrArray& tvalue, int& spareTemps)
|
bool InterCodeBasicBlock::SimplifyIntegerNumeric(const GrowingInstructionPtrArray& tvalue, int& spareTemps)
|
||||||
{
|
{
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
@ -12410,6 +12496,11 @@ void InterCodeProcedure::MergeIndexedLoadStore(void)
|
||||||
RemoveUnusedInstructions();
|
RemoveUnusedInstructions();
|
||||||
|
|
||||||
DisassembleDebug("MergeIndexedLoadStore");
|
DisassembleDebug("MergeIndexedLoadStore");
|
||||||
|
|
||||||
|
ResetVisited();
|
||||||
|
mEntryBlock->SimplifyPointerOffsets();
|
||||||
|
|
||||||
|
DisassembleDebug("SimplifyPointerOffsets");
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterCodeProcedure::SimplifyIntegerNumeric(FastNumberSet& activeSet)
|
void InterCodeProcedure::SimplifyIntegerNumeric(FastNumberSet& activeSet)
|
||||||
|
@ -13199,10 +13290,10 @@ bool InterCodeBasicBlock::SameExitCode(const InterCodeBasicBlock* block) const
|
||||||
{
|
{
|
||||||
if (ins0->mCode == IC_STORE && ins0->mSrc[1].mTemp >= 0)
|
if (ins0->mCode == IC_STORE && ins0->mSrc[1].mTemp >= 0)
|
||||||
{
|
{
|
||||||
int j0 = mInstructions.Size() - 2;
|
int j0 = mInstructions.Size() - 3;
|
||||||
while (j0 >= 0 && mInstructions[j0]->mDst.mTemp != ins0->mSrc[1].mTemp)
|
while (j0 >= 0 && mInstructions[j0]->mDst.mTemp != ins0->mSrc[1].mTemp)
|
||||||
j0--;
|
j0--;
|
||||||
int j1 = block->mInstructions.Size() - 2;
|
int j1 = block->mInstructions.Size() - 3;
|
||||||
while (j1 >= 0 && block->mInstructions[j1]->mDst.mTemp != ins0->mSrc[1].mTemp)
|
while (j1 >= 0 && block->mInstructions[j1]->mDst.mTemp != ins0->mSrc[1].mTemp)
|
||||||
j1--;
|
j1--;
|
||||||
|
|
||||||
|
@ -13217,6 +13308,26 @@ bool InterCodeBasicBlock::SameExitCode(const InterCodeBasicBlock* block) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (ins0->mCode == IC_LOAD && ins0->mSrc[0].mTemp >= 0)
|
||||||
|
{
|
||||||
|
int j0 = mInstructions.Size() - 3;
|
||||||
|
while (j0 >= 0 && mInstructions[j0]->mDst.mTemp != ins0->mSrc[0].mTemp)
|
||||||
|
j0--;
|
||||||
|
int j1 = block->mInstructions.Size() - 3;
|
||||||
|
while (j1 >= 0 && block->mInstructions[j1]->mDst.mTemp != ins0->mSrc[0].mTemp)
|
||||||
|
j1--;
|
||||||
|
|
||||||
|
if (j0 >= 0 && j1 >= 0)
|
||||||
|
{
|
||||||
|
if (!(mInstructions[j0]->IsEqual(block->mInstructions[j1])))
|
||||||
|
{
|
||||||
|
if (mInstructions[j0]->mCode == IC_LEA && mInstructions[j0]->mSrc[1].mTemp < 0)
|
||||||
|
return false;
|
||||||
|
if (block->mInstructions[j1]->mCode == IC_LEA && mInstructions[j1]->mSrc[1].mTemp < 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,6 +434,7 @@ public:
|
||||||
|
|
||||||
bool MergeIndexedLoadStore(const GrowingInstructionPtrArray& tvalue);
|
bool MergeIndexedLoadStore(const GrowingInstructionPtrArray& tvalue);
|
||||||
bool SimplifyIntegerNumeric(const GrowingInstructionPtrArray& tvalue, int& spareTemps);
|
bool SimplifyIntegerNumeric(const GrowingInstructionPtrArray& tvalue, int& spareTemps);
|
||||||
|
bool SimplifyPointerOffsets(void);
|
||||||
bool EliminateAliasValues(const GrowingInstructionPtrArray& tvalue, const GrowingInstructionPtrArray& avalue);
|
bool EliminateAliasValues(const GrowingInstructionPtrArray& tvalue, const GrowingInstructionPtrArray& avalue);
|
||||||
|
|
||||||
bool CalculateSingleAssignmentTemps(FastNumberSet& tassigned, GrowingInstructionPtrArray& tvalue, NumberSet& modifiedParams, InterMemory paramMemory);
|
bool CalculateSingleAssignmentTemps(FastNumberSet& tassigned, GrowingInstructionPtrArray& tvalue, NumberSet& modifiedParams, InterMemory paramMemory);
|
||||||
|
|
|
@ -3088,14 +3088,14 @@ bool NativeCodeInstruction::ValueForwarding(NativeRegisterDataSet& data, AsmInsT
|
||||||
mMode = ASMIM_IMMEDIATE;
|
mMode = ASMIM_IMMEDIATE;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
else if (data.mRegs[CPU_REG_A].mMode == NRDM_ZERO_PAGE && data.mRegs[CPU_REG_A].mValue == mAddress)
|
else if (final && data.mRegs[CPU_REG_A].mMode == NRDM_ZERO_PAGE && data.mRegs[CPU_REG_A].mValue == mAddress)
|
||||||
{
|
{
|
||||||
mType = ASMIT_TAY;
|
mType = ASMIT_TAY;
|
||||||
mMode = ASMIM_IMPLIED;
|
mMode = ASMIM_IMPLIED;
|
||||||
data.mRegs[CPU_REG_Y] = data.mRegs[CPU_REG_A];
|
data.mRegs[CPU_REG_Y] = data.mRegs[CPU_REG_A];
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
else if (data.mRegs[mAddress].SameData(data.mRegs[CPU_REG_A]))
|
else if (final && data.mRegs[mAddress].SameData(data.mRegs[CPU_REG_A]))
|
||||||
{
|
{
|
||||||
mType = ASMIT_TAY;
|
mType = ASMIT_TAY;
|
||||||
mMode = ASMIM_IMPLIED;
|
mMode = ASMIM_IMPLIED;
|
||||||
|
@ -10053,6 +10053,59 @@ void NativeCodeBasicBlock::RelationalOperator(InterCodeProcedure* proc, const In
|
||||||
this->Close(falseJump, trueJump, ASMIT_BEQ);
|
this->Close(falseJump, trueJump, ASMIT_BEQ);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else if (ins->mSrc[0].IsUByte() && ins->mSrc[1].IsUByte())
|
||||||
|
{
|
||||||
|
NativeCodeBasicBlock* eblock = nproc->AllocateBlock();
|
||||||
|
NativeCodeBasicBlock* nblock = nproc->AllocateBlock();
|
||||||
|
|
||||||
|
int li = 1, ri = 0;
|
||||||
|
if (op == IA_CMPLEU || op == IA_CMPGU || op == IA_CMPLES || op == IA_CMPGS)
|
||||||
|
{
|
||||||
|
li = 0; ri = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iconst = 0;
|
||||||
|
bool rconst = false;
|
||||||
|
|
||||||
|
if (ins->mSrc[ri].mTemp < 0)
|
||||||
|
{
|
||||||
|
iconst = ins->mSrc[ri].mIntConst;
|
||||||
|
rconst = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ins->mSrc[li].mTemp < 0)
|
||||||
|
mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_IMMEDIATE, ins->mSrc[li].mIntConst & 0xff));
|
||||||
|
else
|
||||||
|
mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[ins->mSrc[li].mTemp]));
|
||||||
|
if (rconst)
|
||||||
|
mIns.Push(NativeCodeInstruction(ASMIT_CMP, ASMIM_IMMEDIATE, iconst & 0xff));
|
||||||
|
else
|
||||||
|
mIns.Push(NativeCodeInstruction(ASMIT_CMP, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[ins->mSrc[ri].mTemp]));
|
||||||
|
|
||||||
|
switch (op)
|
||||||
|
{
|
||||||
|
case IA_CMPEQ:
|
||||||
|
this->Close(trueJump, falseJump, ASMIT_BEQ);
|
||||||
|
break;
|
||||||
|
case IA_CMPNE:
|
||||||
|
this->Close(falseJump, trueJump, ASMIT_BEQ);
|
||||||
|
break;
|
||||||
|
case IA_CMPLU:
|
||||||
|
case IA_CMPLS:
|
||||||
|
case IA_CMPGU:
|
||||||
|
case IA_CMPGS:
|
||||||
|
this->Close(trueJump, falseJump, ASMIT_BCC);
|
||||||
|
break;
|
||||||
|
case IA_CMPLEU:
|
||||||
|
case IA_CMPLES:
|
||||||
|
case IA_CMPGEU:
|
||||||
|
case IA_CMPGES:
|
||||||
|
this->Close(falseJump, trueJump, ASMIT_BCC);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NativeCodeBasicBlock* eblock = nproc->AllocateBlock();
|
NativeCodeBasicBlock* eblock = nproc->AllocateBlock();
|
||||||
|
@ -14344,8 +14397,14 @@ bool NativeCodeBasicBlock::PropagateSinglePath(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (mTrueJump && mFalseJump && mTrueJump->mNumEntries == 1 && mFalseJump->mNumEntries == 1)
|
if (mTrueJump && mFalseJump)
|
||||||
{
|
{
|
||||||
|
uint32 live = 0;
|
||||||
|
if (mExitRequiredRegs[CPU_REG_X])
|
||||||
|
live |= LIVE_CPU_REG_X;
|
||||||
|
if (mExitRequiredRegs[CPU_REG_Y])
|
||||||
|
live |= LIVE_CPU_REG_Y;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < mIns.Size())
|
while (i < mIns.Size())
|
||||||
{
|
{
|
||||||
|
@ -14358,14 +14417,9 @@ bool NativeCodeBasicBlock::PropagateSinglePath(void)
|
||||||
if (!ReferencedOnPath(this, i + 2, mIns.Size(), mIns[i + 1].mAddress) &&
|
if (!ReferencedOnPath(this, i + 2, mIns.Size(), mIns[i + 1].mAddress) &&
|
||||||
!ChangedOnPath(this, i + 2, mIns.Size(), mIns[i + 0].mAddress))
|
!ChangedOnPath(this, i + 2, mIns.Size(), mIns[i + 0].mAddress))
|
||||||
{
|
{
|
||||||
uint32 live = 0;
|
|
||||||
if (mExitRequiredRegs[CPU_REG_X])
|
|
||||||
live |= LIVE_CPU_REG_X;
|
|
||||||
if (mExitRequiredRegs[CPU_REG_Y])
|
|
||||||
live |= LIVE_CPU_REG_Y;
|
|
||||||
|
|
||||||
if (mTrueJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
if (mTrueJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
||||||
!mFalseJump->mEntryRequiredRegs[mIns[i + 1].mAddress])
|
!mFalseJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
||||||
|
mTrueJump->mNumEntries == 1)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 2; j++)
|
for (int j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
|
@ -14376,7 +14430,8 @@ bool NativeCodeBasicBlock::PropagateSinglePath(void)
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
else if (mFalseJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
else if (mFalseJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
||||||
!mTrueJump->mEntryRequiredRegs[mIns[i + 1].mAddress])
|
!mTrueJump->mEntryRequiredRegs[mIns[i + 1].mAddress] &&
|
||||||
|
mFalseJump->mNumEntries == 1)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 2; j++)
|
for (int j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
|
@ -14408,10 +14463,18 @@ bool NativeCodeBasicBlock::PropagateSinglePath(void)
|
||||||
!ChangedOnPath(this, i + 7, mIns.Size(), mIns[i + 4].mAddress))
|
!ChangedOnPath(this, i + 7, mIns.Size(), mIns[i + 4].mAddress))
|
||||||
{
|
{
|
||||||
if (mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
if (mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
!mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress])
|
!mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mTrueJump->mEntryRequiredRegs[CPU_REG_C] &&
|
||||||
|
mTrueJump->mNumEntries == 1)
|
||||||
{
|
{
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 1].mAddress;
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 2].mAddress;
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 4].mAddress;
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 5].mAddress;
|
||||||
|
|
||||||
for (int j = 0; j < 7; j++)
|
for (int j = 0; j < 7; j++)
|
||||||
{
|
{
|
||||||
|
mIns[i].mLive |= live;
|
||||||
mTrueJump->mIns.Insert(j, mIns[i]);
|
mTrueJump->mIns.Insert(j, mIns[i]);
|
||||||
mIns.Remove(i);
|
mIns.Remove(i);
|
||||||
}
|
}
|
||||||
|
@ -14419,10 +14482,72 @@ bool NativeCodeBasicBlock::PropagateSinglePath(void)
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
else if (mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
else if (mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
!mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress])
|
!mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mFalseJump->mEntryRequiredRegs[CPU_REG_C] &&
|
||||||
|
mFalseJump->mNumEntries == 1)
|
||||||
{
|
{
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 1].mAddress;
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 2].mAddress;
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 4].mAddress;
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 5].mAddress;
|
||||||
|
|
||||||
for (int j = 0; j < 7; j++)
|
for (int j = 0; j < 7; j++)
|
||||||
{
|
{
|
||||||
|
mIns[i].mLive |= live;
|
||||||
|
mFalseJump->mIns.Insert(j, mIns[i]);
|
||||||
|
mIns.Remove(i);
|
||||||
|
}
|
||||||
|
changed = true;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if 1
|
||||||
|
if (!mExitRequiredRegs[CPU_REG_A] &&
|
||||||
|
i + 6 < mIns.Size() &&
|
||||||
|
mIns[i + 0].mType == ASMIT_CLC &&
|
||||||
|
mIns[i + 1].mType == ASMIT_LDA && mIns[i + 1].mMode == ASMIM_ZERO_PAGE &&
|
||||||
|
mIns[i + 2].mType == ASMIT_ADC && mIns[i + 2].mMode == ASMIM_IMMEDIATE &&
|
||||||
|
mIns[i + 3].mType == ASMIT_STA && mIns[i + 3].mMode == ASMIM_ZERO_PAGE &&
|
||||||
|
mIns[i + 4].mType == ASMIT_LDA && mIns[i + 4].mMode == ASMIM_ZERO_PAGE &&
|
||||||
|
mIns[i + 5].mType == ASMIT_ADC && mIns[i + 5].mMode == ASMIM_IMMEDIATE &&
|
||||||
|
mIns[i + 6].mType == ASMIT_STA && mIns[i + 6].mMode == ASMIM_ZERO_PAGE &&
|
||||||
|
!(mIns[i + 6].mLive & (LIVE_CPU_REG_A | LIVE_CPU_REG_C | LIVE_CPU_REG_Z)))
|
||||||
|
{
|
||||||
|
if (!ReferencedOnPath(this, i + 7, mIns.Size(), mIns[i + 3].mAddress) &&
|
||||||
|
!ReferencedOnPath(this, i + 7, mIns.Size(), mIns[i + 6].mAddress) &&
|
||||||
|
!ChangedOnPath(this, i + 7, mIns.Size(), mIns[i + 1].mAddress) &&
|
||||||
|
!ChangedOnPath(this, i + 7, mIns.Size(), mIns[i + 4].mAddress))
|
||||||
|
{
|
||||||
|
if (mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mTrueJump->mEntryRequiredRegs[CPU_REG_C] &&
|
||||||
|
mTrueJump->mNumEntries == 1)
|
||||||
|
{
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 1].mAddress;
|
||||||
|
mTrueJump->mEntryRequiredRegs += mIns[i + 4].mAddress;
|
||||||
|
|
||||||
|
for (int j = 0; j < 7; j++)
|
||||||
|
{
|
||||||
|
mIns[i].mLive |= live;
|
||||||
|
mTrueJump->mIns.Insert(j, mIns[i]);
|
||||||
|
mIns.Remove(i);
|
||||||
|
}
|
||||||
|
changed = true;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
else if (mFalseJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && mFalseJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mTrueJump->mEntryRequiredRegs[mIns[i + 3].mAddress] && !mTrueJump->mEntryRequiredRegs[mIns[i + 6].mAddress] &&
|
||||||
|
!mFalseJump->mEntryRequiredRegs[CPU_REG_C] &&
|
||||||
|
mFalseJump->mNumEntries == 1)
|
||||||
|
{
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 1].mAddress;
|
||||||
|
mFalseJump->mEntryRequiredRegs += mIns[i + 4].mAddress;
|
||||||
|
|
||||||
|
for (int j = 0; j < 7; j++)
|
||||||
|
{
|
||||||
|
mIns[i].mLive |= live;
|
||||||
mFalseJump->mIns.Insert(j, mIns[i]);
|
mFalseJump->mIns.Insert(j, mIns[i]);
|
||||||
mIns.Remove(i);
|
mIns.Remove(i);
|
||||||
}
|
}
|
||||||
|
@ -25514,6 +25639,15 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
|
||||||
mIns[i + 1].mType = ASMIT_NOP; mIns[i + 1].mMode = ASMIM_IMPLIED;
|
mIns[i + 1].mType = ASMIT_NOP; mIns[i + 1].mMode = ASMIM_IMPLIED;
|
||||||
progress = true;
|
progress = true;
|
||||||
}
|
}
|
||||||
|
else if (
|
||||||
|
mIns[i + 0].mType == ASMIT_EOR && mIns[i + 0].mMode == ASMIM_IMMEDIATE && mIns[i + 0].mAddress == 0x80 &&
|
||||||
|
mIns[i + 1].mType == ASMIT_CLC &&
|
||||||
|
mIns[i + 2].mType == ASMIT_ADC && mIns[i + 2].mMode == ASMIM_IMMEDIATE && !(mIns[i + 2].mLive & LIVE_CPU_REG_C))
|
||||||
|
{
|
||||||
|
mIns[i + 2].mAddress ^= 0x80;
|
||||||
|
mIns[i + 0].mType = ASMIT_NOP; mIns[i + 0].mMode = ASMIM_IMPLIED;
|
||||||
|
progress = true;
|
||||||
|
}
|
||||||
else if (
|
else if (
|
||||||
mIns[i + 0].mType == ASMIT_STA && !(mIns[i + 0].mFlags & NCIF_VOLATILE) &&
|
mIns[i + 0].mType == ASMIT_STA && !(mIns[i + 0].mFlags & NCIF_VOLATILE) &&
|
||||||
mIns[i + 2].mType == ASMIT_STA && mIns[i + 0].SameEffectiveAddress(mIns[i + 2]) &&
|
mIns[i + 2].mType == ASMIT_STA && mIns[i + 0].SameEffectiveAddress(mIns[i + 2]) &&
|
||||||
|
|
|
@ -74,7 +74,7 @@ int main2(int argc, const char** argv)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
strcpy(strProductName, "oscar64");
|
strcpy(strProductName, "oscar64");
|
||||||
strcpy(strProductVersion, "1.10.159");
|
strcpy(strProductVersion, "1.10.160");
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
uint32_t length = sizeof(basePath);
|
uint32_t length = sizeof(basePath);
|
||||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,10,159,0
|
FILEVERSION 1,10,160,0
|
||||||
PRODUCTVERSION 1,10,159,0
|
PRODUCTVERSION 1,10,160,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -43,12 +43,12 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "oscar64"
|
VALUE "CompanyName", "oscar64"
|
||||||
VALUE "FileDescription", "oscar64 compiler"
|
VALUE "FileDescription", "oscar64 compiler"
|
||||||
VALUE "FileVersion", "1.10.159.0"
|
VALUE "FileVersion", "1.10.160.0"
|
||||||
VALUE "InternalName", "oscar64.exe"
|
VALUE "InternalName", "oscar64.exe"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||||
VALUE "OriginalFilename", "oscar64.exe"
|
VALUE "OriginalFilename", "oscar64.exe"
|
||||||
VALUE "ProductName", "oscar64"
|
VALUE "ProductName", "oscar64"
|
||||||
VALUE "ProductVersion", "1.10.159.0"
|
VALUE "ProductVersion", "1.10.160.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -4283,15 +4283,15 @@
|
||||||
{
|
{
|
||||||
"Name" = "8:Microsoft Visual Studio"
|
"Name" = "8:Microsoft Visual Studio"
|
||||||
"ProductName" = "8:oscar64"
|
"ProductName" = "8:oscar64"
|
||||||
"ProductCode" = "8:{DFC9DE17-3A31-412F-8F77-10A45F86A501}"
|
"ProductCode" = "8:{19B844D1-6434-4C0B-B688-10F2E54094E5}"
|
||||||
"PackageCode" = "8:{5354F88F-7B2C-41B8-8333-6BDD97B1DA2E}"
|
"PackageCode" = "8:{87C23B44-6BED-4149-BA41-995EC9878D8C}"
|
||||||
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
|
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
|
||||||
"AspNetVersion" = "8:2.0.50727.0"
|
"AspNetVersion" = "8:2.0.50727.0"
|
||||||
"RestartWWWService" = "11:FALSE"
|
"RestartWWWService" = "11:FALSE"
|
||||||
"RemovePreviousVersions" = "11:TRUE"
|
"RemovePreviousVersions" = "11:TRUE"
|
||||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||||
"InstallAllUsers" = "11:FALSE"
|
"InstallAllUsers" = "11:FALSE"
|
||||||
"ProductVersion" = "8:1.10.159"
|
"ProductVersion" = "8:1.10.160"
|
||||||
"Manufacturer" = "8:oscar64"
|
"Manufacturer" = "8:oscar64"
|
||||||
"ARPHELPTELEPHONE" = "8:"
|
"ARPHELPTELEPHONE" = "8:"
|
||||||
"ARPHELPLINK" = "8:"
|
"ARPHELPLINK" = "8:"
|
||||||
|
|
Loading…
Reference in New Issue