also output inline asm chunks

This commit is contained in:
Irmen de Jong
2022-09-08 22:59:13 +02:00
parent 0744c9fa29
commit 6886b61186
8 changed files with 45 additions and 28 deletions

View File

@@ -49,7 +49,7 @@ class AssemblyProgram(override val name: String, private val allocations: Variab
is VmCodeLabel -> write("_" + line.name.joinToString(".") + ":\n")
is VmCodeInlineAsm -> {
val asm = line.assembly.replace("""\{[a-zA-Z\d_\.]+\}""".toRegex()) { matchResult ->
// "{ X }" -> address of X
// "{ X }" -> address of X // TODO USE &X instead for address of X????
val name = matchResult.value.substring(1, matchResult.value.length-1).split('.')
allocations.get(name).toString() }
write(asm+"\n")