1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-10-30 21:30:52 +00:00

Small optimization fix

This commit is contained in:
Karol Stasiak 2018-02-28 01:09:22 +01:00
parent 608958c1ed
commit 828cef58dd

View File

@ -41,7 +41,7 @@ object AlwaysGoodOptimizations {
needsFlowInfo = FlowInfoRequirement.BothFlows, needsFlowInfo = FlowInfoRequirement.BothFlows,
(Elidable & MatchA(0) & (Elidable & MatchA(0) &
HasOpcode(ASL) & HasAddrMode(Implied) & DoesntMatterWhatItDoesWith(State.C)) ~~> { (code, ctx) => HasOpcode(ASL) & HasAddrMode(Implied) & DoesntMatterWhatItDoesWith(State.C)) ~~> { (code, ctx) =>
AssemblyLine.immediate(LDA, ctx.get[Int](0) << 1) :: Nil AssemblyLine.immediate(LDA, (ctx.get[Int](0) << 1) & 0xff) :: Nil
}, },
(Elidable & MatchA(0) & (Elidable & MatchA(0) &
HasOpcode(LSR) & HasAddrMode(Implied) & DoesntMatterWhatItDoesWith(State.C)) ~~> { (code, ctx) => HasOpcode(LSR) & HasAddrMode(Implied) & DoesntMatterWhatItDoesWith(State.C)) ~~> { (code, ctx) =>