added memtop to machine definition and asm source code check

added %memtop directive
This commit is contained in:
Irmen de Jong
2024-11-02 00:13:23 +01:00
parent 6fb05bdefc
commit 3b798097b9
31 changed files with 92 additions and 45 deletions

View File

@@ -284,6 +284,8 @@ internal class ProgramAndVarsGen(
asmgen.out(" .cerror * > ${relocatedBssEnd.toHex()}, \"too many data for slabs_BSS section\"")
}
}
asmgen.out(" ; memtop check")
asmgen.out(" .cerror * > ${options.memtopAddress.toHex()}, \"Program too long by \", * - ${options.memtopAddress.toHex()}, \" bytes, memtop=${options.memtopAddress.toHex()}\"")
}
private fun block2asm(block: PtBlock) {

View File

@@ -26,7 +26,8 @@ class TestCodegen: FunSpec({
floats = true,
noSysInit = false,
compTarget = target,
loadAddress = target.machine.PROGRAM_LOAD_ADDRESS
loadAddress = target.machine.PROGRAM_LOAD_ADDRESS,
memtopAddress = 0xffffu
)
}