mirror of
https://github.com/irmen/prog8.git
synced 2025-02-27 03:29:22 +00:00
fix
This commit is contained in:
parent
c35a183a64
commit
d494f9d66b
@ -1020,7 +1020,7 @@ class IRCodeGen(
|
||||
val number = (condition.right as? PtNumber)?.number?.toInt()
|
||||
if(number!=null) {
|
||||
val firstReg = leftTr.resultReg
|
||||
val opcode = when (condition.operator) {
|
||||
opcode = when (condition.operator) {
|
||||
"==" -> Opcode.BEQ
|
||||
"!=" -> Opcode.BNE
|
||||
"<" -> if(signed) Opcode.BLTS else Opcode.BLT
|
||||
@ -1231,7 +1231,7 @@ class IRCodeGen(
|
||||
addToResult(result, leftTr, leftTr.resultReg, -1)
|
||||
val number = (condition.right as? PtNumber)?.number?.toInt()
|
||||
if (number!=null) {
|
||||
val elseBranchOpcode = when (condition.operator) {
|
||||
elseBranchOpcode = when (condition.operator) {
|
||||
"==" -> Opcode.BNE
|
||||
"!=" -> Opcode.BEQ
|
||||
"<" -> if(signed) Opcode.BGES else Opcode.BGE
|
||||
|
Loading…
x
Reference in New Issue
Block a user