From 1b0b81baf2074ac869a4c304fa8f59ba037b35fc Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Tue, 18 Jul 2017 18:12:11 +0200 Subject: [PATCH] Restructured code in new packages --- src/dk/camelot64/kickc/CompileLog.java | 2 +- src/dk/camelot64/kickc/passes/Pass3RegisterAllocation.java | 5 ++--- src/dk/camelot64/kickc/test/TestCompilationOutput.java | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dk/camelot64/kickc/CompileLog.java b/src/dk/camelot64/kickc/CompileLog.java index 770a7f37e..02a112573 100644 --- a/src/dk/camelot64/kickc/CompileLog.java +++ b/src/dk/camelot64/kickc/CompileLog.java @@ -12,7 +12,7 @@ public class CompileLog { public void append(String msg) { log.append(msg); log.append("\n"); - System.out.printf(msg+"\n"); + //System.out.printf(msg+"\n"); } public StringBuilder getLog() { diff --git a/src/dk/camelot64/kickc/passes/Pass3RegisterAllocation.java b/src/dk/camelot64/kickc/passes/Pass3RegisterAllocation.java index 4ee303d02..b9b7481db 100644 --- a/src/dk/camelot64/kickc/passes/Pass3RegisterAllocation.java +++ b/src/dk/camelot64/kickc/passes/Pass3RegisterAllocation.java @@ -70,12 +70,13 @@ public class Pass3RegisterAllocation { //allocation.allocate(symbols.getVariable("a#0"), new RegisterAllocation.RegisterAByte()); // Register allocation for fibmem.kc + /* allocation.allocate(symbols.getVariable("i#1"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("i#2"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("$1"), new RegisterAllocation.RegisterAByte()); allocation.allocate(symbols.getVariable("$3"), new RegisterAllocation.RegisterALUByte()); //allocation.allocate(symbols.getVariable("$4"), new RegisterAllocation.RegisterAByte()); - + */ // Registers for postinc.kc /* @@ -96,7 +97,6 @@ public class Pass3RegisterAllocation { */ // Optimal Registers for flipper-rex2.kc - /* allocation.allocate(symbols.getVariable("plot::i#0"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("plot::i#1"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("plot::i#2"), RegisterAllocation.getRegisterX()); @@ -152,7 +152,6 @@ public class Pass3RegisterAllocation { allocation.allocate(symbols.getVariable("main::c#2"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("main::c#3"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("main::c#4"), RegisterAllocation.getRegisterX()); - */ symbols.setAllocation(allocation); diff --git a/src/dk/camelot64/kickc/test/TestCompilationOutput.java b/src/dk/camelot64/kickc/test/TestCompilationOutput.java index c016d570a..c17649dcc 100644 --- a/src/dk/camelot64/kickc/test/TestCompilationOutput.java +++ b/src/dk/camelot64/kickc/test/TestCompilationOutput.java @@ -30,9 +30,9 @@ public class TestCompilationOutput { public static void main(String[] args) throws IOException, URISyntaxException { TestCompilationOutput tester = new TestCompilationOutput(); - tester.testFile("fibmem"); - //tester.testFile("flipper-rex2"); - //tester.testFile("bresenham"); + //tester.testFile("fibmem"); + tester.testFile("flipper-rex2"); + tester.testFile("bresenham"); //tester.testFile("unused"); }