mirror of
https://github.com/irmen/prog8.git
synced 2024-09-08 10:55:08 +00:00
todos
This commit is contained in:
parent
fefd9b52a8
commit
7e0f7ba438
@ -179,8 +179,8 @@ private fun optimizeSameAssignments(linesByFourteen: List<List<IndexedValue<Stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun optimizeStoreLoadSame(linesByFour: List<List<IndexedValue<String>>>): List<Modification> {
|
private fun optimizeStoreLoadSame(linesByFour: List<List<IndexedValue<String>>>): List<Modification> {
|
||||||
// TODO not sure if this is correct in all situations....:
|
|
||||||
// sta X + lda X, sty X + ldy X, stx X + ldx X -> the second instruction can be eliminated
|
// sta X + lda X, sty X + ldy X, stx X + ldx X -> the second instruction can be eliminated
|
||||||
|
// TODO this is not true if X is not a regular RAM memory address (but instead mapped I/O or ROM)
|
||||||
val mods = mutableListOf<Modification>()
|
val mods = mutableListOf<Modification>()
|
||||||
for (pair in linesByFour) {
|
for (pair in linesByFour) {
|
||||||
val first = pair[0].value.trimStart()
|
val first = pair[0].value.trimStart()
|
||||||
|
@ -142,6 +142,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
DataType.WORD -> translateWordLess(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
DataType.WORD -> translateWordLess(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
||||||
DataType.FLOAT -> {
|
DataType.FLOAT -> {
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e1): '<' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.less_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.less_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -158,6 +160,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
DataType.WORD -> translateWordLessOrEqual(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
DataType.WORD -> translateWordLessOrEqual(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
||||||
DataType.FLOAT -> {
|
DataType.FLOAT -> {
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e1): '<=' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.lesseq_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.lesseq_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -174,6 +178,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
DataType.WORD -> translateWordGreater(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
DataType.WORD -> translateWordGreater(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
||||||
DataType.FLOAT -> {
|
DataType.FLOAT -> {
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e1): '>' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.greater_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.greater_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -190,6 +196,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
DataType.WORD -> translateWordGreaterOrEqual(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
DataType.WORD -> translateWordGreaterOrEqual(left, right, leftConstVal,rightConstVal, jumpIfFalseLabel)
|
||||||
DataType.FLOAT -> {
|
DataType.FLOAT -> {
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e1): '>=' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.greatereq_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.greatereq_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -231,7 +239,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e2): '<' at ${left.position}") // TODO ubyte <
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.less_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.less_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -261,7 +271,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e3): '<' at ${left.position}") // TODO byte <
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.less_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.less_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -294,6 +306,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e4): '<' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.less_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.less_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -325,6 +339,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e5): '<' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.less_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.less_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -360,7 +376,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e6): '>' at ${left.position}") // TODO ubyte >
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greater_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greater_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -391,7 +409,10 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// todo via func args or regs
|
|
||||||
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e7): '>' at ${left.position}") // TODO byte >
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greater_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greater_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -428,6 +449,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e8): '>' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greater_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greater_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -465,6 +488,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e9): '>' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greater_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greater_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -507,7 +532,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e10): '<=' at ${left.position}") // TODO ubyte <=
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.lesseq_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.lesseq_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -541,7 +568,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e11): '<=' at ${left.position}") // TODO byte <=
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.lesseq_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.lesseq_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -577,6 +606,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e12): '<=' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.lesseq_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.lesseq_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -614,6 +645,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e13): '<=' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.lesseq_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.lesseq_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -644,7 +677,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e14): '>=' at ${left.position}") // TODO ubyte >=
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greatereq_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greatereq_ub | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -677,7 +712,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e15): '>=' at ${left.position}") // TODO byte >=
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greatereq_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greatereq_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -708,6 +745,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e16): '>=' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greatereq_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greatereq_uw | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -740,6 +779,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e17): '>=' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.greatereq_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.greatereq_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -771,7 +812,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e18): '==' at ${left.position}") // TODO byte ==
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.equal_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.equal_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -803,7 +846,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs, or rather inline for bytes?
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e19): '!=' at ${left.position}") // TODO byte !=
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.notequal_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.notequal_b | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -838,6 +883,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e20): '==' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.equal_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.equal_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -874,6 +921,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args or regs
|
// todo via func args or regs
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e21): '!=' at ${left.position}") // TODO
|
||||||
asmgen.translateExpression(left)
|
asmgen.translateExpression(left)
|
||||||
asmgen.translateExpression(right)
|
asmgen.translateExpression(right)
|
||||||
asmgen.out(" jsr prog8_lib.notequal_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr prog8_lib.notequal_w | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -920,6 +969,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e22): '==' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.equal_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.equal_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
@ -967,6 +1018,8 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo via func args
|
// todo via func args
|
||||||
|
if(asmgen.options.slowCodegenWarnings)
|
||||||
|
println("warning: slow stack evaluation used (e23): '!=' at ${left.position}") // TODO
|
||||||
translateExpression(left)
|
translateExpression(left)
|
||||||
translateExpression(right)
|
translateExpression(right)
|
||||||
asmgen.out(" jsr floats.notequal_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
asmgen.out(" jsr floats.notequal_f | inx | lda P8ESTACK_LO,x | beq $jumpIfFalseLabel")
|
||||||
|
@ -3,6 +3,7 @@ TODO
|
|||||||
====
|
====
|
||||||
|
|
||||||
- check cpu stack consistency in all examples
|
- check cpu stack consistency in all examples
|
||||||
|
- convert balls.bas/balls.mfk to prog8 example
|
||||||
- reduce the amount of translateExpression() calls when the result can be directly assigned to register or variable
|
- reduce the amount of translateExpression() calls when the result can be directly assigned to register or variable
|
||||||
- make it possible to use cpu opcodes such as 'nop' as variable names by prefixing all asm vars with something such as '_'
|
- make it possible to use cpu opcodes such as 'nop' as variable names by prefixing all asm vars with something such as '_'
|
||||||
- option to load the built-in library files from a directory instead of the embedded ones (for easier library development/debugging)
|
- option to load the built-in library files from a directory instead of the embedded ones (for easier library development/debugging)
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
%option no_sysinit
|
%option no_sysinit
|
||||||
|
|
||||||
; Create a custom character set on the C64.
|
; Create a custom character set on the C64.
|
||||||
|
; TODO why is this one significantly larger than with older compiler?
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user