mirror of
https://github.com/irmen/prog8.git
synced 2026-04-19 20:16:51 +00:00
working on vm
This commit is contained in:
@@ -226,15 +226,13 @@ internal class ExpressionGen(val codeGen: CodeGen) {
|
||||
code += VmCodeInstruction(Instruction(Opcode.XOR, vmDt, reg1=resultRegister, reg2=leftResultReg, reg3=rightResultReg))
|
||||
}
|
||||
"<<" -> {
|
||||
// TODO check if shift amount works
|
||||
code += VmCodeInstruction(Instruction(Opcode.LSL, vmDt, reg1=resultRegister, reg2=leftResultReg, reg3=rightResultReg))
|
||||
}
|
||||
">>" -> {
|
||||
// TODO check if shift amount works
|
||||
code += VmCodeInstruction(Instruction(Opcode.LSR, vmDt, reg1=resultRegister, reg2=leftResultReg, reg3=rightResultReg))
|
||||
}
|
||||
"**" -> throw AssemblyError("** operator requires floating point ${binExpr.position}")
|
||||
// TODO the other operators: "<<", ">>", "==", "!=", "<", ">", "<=", ">="
|
||||
// TODO the other operators: "==", "!=", "<", ">", "<=", ">="
|
||||
else -> TODO("operator ${binExpr.operator}")
|
||||
}
|
||||
return code
|
||||
|
||||
Reference in New Issue
Block a user