diff options
Diffstat (limited to 'chapter23/src')
| -rw-r--r-- | chapter23/src/test/java/com/seaofnodes/simple/Chapter23Test.java | 5 | ||||
| -rw-r--r-- | chapter23/src/test/java/com/seaofnodes/simple/progs/print.smp | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/chapter23/src/test/java/com/seaofnodes/simple/Chapter23Test.java b/chapter23/src/test/java/com/seaofnodes/simple/Chapter23Test.java index 12e089fc..ec38bd89 100644 --- a/chapter23/src/test/java/com/seaofnodes/simple/Chapter23Test.java +++ b/chapter23/src/test/java/com/seaofnodes/simple/Chapter23Test.java @@ -21,6 +21,11 @@ public class Chapter23Test { testCPU(src,"arm" , "SystemV",-1,null); } + @Test + public void myOwnSake2() throws IOException { + TestC.runS("print","Or",0); + } + static CodeGen testCPU( String src, String cpu, String os, int spills, String stop ) { CodeGen code = new CodeGen(src).driver(CodeGen.Phase.Encoding,cpu,os); int delta = spills>>3; diff --git a/chapter23/src/test/java/com/seaofnodes/simple/progs/print.smp b/chapter23/src/test/java/com/seaofnodes/simple/progs/print.smp new file mode 100644 index 00000000..3bb86268 --- /dev/null +++ b/chapter23/src/test/java/com/seaofnodes/simple/progs/print.smp @@ -0,0 +1,8 @@ +int x = 1; + +int y = 2; +if(x == 1) { +y = 1; +} + +return y;
\ No newline at end of file |
