Bump version number

This commit is contained in:
drmortalwombat 2022-04-17 21:12:54 +02:00
parent 41a4db4402
commit ecb9bbee8a
4 changed files with 65 additions and 23 deletions

View File

@ -1039,18 +1039,27 @@ bool NativeCodeInstruction::MayBeChangedOnAddress(const NativeCodeInstruction& i
return mLinkerObject == ins.mLinkerObject && mAddress == ins.mAddress; return mLinkerObject == ins.mLinkerObject && mAddress == ins.mAddress;
else if (mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y) else if (mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y)
return mLinkerObject == ins.mLinkerObject; return mLinkerObject == ins.mLinkerObject;
else if (mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X)
return mAddress != BC_REG_STACK;
else else
return mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X; return false;
} }
else if (ins.mMode == ASMIM_ABSOLUTE_X || ins.mMode == ASMIM_ABSOLUTE_Y) else if (ins.mMode == ASMIM_ABSOLUTE_X || ins.mMode == ASMIM_ABSOLUTE_Y)
{ {
if (mMode == ASMIM_ABSOLUTE || mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y) if (mMode == ASMIM_ABSOLUTE || mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y)
return mLinkerObject == ins.mLinkerObject; return mLinkerObject == ins.mLinkerObject;
else if (mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X)
return mAddress != BC_REG_STACK;
else
return false;
}
else if (ins.mMode == ASMIM_INDIRECT_Y || ins.mMode == ASMIM_INDIRECT_X)
{
if (mMode == ASMIM_ABSOLUTE || mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y)
return ins.mAddress != BC_REG_STACK;
else else
return mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X; return mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X;
} }
else if (ins.mMode == ASMIM_INDIRECT_Y || ins.mMode == ASMIM_INDIRECT_X)
return mMode == ASMIM_ABSOLUTE || mMode == ASMIM_ABSOLUTE_X || mMode == ASMIM_ABSOLUTE_Y || mMode == ASMIM_INDIRECT_Y || mMode == ASMIM_INDIRECT_X;
else else
return false; return false;
} }
@ -2201,6 +2210,7 @@ bool NativeCodeInstruction::ValueForwarding(NativeRegisterDataSet& data, AsmInsT
break; break;
} }
#if 1
if (mMode == ASMIM_ABSOLUTE_X && data.mRegs[CPU_REG_X].mMode == NRDM_IMMEDIATE) if (mMode == ASMIM_ABSOLUTE_X && data.mRegs[CPU_REG_X].mMode == NRDM_IMMEDIATE)
{ {
mMode = ASMIM_ABSOLUTE; mMode = ASMIM_ABSOLUTE;
@ -2213,13 +2223,15 @@ bool NativeCodeInstruction::ValueForwarding(NativeRegisterDataSet& data, AsmInsT
mAddress += data.mRegs[CPU_REG_Y].mValue; mAddress += data.mRegs[CPU_REG_Y].mValue;
changed = true; changed = true;
} }
#endif
#if 1
if (mMode == ASMIM_ABSOLUTE_X && data.mRegs[CPU_REG_X].SameData(data.mRegs[CPU_REG_Y]) && HasAsmInstructionMode(mType, ASMIM_ABSOLUTE_Y)) if (mMode == ASMIM_ABSOLUTE_X && data.mRegs[CPU_REG_X].SameData(data.mRegs[CPU_REG_Y]) && HasAsmInstructionMode(mType, ASMIM_ABSOLUTE_Y))
{ {
mMode = ASMIM_ABSOLUTE_Y; mMode = ASMIM_ABSOLUTE_Y;
changed = true; changed = true;
} }
#endif
if (mMode == ASMIM_ZERO_PAGE) if (mMode == ASMIM_ZERO_PAGE)
{ {
switch (mType) switch (mType)
@ -4224,11 +4236,15 @@ void NativeCodeBasicBlock::LoadByteIndexedValue(InterCodeProcedure* proc, const
{ {
mIns.Push(NativeCodeInstruction(ASMIT_LDY, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[iins->mSrc[0].mTemp])); mIns.Push(NativeCodeInstruction(ASMIT_LDY, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[iins->mSrc[0].mTemp]));
uint32 flags = NCIF_LOWER | NCIF_UPPER;
if (rins->mVolatile)
flags |= NCIF_VOLATILE;
for (int i = 0; i < InterTypeSize[rins->mDst.mType]; i++) for (int i = 0; i < InterTypeSize[rins->mDst.mType]; i++)
{ {
if (i != 0) if (i != 0)
mIns.Push(NativeCodeInstruction(ASMIT_INY, ASMIM_IMPLIED)); mIns.Push(NativeCodeInstruction(ASMIT_INY, ASMIM_IMPLIED));
mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_INDIRECT_Y, BC_REG_TMP + proc->mTempOffset[iins->mSrc[1].mTemp])); mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_INDIRECT_Y, BC_REG_TMP + proc->mTempOffset[iins->mSrc[1].mTemp], nullptr, flags));
mIns.Push(NativeCodeInstruction(ASMIT_STA, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[rins->mDst.mTemp] + i)); mIns.Push(NativeCodeInstruction(ASMIT_STA, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[rins->mDst.mTemp] + i));
} }
} }
@ -4237,12 +4253,16 @@ void NativeCodeBasicBlock::StoreByteIndexedValue(InterCodeProcedure* proc, const
{ {
mIns.Push(NativeCodeInstruction(ASMIT_LDY, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[iins->mSrc[0].mTemp])); mIns.Push(NativeCodeInstruction(ASMIT_LDY, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[iins->mSrc[0].mTemp]));
uint32 flags = NCIF_LOWER | NCIF_UPPER;
if (wins->mVolatile)
flags |= NCIF_VOLATILE;
for (int i = 0; i < InterTypeSize[wins->mSrc[0].mType]; i++) for (int i = 0; i < InterTypeSize[wins->mSrc[0].mType]; i++)
{ {
if (i != 0) if (i != 0)
mIns.Push(NativeCodeInstruction(ASMIT_INY, ASMIM_IMPLIED)); mIns.Push(NativeCodeInstruction(ASMIT_INY, ASMIM_IMPLIED));
mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[wins->mSrc[0].mTemp] + i)); mIns.Push(NativeCodeInstruction(ASMIT_LDA, ASMIM_ZERO_PAGE, BC_REG_TMP + proc->mTempOffset[wins->mSrc[0].mTemp] + i));
mIns.Push(NativeCodeInstruction(ASMIT_STA, ASMIM_INDIRECT_Y, BC_REG_TMP + proc->mTempOffset[iins->mSrc[1].mTemp])); mIns.Push(NativeCodeInstruction(ASMIT_STA, ASMIM_INDIRECT_Y, BC_REG_TMP + proc->mTempOffset[iins->mSrc[1].mTemp], nullptr, flags));
} }
} }
@ -10567,6 +10587,7 @@ bool NativeCodeBasicBlock::ExpandADCToBranch(NativeCodeProcedure* proc)
for (int i = 0; i < mIns.Size(); i++) for (int i = 0; i < mIns.Size(); i++)
{ {
#if 1
if (i + 6 < mIns.Size()) if (i + 6 < mIns.Size())
{ {
if (mIns[i + 0].mType == ASMIT_CLC && if (mIns[i + 0].mType == ASMIT_CLC &&
@ -10609,7 +10630,7 @@ bool NativeCodeBasicBlock::ExpandADCToBranch(NativeCodeProcedure* proc)
} }
} }
#endif
if (i + 2 < mIns.Size()) if (i + 2 < mIns.Size())
{ {
if (mIns[i + 0].mType == ASMIT_LDA && if (mIns[i + 0].mType == ASMIT_LDA &&
@ -13083,9 +13104,7 @@ bool NativeCodeBasicBlock::MoveIndirectLoadStoreUp(int at)
return true; return true;
} }
if (mIns[j].mLive & LIVE_CPU_REG_Y) if (mIns[j].ReferencesYReg())
return false;
if (mIns[j].ChangesYReg())
return false; return false;
if (mIns[j].ChangesZeroPage(mIns[at].mAddress)) if (mIns[j].ChangesZeroPage(mIns[at].mAddress))
return false; return false;
@ -16778,6 +16797,7 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
for (int i = 0; i + 2 < mIns.Size(); i++) for (int i = 0; i + 2 < mIns.Size(); i++)
{ {
#if 1
if (mIns[i].mType == ASMIT_LDY) if (mIns[i].mType == ASMIT_LDY)
{ {
if (!mIns[i + 1].RequiresYReg() && !mIns[i + 1].ChangesYReg() && !(mIns[i + 1].mLive & LIVE_CPU_REG_Z)) if (!mIns[i + 1].RequiresYReg() && !mIns[i + 1].ChangesYReg() && !(mIns[i + 1].mLive & LIVE_CPU_REG_Z))
@ -16818,6 +16838,7 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
} }
} }
} }
#endif
} }
#endif #endif
@ -17036,6 +17057,7 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
#endif #endif
#if 1
int taxPos = -1, tayPos = -1; int taxPos = -1, tayPos = -1;
for (int i = 0; i < mIns.Size(); i++) for (int i = 0; i < mIns.Size(); i++)
{ {
@ -17095,7 +17117,6 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
} }
} }
#if 1
#endif #endif
#if 1 #if 1
@ -19703,6 +19724,22 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass
int a = mIns[i + 1].mAddress; mIns[i + 1].mAddress = mIns[i + 4].mAddress; mIns[i + 4].mAddress = a; int a = mIns[i + 1].mAddress; mIns[i + 1].mAddress = mIns[i + 4].mAddress; mIns[i + 4].mAddress = a;
progress = true; progress = true;
} }
#if 1
else if (
mIns[i + 0].mType == ASMIT_LDA && !mIns[i + 0].RequiresYReg() &&
mIns[i + 1].mType == ASMIT_STA && mIns[i + 1].mMode == ASMIM_ZERO_PAGE &&
mIns[i + 2].mType == ASMIT_LDA && !mIns[i + 2].SameEffectiveAddress(mIns[i + 1]) &&
mIns[i + 3].mType == ASMIT_LDY && mIns[i + 3].mMode == ASMIM_IMMEDIATE &&
mIns[i + 4].mType == ASMIT_STA && mIns[i + 4].mMode == ASMIM_INDIRECT_Y && mIns[i + 4].mAddress != mIns[i + 1].mAddress && mIns[i + 4].mAddress != mIns[i + 1].mAddress + 1 &&
mIns[i + 5].mType == ASMIT_LDA && mIns[i + 5].SameEffectiveAddress(mIns[i + 1]) && !(mIns[i + 5].mLive & LIVE_MEM) &&
!mIns[i + 0].MayBeChangedOnAddress(mIns[i + 4]))
{
mIns[i + 5] = mIns[i + 0];
mIns[i + 0].mType = ASMIT_NOP; mIns[i + 0].mMode = ASMIM_IMPLIED;
mIns[i + 1].mType = ASMIT_NOP; mIns[i + 1].mMode = ASMIM_IMPLIED;
progress = true;
}
#endif
else if (pass > 0 && else if (pass > 0 &&
mIns[i + 0].mType == ASMIT_LDA && mIns[i + 0].mMode == ASMIM_ZERO_PAGE && mIns[i + 0].mType == ASMIT_LDA && mIns[i + 0].mMode == ASMIM_ZERO_PAGE &&
mIns[i + 1].IsShift() && mIns[i + 1].mMode == ASMIM_ZERO_PAGE && mIns[i + 1].IsShift() && mIns[i + 1].mMode == ASMIM_ZERO_PAGE &&
@ -20903,6 +20940,7 @@ void NativeCodeProcedure::Optimize(void)
mBlocks[i]->mSameBlock = nullptr; mBlocks[i]->mSameBlock = nullptr;
} }
#if 1
if (step > 3) if (step > 3)
{ {
ResetVisited(); ResetVisited();
@ -20912,6 +20950,7 @@ void NativeCodeProcedure::Optimize(void)
changed = mEntryBlock->MergeSameBlocks(this); changed = mEntryBlock->MergeSameBlocks(this);
} }
} }
#endif
ResetVisited(); ResetVisited();
ResetEntryBlocks(); ResetEntryBlocks();
@ -21140,9 +21179,10 @@ void NativeCodeProcedure::Optimize(void)
cnt++; cnt++;
} while (changed); } while (changed);
#if 1
ResetVisited(); ResetVisited();
mEntryBlock->ReduceLocalYPressure(); mEntryBlock->ReduceLocalYPressure();
#endif
CompressTemporaries(); CompressTemporaries();
#if 1 #if 1
@ -21414,11 +21454,12 @@ void NativeCodeProcedure::CompileInterBlock(InterCodeProcedure* iproc, InterCode
else if (iblock->mInstructions[i + 1]->mCode == IC_STORE && iblock->mInstructions[i + 1]->mSrc[1].mTemp == ins->mDst.mTemp) else if (iblock->mInstructions[i + 1]->mCode == IC_STORE && iblock->mInstructions[i + 1]->mSrc[1].mTemp == ins->mDst.mTemp)
avalid = true; avalid = true;
} }
#if 1
if (i + 1 < iblock->mInstructions.Size() && if (i + 1 < iblock->mInstructions.Size() &&
iblock->mInstructions[i + 1]->mCode == IC_LOAD && iblock->mInstructions[i + 1]->mSrc[0].mTemp == ins->mDst.mTemp && iblock->mInstructions[i + 1]->mSrc[0].mFinal && iblock->mInstructions[i + 1]->mCode == IC_LOAD && iblock->mInstructions[i + 1]->mSrc[0].mTemp == ins->mDst.mTemp && iblock->mInstructions[i + 1]->mSrc[0].mFinal &&
iblock->mInstructions[i + 0]->mSrc[1].mTemp >= 0 && iblock->mInstructions[i + 0]->mSrc[0].IsUByte() && ins->mSrc[1].mTemp >= 0 && ins->mSrc[0].IsUByte() && ins->mSrc[0].mTemp >= 0 &&
iblock->mInstructions[i + 1]->mSrc[0].mIntConst == 0) iblock->mInstructions[i + 1]->mSrc[0].mIntConst == 0 &&
(InterTypeSize[iblock->mInstructions[i + 1]->mDst.mType] == 1 || ins->mSrc[1].mTemp != iblock->mInstructions[i + 1]->mDst.mTemp))
{ {
block->LoadByteIndexedValue(iproc, ins, iblock->mInstructions[i + 1]); block->LoadByteIndexedValue(iproc, ins, iblock->mInstructions[i + 1]);
i++; i++;
@ -21432,6 +21473,7 @@ void NativeCodeProcedure::CompileInterBlock(InterCodeProcedure* iproc, InterCode
i++; i++;
} }
else else
#endif
{ {
block->LoadEffectiveAddress(iproc, ins, nullptr, nullptr, avalid); block->LoadEffectiveAddress(iproc, ins, nullptr, nullptr, avalid);
} }

View File

@ -73,7 +73,7 @@ int main2(int argc, const char** argv)
#else #else
strcpy(strProductName, "oscar64"); strcpy(strProductName, "oscar64");
strcpy(strProductVersion, "1.5.117"); strcpy(strProductVersion, "1.5.118");
#ifdef __APPLE__ #ifdef __APPLE__
uint32_t length = sizeof(basePath); uint32_t length = sizeof(basePath);

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,5,117,0 FILEVERSION 1,5,118,0
PRODUCTVERSION 1,5,117,0 PRODUCTVERSION 1,5,118,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.5.117.0" VALUE "FileVersion", "1.5.118.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.5.117.0" VALUE "ProductVersion", "1.5.118.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -4023,15 +4023,15 @@
{ {
"Name" = "8:Microsoft Visual Studio" "Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oscar64" "ProductName" = "8:oscar64"
"ProductCode" = "8:{13BD934B-1637-4989-8616-270CF677ADF6}" "ProductCode" = "8:{608057E0-DAA0-4E03-846A-C1CC3DB0DF23}"
"PackageCode" = "8:{2EA4AD42-948A-48FA-A940-0325656775A8}" "PackageCode" = "8:{65A09B39-BEDF-4797-AFF2-480B80A618D0}"
"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.5.117" "ProductVersion" = "8:1.5.118"
"Manufacturer" = "8:oscar64" "Manufacturer" = "8:oscar64"
"ARPHELPTELEPHONE" = "8:" "ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:" "ARPHELPLINK" = "8:"