From b1a42e5ecf194683fbd13d105d3ca58a84fcc5d6 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:50:11 +0200 Subject: [PATCH] Fix linux build --- oscar64/InterCode.cpp | 6 ++++-- oscar64/NativeCodeGenerator.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index 2c4dbd7..9bd5e5f 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -3069,7 +3069,6 @@ void InterInstruction::CollectLocalAddressTemps(GrowingIntArray& localTable, Gro if (mConst.mVarIndex >= nparams) nparams = mConst.mVarIndex + 1; } - } else if (mCode == IC_LEA) { @@ -16695,6 +16694,9 @@ void InterCodeProcedure::BuildLocalAliasTable(void) GrowingIntArray localTable(-1), paramTable(-1); int nlocals = 0, nparams = 0; + localTable.SetSize(mTemporaries.Size()); + paramTable.SetSize(mTemporaries.Size()); + ResetVisited(); mEntryBlock->CollectLocalAddressTemps(localTable, paramTable, nlocals, nparams); @@ -16710,7 +16712,7 @@ void InterCodeProcedure::Close(void) { GrowingTypeArray tstack(IT_NONE); - CheckFunc = !strcmp(mIdent->mString, "card_color"); + CheckFunc = !strcmp(mIdent->mString, "playSong"); mEntryBlock = mBlocks[0]; diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index 5d9bbfd..13641af 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -379,7 +379,7 @@ NativeCodeInstruction::NativeCodeInstruction(const InterInstruction* ins, AsmIns } if (mode == ASMIM_ZERO_PAGE) { - assert(address >= 2 && address < 256); + assert(address >= 1 && address < 256); } }