mirror of
https://github.com/KarolS/millfork.git
synced 2024-05-31 18:41:30 +00:00
Don't apply Constant index offset propagation in decimal mode
This commit is contained in:
parent
ef2f5b5918
commit
9866c974ad
|
@ -15,7 +15,7 @@ object DangerousOptimizations {
|
|||
// TODO: try to guess when overflow can happen
|
||||
needsFlowInfo = FlowInfoRequirement.BothFlows,
|
||||
(Elidable & HasOpcode(CLC)).? ~
|
||||
(Elidable & HasClear(State.C) & HasOpcode(ADC) & MatchImmediate(0) & DoesntMatterWhatItDoesWith(State.V, State.C)) ~
|
||||
(Elidable & HasClear(State.C) & HasClear(State.D) & HasOpcode(ADC) & MatchImmediate(0) & DoesntMatterWhatItDoesWith(State.V, State.C)) ~
|
||||
(
|
||||
(HasOpcode(TAY) & DoesntMatterWhatItDoesWith(State.N, State.Z, State.A)) ~
|
||||
(Linear & Not(ConcernsY)).*
|
||||
|
@ -25,7 +25,7 @@ object DangerousOptimizations {
|
|||
ctx.get[List[AssemblyLine]](1) :+ last.copy(parameter = last.parameter.+(ctx.get[Constant](0)).quickSimplify)
|
||||
},
|
||||
(Elidable & HasOpcode(CLC)).? ~
|
||||
(Elidable & HasClear(State.C) & HasOpcode(ADC) & MatchImmediate(0) & DoesntMatterWhatItDoesWith(State.V, State.C)) ~
|
||||
(Elidable & HasClear(State.C) & HasClear(State.D) & HasOpcode(ADC) & MatchImmediate(0) & DoesntMatterWhatItDoesWith(State.V, State.C)) ~
|
||||
(
|
||||
(HasOpcode(TAX) & DoesntMatterWhatItDoesWith(State.N, State.Z, State.A)) ~
|
||||
(Linear & Not(ConcernsX)).*
|
||||
|
|
Loading…
Reference in New Issue
Block a user