mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +00:00
fix bad optimization of floats.pop/push call
This commit is contained in:
parent
2a52241f1c
commit
272a1001a8
@ -519,9 +519,11 @@ private fun optimizeJsrRtsAndOtherCombinations(linesByFour: Sequence<List<Indexe
|
|||||||
|
|
||||||
if(!haslabel(second)) {
|
if(!haslabel(second)) {
|
||||||
if ((" jsr" in first || "\tjsr" in first ) && (" rts" in second || "\trts" in second)) {
|
if ((" jsr" in first || "\tjsr" in first ) && (" rts" in second || "\trts" in second)) {
|
||||||
|
if("floats.pushFAC" !in first && "floats.popFAC" !in first) { // these 2 routines depend on being called with JSR!!
|
||||||
mods += Modification(lines[0].index, false, lines[0].value.replace("jsr", "jmp"))
|
mods += Modification(lines[0].index, false, lines[0].value.replace("jsr", "jmp"))
|
||||||
mods += Modification(lines[1].index, true, null)
|
mods += Modification(lines[1].index, true, null)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (" rts" in first || "\trts" in first) {
|
else if (" rts" in first || "\trts" in first) {
|
||||||
if (" jmp" in second || "\tjmp" in second)
|
if (" jmp" in second || "\tjmp" in second)
|
||||||
mods += Modification(lines[1].index, true, null)
|
mods += Modification(lines[1].index, true, null)
|
||||||
|
Loading…
Reference in New Issue
Block a user