Fix global variable changes bypassing assembly blocks
This commit is contained in:
parent
87f1ddd27f
commit
38bb033328
|
@ -171,6 +171,12 @@ void vspr_init(char * screen)
|
|||
}
|
||||
}
|
||||
|
||||
void vspr_shutdown(void)
|
||||
{
|
||||
for(int i=0; i<VSPRITES_MAX - 7; i++)
|
||||
rirq_clear(i);
|
||||
}
|
||||
|
||||
void vspr_screen(char * screen)
|
||||
{
|
||||
vspriteScreen = screen + 0x3f8;
|
||||
|
|
|
@ -68,6 +68,8 @@ inline void spr_expand(char sp, bool xexpand, bool yexpand);
|
|||
|
||||
void vspr_init(char * screen);
|
||||
|
||||
void vspr_shutdown(void);
|
||||
|
||||
void vspr_screen(char * screen);
|
||||
|
||||
// set one sprite with the given attribute
|
||||
|
|
|
@ -18427,7 +18427,8 @@ void InterCodeBasicBlock::SingleBlockLoopOptimisation(const NumberSet& aliasedPa
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#if 1
|
||||
if (!hasCall && (mProc->mCompilerOptions & COPT_OPTIMIZE_BASIC))
|
||||
{
|
||||
// Check forwarding globals
|
||||
|
@ -18438,7 +18439,7 @@ void InterCodeBasicBlock::SingleBlockLoopOptimisation(const NumberSet& aliasedPa
|
|||
InterInstruction* ins = mInstructions[i];
|
||||
|
||||
// A global load
|
||||
if (ins->mCode == IC_LOAD && ins->mSrc[0].mTemp < 0 && (ins->mSrc[0].mMemory == IM_GLOBAL || ins->mSrc[0].mMemory == IM_FPARAM))
|
||||
if (ins->mCode == IC_LOAD && !ins->mVolatile && ins->mSrc[0].mTemp < 0 && (ins->mSrc[0].mMemory == IM_GLOBAL || ins->mSrc[0].mMemory == IM_FPARAM))
|
||||
{
|
||||
// Find the last store that overlaps the load
|
||||
int j = mInstructions.Size() - 1;
|
||||
|
@ -18450,7 +18451,7 @@ void InterCodeBasicBlock::SingleBlockLoopOptimisation(const NumberSet& aliasedPa
|
|||
InterInstruction* sins = mInstructions[j];
|
||||
|
||||
// Does a full store
|
||||
if (SameMem(ins->mSrc[0], sins->mSrc[1]) && !AliasingMem(this, ins, 0, mInstructions.Size()))
|
||||
if (SameMem(ins->mSrc[0], sins->mSrc[1]) && !AliasingMem(this, ins, 0, mInstructions.Size()) && !DestroyingMem(this, ins, 0, j))
|
||||
{
|
||||
if (sins->mSrc[0].mTemp >= 0)
|
||||
{
|
||||
|
@ -23012,7 +23013,7 @@ void InterCodeProcedure::Close(void)
|
|||
{
|
||||
GrowingTypeArray tstack(IT_NONE);
|
||||
|
||||
CheckFunc = !strcmp(mIdent->mString, "main");
|
||||
CheckFunc = !strcmp(mIdent->mString, "drawAllRows");
|
||||
CheckCase = false;
|
||||
|
||||
mEntryBlock = mBlocks[0];
|
||||
|
|
|
@ -669,7 +669,7 @@ bool NativeCodeInstruction::IsUsedResultInstructions(NumberSet& requiredTemps)
|
|||
|
||||
if (mFlags & NCIF_VOLATILE)
|
||||
{
|
||||
if (mMode != ASMIM_IMPLIED && mMode != ASMIM_ZERO_PAGE)
|
||||
if (mMode != ASMIM_IMPLIED && mMode != ASMIM_ZERO_PAGE && !(mMode == ASMIM_ABSOLUTE && mLinkerObject && (mLinkerObject->mFlags & LOBJF_ZEROPAGE)))
|
||||
used = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue