mirror of
https://github.com/irmen/prog8.git
synced 2024-10-25 00:24:16 +00:00
make sure memory slabs block is at the bottom of the asm file to not allocate needless space in the resulting prg
This commit is contained in:
parent
a0deb463c9
commit
310219e5d7
@ -44,6 +44,15 @@ internal class ProgramAndVarsGen(
|
|||||||
|
|
||||||
if(errors.noErrors()) {
|
if(errors.noErrors()) {
|
||||||
program.allBlocks.forEach { block2asm(it) }
|
program.allBlocks.forEach { block2asm(it) }
|
||||||
|
|
||||||
|
// the global list of all floating point constants for the whole program
|
||||||
|
asmgen.out("; global float constants")
|
||||||
|
for (flt in allocator.globalFloatConsts) {
|
||||||
|
val floatFill = compTarget.machine.getFloat(flt.key).makeFloatFillAsm()
|
||||||
|
val floatvalue = flt.key
|
||||||
|
asmgen.out("${flt.value}\t.byte $floatFill ; float $floatvalue")
|
||||||
|
}
|
||||||
|
|
||||||
memorySlabs()
|
memorySlabs()
|
||||||
footer()
|
footer()
|
||||||
}
|
}
|
||||||
@ -170,14 +179,6 @@ internal class ProgramAndVarsGen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun footer() {
|
private fun footer() {
|
||||||
// the global list of all floating point constants for the whole program
|
|
||||||
asmgen.out("; global float constants")
|
|
||||||
for (flt in allocator.globalFloatConsts) {
|
|
||||||
val floatFill = compTarget.machine.getFloat(flt.key).makeFloatFillAsm()
|
|
||||||
val floatvalue = flt.key
|
|
||||||
asmgen.out("${flt.value}\t.byte $floatFill ; float $floatvalue")
|
|
||||||
}
|
|
||||||
|
|
||||||
// program end
|
// program end
|
||||||
asmgen.out("prog8_program_end\t; end of program label for progend()")
|
asmgen.out("prog8_program_end\t; end of program label for progend()")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user