diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-02-18 19:58:12 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-02-18 19:58:12 -0500 |
commit | cc1f38f501c50309e23fb4266814fd4915b0da25 (patch) | |
tree | 0d0bff64ac572898ed03367a8b87cbb28748ce94 /lo2.ml | |
parent | 8344a689103a48e3beaf18cc098951441a425c51 (diff) | |
download | roux-cc1f38f501c50309e23fb4266814fd4915b0da25.tar.gz |
add spill test
Diffstat (limited to 'lo2.ml')
-rw-r--r-- | lo2.ml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lo2.ml b/lo2.ml index 896b56b..c77e5c4 100644 --- a/lo2.ml +++ b/lo2.ml @@ -338,6 +338,29 @@ let psum: iprog = } |] +let pspill: iprog = + [| { bb_name = "init" + ; bb_phis = [||] + ; bb_inss = +(* 00 *) [| `Con 42 +(* 01 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 0)) +(* 02 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 1)) +(* 03 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 2)) +(* 04 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 3)) +(* 05 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 4)) +(* 06 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 5)) +(* 07 *) ; `Bop (IRIns (0, 6), Add, IRIns (0, 6)) +(* 08 *) ; `Bop (IRIns (0, 5), Add, IRIns (0, 7)) +(* 09 *) ; `Bop (IRIns (0, 4), Add, IRIns (0, 8)) +(* 10 *) ; `Bop (IRIns (0, 3), Add, IRIns (0, 9)) +(* 11 *) ; `Bop (IRIns (0, 2), Add, IRIns (0, 10)) +(* 12 *) ; `Bop (IRIns (0, 1), Add, IRIns (0, 11)) +(* 13 *) ; `Bop (IRIns (0, 0), Add, IRIns (0, 12)) + |] + ; bb_jmp = `Brz (IRIns (0, 13), -1, -1) + } + |] + (* ** Phi resolution. ** *) (* Machine program, ready for code generation. *) type mprog = (loc rins, unit, loc jmpi) bb array |