mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-10 20:29:35 +00:00
6502: More optimizations
This commit is contained in:
parent
a25f6ca3f6
commit
b873030b29
@ -667,21 +667,37 @@ object AlwaysGoodOptimizations {
|
||||
(Elidable & HasOpcode(TAY) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAY), AssemblyLine.implied(INY))
|
||||
},
|
||||
(Elidable & HasOpcode(ADC) & HasImmediate(1) & HasClear(State.D) & HasClear(State.C)) ~
|
||||
(Elidable & HasOpcode(TAY) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAY), AssemblyLine.implied(INY))
|
||||
},
|
||||
(Elidable & HasOpcode(SEC) & HasClear(State.D)) ~
|
||||
(Elidable & HasOpcode(SBC) & HasImmediate(1)) ~
|
||||
(Elidable & HasOpcode(TAY) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAY), AssemblyLine.implied(DEY))
|
||||
},
|
||||
(Elidable & HasOpcode(SBC) & HasImmediate(1) & HasClear(State.D) & HasSet(State.C)) ~
|
||||
(Elidable & HasOpcode(TAY) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAY), AssemblyLine.implied(DEY))
|
||||
},
|
||||
(Elidable & HasOpcode(CLC) & HasClear(State.D)) ~
|
||||
(Elidable & HasOpcode(ADC) & HasImmediate(1)) ~
|
||||
(Elidable & HasOpcode(TAX) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAX), AssemblyLine.implied(INX))
|
||||
},
|
||||
(Elidable & HasOpcode(ADC) & HasImmediate(1) & HasClear(State.D) & HasClear(State.C)) ~
|
||||
(Elidable & HasOpcode(TAX) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAX), AssemblyLine.implied(INX))
|
||||
},
|
||||
(Elidable & HasOpcode(SEC) & HasClear(State.D)) ~
|
||||
(Elidable & HasOpcode(SBC) & HasImmediate(1)) ~
|
||||
(Elidable & HasOpcode(TAX) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAX), AssemblyLine.implied(DEX))
|
||||
},
|
||||
(Elidable & HasOpcode(SBC) & HasImmediate(1) & HasClear(State.D) & HasSet(State.C)) ~
|
||||
(Elidable & HasOpcode(TAX) & DoesntMatterWhatItDoesWith(State.A, State.C, State.V)) ~~> { code =>
|
||||
List(AssemblyLine.implied(TAX), AssemblyLine.implied(DEX))
|
||||
},
|
||||
(Elidable & HasOpcode(TXA)) ~
|
||||
(Elidable & HasOpcode(CLC) & HasClear(State.D)) ~
|
||||
(Elidable & HasOpcode(ADC) & HasImmediate(1)) ~
|
||||
|
Loading…
x
Reference in New Issue
Block a user