mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-27 11:30:19 +00:00
6502: Fix the optimization of inlining a variable to the accumulator
This commit is contained in:
parent
c4c1bf00f2
commit
07c049c168
@ -44,6 +44,7 @@ object VariableToRegisterOptimization extends AssemblyOptimization[AssemblyLine]
|
|||||||
PHX, PLX,
|
PHX, PLX,
|
||||||
SBX, SAX, LXA, XAA, AHX, SHX, SHY, LAS, TAS,
|
SBX, SAX, LXA, XAA, AHX, SHX, SHY, LAS, TAS,
|
||||||
HuSAX, SXY, TXY, TXY,
|
HuSAX, SXY, TXY, TXY,
|
||||||
|
BYTE,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val opcodesThatAlwaysPrecludeYAllocation = Set(
|
private val opcodesThatAlwaysPrecludeYAllocation = Set(
|
||||||
@ -52,11 +53,13 @@ object VariableToRegisterOptimization extends AssemblyOptimization[AssemblyLine]
|
|||||||
PHY, PLY,
|
PHY, PLY,
|
||||||
AHX, SHX, SHY, LAS, TAS,
|
AHX, SHX, SHY, LAS, TAS,
|
||||||
SAY, SXY, TXY, TYX,
|
SAY, SXY, TXY, TYX,
|
||||||
|
BYTE,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val opcodesThatAlwaysPrecludeZAllocation = Set(
|
private val opcodesThatAlwaysPrecludeZAllocation = Set(
|
||||||
JSR, STZ, TZA, INZ, DEZ, CPZ,
|
JSR, STZ, TZA, INZ, DEZ, CPZ,
|
||||||
PHZ, PLZ,
|
PHZ, PLZ,
|
||||||
|
BYTE,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val opcodesThatAlwaysPrecludeAAllocation = Set(
|
private val opcodesThatAlwaysPrecludeAAllocation = Set(
|
||||||
@ -68,6 +71,7 @@ object VariableToRegisterOptimization extends AssemblyOptimization[AssemblyLine]
|
|||||||
AHX, SHX, SHY, LAS, TAS,
|
AHX, SHX, SHY, LAS, TAS,
|
||||||
HuSAX, SAY,
|
HuSAX, SAY,
|
||||||
TCD, TDC, TSC, TCS, XBA,
|
TCD, TDC, TSC, TCS, XBA,
|
||||||
|
LABEL, BYTE,
|
||||||
)
|
)
|
||||||
|
|
||||||
// If any of these opcodes is used on a variable
|
// If any of these opcodes is used on a variable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user