diff options
| author | Cliff Click <cliffc@acm.org> | 2025-04-11 21:08:03 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-04-11 21:08:03 -0700 |
| commit | 6ab61f8c6ae0fb26802cfff0f4d007e8a55e817e (patch) | |
| tree | f48cb432ceef048db8b12cb88cb4f11887569981 /chapter21/src/test | |
| parent | 404fb8dadfef10d0954abf6e84901b7d6a469f14 (diff) | |
| download | Simple-6ab61f8c6ae0fb26802cfff0f4d007e8a55e817e.tar.gz Simple-6ab61f8c6ae0fb26802cfff0f4d007e8a55e817e.zip | |
Update Chapter20Test.java
Diffstat (limited to 'chapter21/src/test')
| -rw-r--r-- | chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java b/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java index a2eb1172..8b7136ab 100644 --- a/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java +++ b/chapter21/src/test/java/com/seaofnodes/simple/Chapter20Test.java @@ -26,7 +26,8 @@ public class Chapter20Test { code.parse().opto().typeCheck().instSelect(cpu,os).GCM().localSched().regAlloc(); int delta = spills>>3; if( delta==0 ) delta = 1; - assertEquals("Expect spills:",spills,code._regAlloc._spillScaled,delta); + if( spills != -1 ) + assertEquals("Expect spills:",spills,code._regAlloc._spillScaled,delta); if( stop != null ) assertEquals(stop, code._stop.toString()); } @@ -92,9 +93,9 @@ return sqrt(arg) + sqrt(arg+2); @Test 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",4,"return .[];"); - testCPU(src,"riscv" , "SystemV",8,"return (add,.[],(mul,.[],1000));"); - testCPU(src,"arm" , "SystemV",5,"return (add,.[],(mul,.[],1000));"); + testCPU(src,"x86_64_v2", "SystemV",-1,"return .[];"); + testCPU(src,"riscv" , "SystemV", 8,"return (add,.[],(mul,.[],1000));"); + testCPU(src,"arm" , "SystemV", 5,"return (add,.[],(mul,.[],1000));"); } |
