1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-01-11 12:29:46 +00:00

8080: Add one minor optimization

This commit is contained in:
Karol Stasiak 2019-11-12 13:50:12 +01:00
parent adc2969b73
commit 113befeb36

View File

@ -320,6 +320,10 @@ object AlwaysGoodI80Optimizations {
(Elidable & HasOpcode(LD) & MatchSourceRegisterAndOffset(2) & MatchTargetRealRegister(3) & DoesntMatterWhatItDoesWithMatchedRegisterOffset(2)) ~~> {(code, ctx) =>
List(code.head.copy(registers = TwoRegisters(ctx.get[ZRegister.Value](3), IMM_8)))
},
//69
(HasOpcode(LD) & MatchSourceRealRegister(2) & MatchTargetRealRegister(3)) ~
(Elidable & HasOpcode(LD) & MatchSourceRealRegister(3) & MatchTargetRealRegister(2)) ~~> (_.init),
)
val PointlessStackStashing = new RuleBasedAssemblyOptimization("Pointless stack stashing",