1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-24 15:29:23 +00:00

Fix putword optimization

This commit is contained in:
Karol Stasiak 2019-06-25 18:19:57 +02:00
parent e9e52d11a7
commit 260cfd50c4

View File

@ -53,6 +53,9 @@ object LocalVariableReadOptimization extends AssemblyOptimization[AssemblyLine]
def optimizeImpl(code: List[(AssemblyLine, CpuStatus)], variables: Set[String], map: Map[String, Int]): (Boolean, List[AssemblyLine]) = code match {
case (x@AssemblyLine0(JSR, Absolute, MemoryAddressConstant(th)), _) :: xs if th.name.startsWith(".") =>
x :: optimizeImpl(xs, variables, Map())
case (AssemblyLine(op@(
LDA | LDX | LDY | LDZ |
ADC | ORA | EOR | AND | SBC |