diff --git a/oscar64/GlobalAnalyzer.cpp b/oscar64/GlobalAnalyzer.cpp index 4df17c1..d9113fe 100644 --- a/oscar64/GlobalAnalyzer.cpp +++ b/oscar64/GlobalAnalyzer.cpp @@ -297,14 +297,16 @@ void GlobalAnalyzer::CheckFastcall(Declaration* procDec, bool head) for (int i = 0; i < mVariableFunctions.Size(); i++) { Declaration* vf = mVariableFunctions[i]; - CheckFastcall(vf, false); if (vf->mBase->IsSame(cf)) { + CheckFastcall(vf, false); + int n = vf->mBase->mFastCallBase + vf->mBase->mFastCallSize; if (n > nbase) nbase = n; } + } // procDec->mFlags |= DTF_DYNSTACK; } diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 13641af..9ad5473 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -3503,7 +3503,7 @@ bool NativeCodeInstruction::ValueForwarding(NativeRegisterDataSet& data, AsmInsT } changed = true; } - else if (data.mRegs[mAddress].mMode == NRDM_ZERO_PAGE) + else if (data.mRegs[mAddress].mMode == NRDM_ZERO_PAGE && (mAddress < BC_REG_FPARAMS || mAddress >= BC_REG_FPARAMS_END)) { data.mRegs[CPU_REG_A] = data.mRegs[mAddress]; mAddress = data.mRegs[CPU_REG_A].mValue; @@ -41410,7 +41410,7 @@ void NativeCodeProcedure::Optimize(void) t++; - } while (changed); + } while (changed && t < 20); #endif BuildDataFlowSets();