Fix noinline, improve cartridge use of bank 0
This commit is contained in:
parent
cf28c1a618
commit
003306f961
|
@ -219,8 +219,10 @@ w0:
|
|||
sta $ff3f
|
||||
#endif
|
||||
|
||||
#if !defined(OSCAR_TARGET_CRT8) && !defined(OSCAR_TARGET_CRT16)
|
||||
tsx
|
||||
stx spentry
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17798,7 +17798,7 @@ InterCodeProcedure::InterCodeProcedure(InterCodeModule * mod, const Location & l
|
|||
mNativeProcedure(false), mLeafProcedure(false), mCallsFunctionPointer(false), mCalledFunctions(nullptr), mFastCallProcedure(false),
|
||||
mInterrupt(false), mHardwareInterrupt(false), mCompiled(false), mInterruptCalled(false), mDynamicStack(false), mAssembled(false),
|
||||
mSaveTempsLinkerObject(nullptr), mValueReturn(false), mFramePointer(false),
|
||||
mCheckUnreachable(true), mReturnType(IT_NONE), mCheapInline(false),
|
||||
mCheckUnreachable(true), mReturnType(IT_NONE), mCheapInline(false), mNoInline(false),
|
||||
mDeclaration(nullptr), mGlobalsChecked(false), mDispatchedCall(false),
|
||||
mNumRestricted(1)
|
||||
{
|
||||
|
@ -19707,7 +19707,7 @@ void InterCodeProcedure::Close(void)
|
|||
mLinkerObject->mFlags |= LOBJF_STATIC_STACK;
|
||||
}
|
||||
|
||||
if (!mEntryBlock->mTrueJump)
|
||||
if (!mNoInline && !mEntryBlock->mTrueJump)
|
||||
{
|
||||
int nconst = 0, nvariables = 0, nparams = 0, ncalls = 0, nret = 0, nother = 0, nops = 0;
|
||||
for (int i = 0; i < mEntryBlock->mInstructions.Size(); i++)
|
||||
|
|
|
@ -638,6 +638,7 @@ public:
|
|||
bool mCheckUnreachable;
|
||||
GrowingInterCodeProcedurePtrArray mCalledFunctions;
|
||||
bool mCheapInline;
|
||||
bool mNoInline;
|
||||
|
||||
InterCodeModule * mModule;
|
||||
int mID;
|
||||
|
|
|
@ -5174,6 +5174,9 @@ InterCodeProcedure* InterCodeGenerator::TranslateProcedure(InterCodeModule * mod
|
|||
if (dec->mFlags & DTF_DYNSTACK)
|
||||
proc->mDynamicStack = true;
|
||||
|
||||
if (dec->mFlags & DTF_PREVENT_INLINE)
|
||||
proc->mNoInline = true;
|
||||
|
||||
if (dec->mBase->mFlags & DTF_FASTCALL)
|
||||
{
|
||||
proc->mFastCallProcedure = true;
|
||||
|
|
|
@ -1117,6 +1117,9 @@ bool Linker::WriteCrtFile(const char* filename, uint16 id)
|
|||
|
||||
memset(bootmem, 0, 0x4000);
|
||||
|
||||
if (mCartridgeBankUsed[0])
|
||||
memcpy(bootmem, mCartridge[0] + 0x8000, 0x4000);
|
||||
|
||||
LinkerRegion* mainRegion = FindRegion(Ident::Unique("main"));
|
||||
LinkerRegion* startupRegion = FindRegion(Ident::Unique("startup"));
|
||||
|
||||
|
|
|
@ -4698,6 +4698,8 @@ Declaration* Parser::ParseDeclaration(Declaration * pdec, bool variable, bool ex
|
|||
{
|
||||
if (ndec->mBase->mType == DT_TYPE_FUNCTION)
|
||||
{
|
||||
ndec->mSection = mCodeSection;
|
||||
|
||||
if ((ndec->mFlags & DTF_DEFINED) && !(ndec->mFlags & DTF_REQUEST_INLINE))
|
||||
{
|
||||
mErrors->Error(mScanner->mLocation, EERR_DUPLICATE_DEFINITION, "Duplicate function definition", ndec->mQualIdent);
|
||||
|
@ -10046,6 +10048,7 @@ void Parser::ParseTemplateDeclarationBody(Declaration * tdec, Declaration * pthi
|
|||
mTemplateScope = tdec->mScope;
|
||||
|
||||
ConsumeTokenIf(TK_INLINE);
|
||||
ConsumeTokenIf(TK_NOINLINE);
|
||||
ConsumeTokenIf(TK_CONSTEXPR);
|
||||
|
||||
Declaration* bdec = ParseBaseTypeDeclaration(0, true);
|
||||
|
|
Loading…
Reference in New Issue