This commit is contained in:
Irmen de Jong
2022-08-04 18:28:33 +02:00
parent 34aa917ca4
commit 00b717cde8
15 changed files with 35 additions and 31 deletions
@@ -45,7 +45,7 @@ internal class BuiltinFuncGen(private val codeGen: CodeGen, private val exprGen:
"ror" -> funcRolRor(Opcode.ROXR, call, resultRegister)
"rol2" -> funcRolRor(Opcode.ROL, call, resultRegister)
"ror2" -> funcRolRor(Opcode.ROR, call, resultRegister)
else -> TODO("builtinfunc ${call.name}")
else -> throw AssemblyError("missing builtinfunc for ${call.name}")
}
}
@@ -279,7 +279,7 @@ class CodeGen(internal val program: PtProgram,
code += addConstMem(loopvarDt, loopvarAddress.toUInt(), step)
code += VmCodeInstruction(Opcode.LOADM, loopvarDt, reg1 = indexReg, value = loopvarAddress)
} else {
// TODO WHY THID DISTINCTION?
// TODO WHY THIS DISTINCTION?
code += VmCodeInstruction(Opcode.LOADM, loopvarDt, reg1 = indexReg, value = loopvarAddress)
code += addConstReg(loopvarDt, indexReg, step)
code += VmCodeInstruction(Opcode.STOREM, loopvarDt, reg1 = indexReg, value = loopvarAddress)