mirror of
https://github.com/KarolS/millfork.git
synced 2024-09-10 11:54:30 +00:00
Added ZeropagePseugoregister to default compilation flags
This commit is contained in:
parent
269a1fbdc5
commit
6fa82a5a58
@ -76,15 +76,27 @@ object Cpu extends Enumeration {
|
|||||||
|
|
||||||
import CompilationFlag._
|
import CompilationFlag._
|
||||||
|
|
||||||
|
private val alwaysDefaultFlags = Set(
|
||||||
|
VariableOverlap, CompactReturnDispatchParams, ZeropagePseudoregister
|
||||||
|
)
|
||||||
|
|
||||||
def defaultFlags(x: Cpu.Value): Set[CompilationFlag.Value] = x match {
|
def defaultFlags(x: Cpu.Value): Set[CompilationFlag.Value] = x match {
|
||||||
case StrictMos => Set(DecimalMode, PreventJmpIndirectBug, VariableOverlap, CompactReturnDispatchParams)
|
case StrictMos =>
|
||||||
case Mos => Set(DecimalMode, PreventJmpIndirectBug, VariableOverlap, CompactReturnDispatchParams)
|
alwaysDefaultFlags ++ Set(DecimalMode, PreventJmpIndirectBug)
|
||||||
case Ricoh => Set(PreventJmpIndirectBug, VariableOverlap, CompactReturnDispatchParams)
|
case Mos =>
|
||||||
case StrictRicoh => Set(PreventJmpIndirectBug, VariableOverlap, CompactReturnDispatchParams)
|
alwaysDefaultFlags ++ Set(DecimalMode, PreventJmpIndirectBug)
|
||||||
case Cmos => Set(DecimalMode, EmitCmosOpcodes, VariableOverlap, CompactReturnDispatchParams)
|
case Ricoh =>
|
||||||
case HuC6280 => Set(DecimalMode, EmitCmosOpcodes, EmitHudsonOpcodes, VariableOverlap, CompactReturnDispatchParams)
|
alwaysDefaultFlags ++ Set(PreventJmpIndirectBug)
|
||||||
case CE02 => Set(DecimalMode, EmitCmosOpcodes, Emit65CE02Opcodes, VariableOverlap, CompactReturnDispatchParams)
|
case StrictRicoh =>
|
||||||
case Sixteen => Set(DecimalMode, EmitCmosOpcodes, EmitEmulation65816Opcodes, EmitNative65816Opcodes, ReturnWordsViaAccumulator, VariableOverlap, CompactReturnDispatchParams)
|
alwaysDefaultFlags ++ Set(PreventJmpIndirectBug)
|
||||||
|
case Cmos =>
|
||||||
|
alwaysDefaultFlags ++ Set(DecimalMode, EmitCmosOpcodes)
|
||||||
|
case HuC6280 =>
|
||||||
|
alwaysDefaultFlags ++ Set(DecimalMode, EmitCmosOpcodes, EmitHudsonOpcodes)
|
||||||
|
case CE02 =>
|
||||||
|
alwaysDefaultFlags ++ Set(DecimalMode, EmitCmosOpcodes, Emit65CE02Opcodes)
|
||||||
|
case Sixteen =>
|
||||||
|
alwaysDefaultFlags ++ Set(DecimalMode, EmitCmosOpcodes, EmitEmulation65816Opcodes, EmitNative65816Opcodes, ReturnWordsViaAccumulator)
|
||||||
}
|
}
|
||||||
|
|
||||||
def fromString(name: String): Cpu.Value = name match {
|
def fromString(name: String): Cpu.Value = name match {
|
||||||
|
Loading…
Reference in New Issue
Block a user