vm: fix comparisons codegen

This commit is contained in:
Irmen de Jong 2022-05-02 21:32:45 +02:00
parent 86cc2f1075
commit 30c2e3e8ff
4 changed files with 2 additions and 7 deletions

View File

@ -283,8 +283,8 @@ internal class ExpressionGen(private val codeGen: CodeGen) {
"^", "xor" -> operatorXor(binExpr, vmDt, resultRegister)
"<<" -> operatorShiftLeft(binExpr, vmDt, resultRegister)
">>" -> operatorShiftRight(binExpr, vmDt, resultRegister, signed)
"==" -> operatorEquals(binExpr, vmDt, resultRegister, true)
"!=" -> operatorEquals(binExpr, vmDt, resultRegister, false)
"==" -> operatorEquals(binExpr, vmDt, resultRegister, false)
"!=" -> operatorEquals(binExpr, vmDt, resultRegister, true)
"<" -> operatorLessThan(binExpr, vmDt, resultRegister, signed, false)
">" -> operatorGreaterThan(binExpr, vmDt, resultRegister, signed, false)
"<=" -> operatorLessThan(binExpr, vmDt, resultRegister, signed, true)

View File

@ -219,7 +219,6 @@ sub str2word(str string) -> word {
sub hex2uword(str string) -> uword {
; -- hexadecimal string (with or without '$') to uword.
; stops parsing at the first character that's not a hex digit (except leading $)
; TODO fix this result
uword result
ubyte char
if @(string)=='$'
@ -240,7 +239,6 @@ sub hex2uword(str string) -> uword {
sub bin2uword(str string) -> uword {
; -- binary string (with or without '%') to uword.
; stops parsing at the first character that's not a 0 or 1. (except leading %)
; TODO fix this result
uword result
ubyte char
if @(string)=='%'

View File

@ -3,8 +3,6 @@ TODO
For next release
^^^^^^^^^^^^^^^^
- vm: fix if @(string)=='$' string++ not working on ea31
- vm: fix conv hex2uword and bin2uword
- vm: implement float div, minus, plus
- vm: implement float type casts to integer types
- vm: implement float any, all, reverse, sort

View File

@ -8,7 +8,6 @@
main {
sub start() {
ubyte ub = conv.str2ubyte("234")
txt.print_ub(ub)
txt.nl()