diff --git a/src/main/java/dk/camelot64/kickc/KickC.java b/src/main/java/dk/camelot64/kickc/KickC.java index 5202df9de..53528d19e 100644 --- a/src/main/java/dk/camelot64/kickc/KickC.java +++ b/src/main/java/dk/camelot64/kickc/KickC.java @@ -96,9 +96,6 @@ public class KickC implements Callable { @CommandLine.Option(names = {"-Ocoalesce"}, description = "Optimization Option. Enables zero-page coalesce pass which limits zero-page usage significantly, but takes a lot of compile time.") private boolean optimizeZeroPageCoalesce = false; - @CommandLine.Option(names = {"-Ofastcoalesce"}, description = "Optimization Option. Enables zero-page only coalesce, which reduces compile time significantly, but with less coalesce optimimzation.") - private boolean optimizeFastCoalesce = false; - @CommandLine.Option(names = {"-Onocoalesce"}, description = "Optimization Option. Disables coalesce completely, which reduces compile time significantly.") private boolean optimizeNoCoalesce = false; diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4MemoryCoalesce.java b/src/main/java/dk/camelot64/kickc/passes/Pass4MemoryCoalesce.java index 7e26193d8..03c531702 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4MemoryCoalesce.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4MemoryCoalesce.java @@ -156,7 +156,8 @@ public abstract class Pass4MemoryCoalesce extends Pass2Base { // Check the both registers are in memory if(!register1.isMem() || !register2.isMem()) return false; - if(register1.getType() == Registers.RegisterType.MAIN_MEM) + // Check the both registers have the same type + if(!register1.getType().equals(register2.getType())) return false; // Check the both registers have the same size if(register1.getBytes() != register2.getBytes())