Fix PET target zero page variable range
This commit is contained in:
parent
2acca6d7b1
commit
e6bc6371c9
|
@ -508,6 +508,8 @@ bool Compiler::GenerateCode(void)
|
||||||
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x00e0, 0x00ff);
|
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x00e0, 0x00ff);
|
||||||
else if (mCompilerOptions & (COPT_EXTENDED_ZERO_PAGE | COPT_TARGET_NES))
|
else if (mCompilerOptions & (COPT_EXTENDED_ZERO_PAGE | COPT_TARGET_NES))
|
||||||
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x0080, 0x00ff);
|
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x0080, 0x00ff);
|
||||||
|
else if (mTargetMachine == TMACH_PET_8K || mTargetMachine == TMACH_PET_16K || mTargetMachine == TMACH_PET_32K)
|
||||||
|
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x00ed, 0x00f7);
|
||||||
else
|
else
|
||||||
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x00f7, 0x00ff);
|
regionZeroPage = mLinker->AddRegion(identZeroPage, 0x00f7, 0x00ff);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14347,12 +14347,13 @@ void NativeCodeBasicBlock::CallAssembler(InterCodeProcedure* proc, NativeCodePro
|
||||||
if (dins.mFlags & NCIF_VOLATILE)
|
if (dins.mFlags & NCIF_VOLATILE)
|
||||||
simple = false;
|
simple = false;
|
||||||
|
|
||||||
if (dins.mMode == ASMIM_ZERO_PAGE && dins.mAddress >= BC_REG_WORK && dins.mAddress < BC_REG_WORK + 8)
|
if (dins.mMode == ASMIM_ZERO_PAGE)
|
||||||
|
{
|
||||||
|
if (dins.mAddress >= BC_REG_WORK && dins.mAddress < BC_REG_WORK + 8)
|
||||||
uflags |= NICF_USE_WORKREGS;
|
uflags |= NICF_USE_WORKREGS;
|
||||||
|
else if (dins.mLinkerObject)
|
||||||
// Make sure we are not aliasing zeropage globals
|
dins.mMode = ASMIM_ABSOLUTE; // Make sure we are not aliasing zeropage globals
|
||||||
if (dins.mMode == ASMIM_ZERO_PAGE && dins.mLinkerObject)
|
}
|
||||||
dins.mMode = ASMIM_ABSOLUTE;
|
|
||||||
|
|
||||||
if (dins.ChangesAccu())
|
if (dins.ChangesAccu())
|
||||||
uflags |= NCIF_USE_CPU_REG_A;
|
uflags |= NCIF_USE_CPU_REG_A;
|
||||||
|
|
Loading…
Reference in New Issue