mirror of
https://github.com/KarolS/millfork.git
synced 2025-04-13 05:39:54 +00:00
#98: Warning about a missing call to init_rw_memory
This commit is contained in:
parent
919f11af2e
commit
958c1c09e7
@ -594,6 +594,9 @@ abstract class AbstractAssembler[T <: AbstractCode](private val program: Program
|
||||
val db = mem.banks("default")
|
||||
val ib = mem.banks(ivBank)
|
||||
val size = rwDataEnd - rwDataStart
|
||||
if (size > 0 && !labelMap.contains("init_rw_memory")) {
|
||||
log.warn("The program contains initialized variables, but it never calls init_rw_memory().")
|
||||
}
|
||||
if (size < 0) log.fatal("Negative writable memory size. It's a compiler bug.")
|
||||
val ivAddr = codeAllocators(ivBank).allocateBytes(ib, options, size, initialized = true, writeable = false, AllocationLocation.High, NoAlignment)
|
||||
unimportantLabelMap += "__rwdata_init_start" -> (ib.index -> ivAddr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user