mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
fix typo in comparison function and in pointer optimization
This commit is contained in:
parent
20dbdb20d2
commit
e4764cd8a6
@ -979,7 +979,7 @@ $repeatLabel lda $counterVar
|
||||
internal fun pointerViaIndexRegisterPossible(pointerOffsetExpr: PtExpression): Pair<PtExpression, PtExpression>? {
|
||||
if(pointerOffsetExpr is PtBinaryExpression && pointerOffsetExpr.operator=="+") {
|
||||
val leftDt = pointerOffsetExpr.left.type
|
||||
val rightDt = pointerOffsetExpr.left.type
|
||||
val rightDt = pointerOffsetExpr.right.type
|
||||
if(leftDt == DataType.UWORD && rightDt == DataType.UBYTE)
|
||||
return Pair(pointerOffsetExpr.left, pointerOffsetExpr.right)
|
||||
if(leftDt == DataType.UBYTE && rightDt == DataType.UWORD)
|
||||
|
@ -657,7 +657,7 @@ internal class ExpressionsAsmGen(private val program: PtProgram,
|
||||
"<=" -> {
|
||||
when(dt) {
|
||||
DataType.UBYTE -> asmgen.out(" jsr prog8_lib.equalzero_b")
|
||||
DataType.BYTE -> asmgen.out(" jsr prog8_lib.lessequalzeros_b")
|
||||
DataType.BYTE -> asmgen.out(" jsr prog8_lib.lessequalzero_sb")
|
||||
DataType.UWORD -> asmgen.out(" jsr prog8_lib.equalzero_w")
|
||||
DataType.WORD -> asmgen.out(" jsr prog8_lib.lessequalzero_sw")
|
||||
DataType.FLOAT -> asmgen.out(" jsr floats.lessequal_zero")
|
||||
|
Loading…
Reference in New Issue
Block a user