From 9da2aca338e9f04d39a3049c63baf39d7d460925 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 27 Dec 2021 08:32:21 +0100 Subject: [PATCH] Removed more ALU subsystem. --- .../camelot64/kickc/fragment/AsmFragmentInstance.java | 11 ----------- .../kickc/passes/Pass4RegisterUpliftCombinations.java | 10 ---------- .../Pass4RegisterUpliftPotentialRegisterAnalysis.java | 10 ---------- 3 files changed, 31 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java index aded9a275..c08125473 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java @@ -452,15 +452,4 @@ public class AsmFragmentInstance { } } - public static class AluNotApplicableException extends RuntimeException { - - public AluNotApplicableException() { - super("ALU register not appicable."); - } - - public AluNotApplicableException(String message) { - super(message); - } - } - } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftCombinations.java b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftCombinations.java index 90b814c86..c21f31d76 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftCombinations.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftCombinations.java @@ -2,7 +2,6 @@ package dk.camelot64.kickc.passes; import dk.camelot64.kickc.asm.AsmChunk; import dk.camelot64.kickc.asm.AsmProgram; -import dk.camelot64.kickc.fragment.AsmFragmentInstance; import dk.camelot64.kickc.fragment.AsmFragmentTemplateSynthesizer; import dk.camelot64.kickc.model.*; import dk.camelot64.kickc.model.statements.Statement; @@ -121,15 +120,6 @@ public class Pass4RegisterUpliftCombinations extends Pass2Base { program.getLog().append(msg.toString()); } return false; - } catch(AsmFragmentInstance.AluNotApplicableException e) { - if(program.getLog().isVerboseUplift()) { - StringBuilder msg = new StringBuilder(); - msg.append("Uplift attempt [" + (scope == null ? "" : scope) + "] "); - msg.append("alu not applicable"); - msg.append(" allocation: ").append(combination.toString()); - program.getLog().append(msg.toString()); - } - return false; } boolean hasClobberProblem = new Pass4AssertNoCpuClobber(program).hasClobberProblem(false); if(hasClobberProblem) { diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialRegisterAnalysis.java b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialRegisterAnalysis.java index 0133c0bf4..12f7f5c16 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialRegisterAnalysis.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass4RegisterUpliftPotentialRegisterAnalysis.java @@ -2,7 +2,6 @@ package dk.camelot64.kickc.passes; import dk.camelot64.cpufamily6502.CpuClobber; import dk.camelot64.kickc.asm.AsmProgram; -import dk.camelot64.kickc.fragment.AsmFragmentInstance; import dk.camelot64.kickc.fragment.AsmFragmentTemplateSynthesizer; import dk.camelot64.kickc.model.*; import dk.camelot64.kickc.model.statements.Statement; @@ -176,15 +175,6 @@ public class Pass4RegisterUpliftPotentialRegisterAnalysis extends Pass2Base { msg.append(" allocation: ").append(combination.toString()); getLog().append(msg.toString()); continue; - } catch(AsmFragmentInstance.AluNotApplicableException e) { - if(getProgram().getLog().isVerboseUplift()) { - StringBuilder msg = new StringBuilder(); - msg.append("Potential register analysis "); - msg.append("alu not applicable"); - msg.append(" allocation: ").append(combination.toString()); - getProgram().getLog().append(msg.toString()); - } - continue; } CpuClobber clobber = asm.getClobber(); Collection clobberRegisters = Pass4AssertNoCpuClobber.getClobberRegisters(clobber);