diff options
| author | Cliff Click <cliffc@acm.org> | 2025-03-23 15:59:23 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-03-23 15:59:23 -0700 |
| commit | 8d6de0e10358fc197490cdacb10cbcedc18bb4f6 (patch) | |
| tree | 39d2c991a6b1ee4b0acbd94447b77c6cabe28fe7 /chapter21/src/test/java/com | |
| parent | 0afb4876e602faa75319bb1faf9adc7f6f7476c2 (diff) | |
| download | Simple-8d6de0e10358fc197490cdacb10cbcedc18bb4f6.tar.gz Simple-8d6de0e10358fc197490cdacb10cbcedc18bb4f6.zip | |
Coalesacing
Fix bug IFG adding interference to from 1 reg live range, even if success in clearing reg
Fix bug LRG merging when both masks have already been trimmed.
Missing ARM stack adjust
Diffstat (limited to 'chapter21/src/test/java/com')
3 files changed, 11 insertions, 11 deletions
diff --git a/chapter21/src/test/java/com/seaofnodes/simple/BrainFuckTest.java b/chapter21/src/test/java/com/seaofnodes/simple/BrainFuckTest.java index 28111697..eb88ecc1 100644 --- a/chapter21/src/test/java/com/seaofnodes/simple/BrainFuckTest.java +++ b/chapter21/src/test/java/com/seaofnodes/simple/BrainFuckTest.java @@ -65,7 +65,7 @@ return output; """; Chapter21Test.testCPU(src,"x86_64_v2", "SystemV",40,null); Chapter21Test.testCPU(src,"riscv" , "SystemV",30,null); - Chapter21Test.testCPU(src,"arm" , "SystemV",30,null); + Chapter21Test.testCPU(src,"arm" , "SystemV",26,null); //assertEquals("Hello World!\n", Eval2.eval(code, 0, 10000)); } } diff --git a/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java b/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java index 1a08d6ee..b83db0d1 100644 --- a/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java +++ b/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java @@ -40,8 +40,8 @@ public class Chapter20Test { @Test public void testAlloc0() { testCPU("return new u8[arg];","x86_64_v2", "SystemV",3,"return [u8];"); - testCPU("return new u8[arg];","riscv" , "SystemV",7,"return [u8];"); - testCPU("return new u8[arg];","arm" , "SystemV",7,"return [u8];"); + testCPU("return new u8[arg];","riscv" , "SystemV",5,"return [u8];"); + testCPU("return new u8[arg];","arm" , "SystemV",5,"return [u8];"); } @Test public void testBasic1() { @@ -66,9 +66,9 @@ val sqrt = { int x -> }; return sqrt(arg) + sqrt(arg+2); """; - testCPU(src,"x86_64_v2", "SystemV",26,null); + testCPU(src,"x86_64_v2", "SystemV",23,null); testCPU(src,"riscv" , "SystemV",19,null); - testCPU(src,"arm" , "SystemV",17,null); + testCPU(src,"arm" , "SystemV",19,null); } @Test @@ -85,7 +85,7 @@ return sqrt(arg) + sqrt(arg+2); String src = "int[] !xs = new int[3]; xs[arg]=1; return xs[arg&1];"; testCPU(src,"x86_64_v2", "SystemV",3,"return .[];"); testCPU(src,"riscv" , "SystemV",6,"return .[];"); - testCPU(src,"arm" , "SystemV",6,"return .[];"); + testCPU(src,"arm" , "SystemV",4,"return .[];"); } @@ -103,7 +103,7 @@ return sqrt(arg) + sqrt(arg+2); public void testString() throws IOException { String src = Files.readString(Path.of("src/test/java/com/seaofnodes/simple/progs/stringHash.smp")); testCPU(src,"x86_64_v2", "SystemV",18,null); - testCPU(src,"riscv" , "SystemV",17,null); + testCPU(src,"riscv" , "SystemV",20,null); testCPU(src,"arm" , "SystemV",16,null); } diff --git a/chapter21/src/test/java/com/seaofnodes/simple/Chapter21Test.java b/chapter21/src/test/java/com/seaofnodes/simple/Chapter21Test.java index cb55c033..e3b69593 100644 --- a/chapter21/src/test/java/com/seaofnodes/simple/Chapter21Test.java +++ b/chapter21/src/test/java/com/seaofnodes/simple/Chapter21Test.java @@ -48,9 +48,9 @@ public class Chapter21Test { public void testNewtonFloat() throws IOException { String src = Files.readString(Path.of("src/test/java/com/seaofnodes/simple/progs/newtonFloat.smp")) + "flt farg = arg; return sqrt(farg) + sqrt(farg+2.0);"; - testCPU(src,"x86_64_v2", "SystemV",25,null); - testCPU(src,"riscv" , "SystemV",17,null); - testCPU(src,"arm" , "SystemV",18,null); + testCPU(src,"x86_64_v2", "SystemV",23,null); + testCPU(src,"riscv" , "SystemV",18,null); + testCPU(src,"arm" , "SystemV",19,null); } @Test @@ -65,7 +65,7 @@ public class Chapter21Test { public void testArray1() throws IOException { String src = Files.readString(Path.of("src/test/java/com/seaofnodes/simple/progs/array1.smp")); testCPU(src,"x86_64_v2", "SystemV",7,"return .[];"); - testCPU(src,"riscv" , "SystemV",9,"return (add,.[],(mul,.[],1000));"); + testCPU(src,"riscv" , "SystemV",7,"return (add,.[],(mul,.[],1000));"); testCPU(src,"arm" , "SystemV",5,"return (add,.[],(mul,.[],1000));"); } |
