Fix loop exit condition broken by Y register lifting
This commit is contained in:
parent
862b8aaf06
commit
16faec8627
|
@ -24680,6 +24680,17 @@ bool NativeCodeBasicBlock::OptimizeGenericLoop(NativeCodeProcedure* proc)
|
|||
yreg = -2;
|
||||
xreg = -2;
|
||||
break;
|
||||
case ASMIT_CMP:
|
||||
if (ins.mMode == ASMIM_INDIRECT_Y && yoffset != 0 && yreg >= 0)
|
||||
{
|
||||
yreg = -2;
|
||||
}
|
||||
else if (ins.mMode == ASMIM_ZERO_PAGE)
|
||||
{
|
||||
zxreg[ins.mAddress] = -1;
|
||||
zyreg[ins.mAddress] = -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (ins.mMode == ASMIM_ZERO_PAGE)
|
||||
{
|
||||
|
@ -33110,7 +33121,7 @@ void NativeCodeProcedure::RebuildEntry(void)
|
|||
|
||||
void NativeCodeProcedure::Optimize(void)
|
||||
{
|
||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "main");
|
||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "checkKeys");
|
||||
|
||||
#if 1
|
||||
int step = 0;
|
||||
|
@ -33346,7 +33357,6 @@ void NativeCodeProcedure::Optimize(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if _DEBUG
|
||||
ResetVisited();
|
||||
mEntryBlock->CheckBlocks(true);
|
||||
|
@ -33365,7 +33375,6 @@ void NativeCodeProcedure::Optimize(void)
|
|||
if (mEntryBlock->OptimizeFindLoop(this))
|
||||
changed = true;
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
ResetVisited();
|
||||
if (mEntryBlock->ReduceLocalYPressure())
|
||||
|
@ -33398,7 +33407,6 @@ void NativeCodeProcedure::Optimize(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (step > 3 && !changed)
|
||||
{
|
||||
ResetVisited();
|
||||
|
@ -33640,7 +33648,6 @@ void NativeCodeProcedure::Optimize(void)
|
|||
else
|
||||
cnt++;
|
||||
|
||||
|
||||
} while (changed);
|
||||
|
||||
#if 1
|
||||
|
|
|
@ -74,7 +74,7 @@ int main2(int argc, const char** argv)
|
|||
|
||||
#else
|
||||
strcpy(strProductName, "oscar64");
|
||||
strcpy(strProductVersion, "1.14.180");
|
||||
strcpy(strProductVersion, "1.14.181");
|
||||
|
||||
#ifdef __APPLE__
|
||||
uint32_t length = sizeof(basePath);
|
||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,14,180,0
|
||||
PRODUCTVERSION 1,14,180,0
|
||||
FILEVERSION 1,14,181,0
|
||||
PRODUCTVERSION 1,14,181,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -43,12 +43,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "oscar64"
|
||||
VALUE "FileDescription", "oscar64 compiler"
|
||||
VALUE "FileVersion", "1.14.180.0"
|
||||
VALUE "FileVersion", "1.14.181.0"
|
||||
VALUE "InternalName", "oscar64.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "oscar64.exe"
|
||||
VALUE "ProductName", "oscar64"
|
||||
VALUE "ProductVersion", "1.14.180.0"
|
||||
VALUE "ProductVersion", "1.14.181.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -4450,15 +4450,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:oscar64"
|
||||
"ProductCode" = "8:{98E06092-44C3-4257-9CB5-558CC95ECD52}"
|
||||
"PackageCode" = "8:{46539414-1B0F-4F6C-AE0A-F6593086E4A7}"
|
||||
"ProductCode" = "8:{F041F169-30F1-469E-BB7C-E316C7A562B5}"
|
||||
"PackageCode" = "8:{B0EC0EC4-A9FC-496F-B024-6515FEB53CC0}"
|
||||
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
|
||||
"AspNetVersion" = "8:2.0.50727.0"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:1.14.180"
|
||||
"ProductVersion" = "8:1.14.181"
|
||||
"Manufacturer" = "8:oscar64"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
|
Loading…
Reference in New Issue