1 USING: accessors compiler.cfg compiler.cfg.instructions
2 compiler.cfg.linear-scan.resolve compiler.cfg.utilities
3 cpu.architecture kernel make namespaces sequences tools.test ;
4 IN: compiler.cfg.linear-scan.resolve.tests
9 T{ location f T{ spill-slot f 0 } int-rep int-regs }
10 T{ location f 1 int-rep int-regs }
15 0 <spill-slot> 1 int-rep add-mapping
21 T{ ##reload { dst 1 } { rep int-rep } { src T{ spill-slot f 0 } } }
25 T{ location f T{ spill-slot f 0 } int-rep int-regs }
26 T{ location f 1 int-rep int-regs }
33 T{ ##spill { src 1 } { rep int-rep } { dst T{ spill-slot f 0 } } }
37 T{ location f 1 int-rep int-regs }
38 T{ location f T{ spill-slot f 0 } int-rep int-regs }
45 T{ ##copy { src 1 } { dst 2 } { rep int-rep } }
49 T{ location f 1 int-rep int-regs }
50 T{ location f 2 int-rep int-regs }
57 T{ ##copy { src 1 } { dst 2 } { rep int-rep } }
61 { { T{ location f 1 int-rep int-regs } T{ location f 2 int-rep int-regs } } }
67 T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 0 } } }
68 T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 1 } } }
73 { T{ location f T{ spill-slot f 1 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } }
74 { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 0 } int-rep int-regs } }
81 T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 1 } } }
82 T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 0 } } }
87 { T{ location f T{ spill-slot f 0 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } }
88 { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 1 } int-rep int-regs } }
95 T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 1 } } }
96 T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 0 } } }
101 { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 1 } int-rep int-regs } }
102 { T{ location f T{ spill-slot f 0 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } }
107 { } insns>cfg [ stack-frame>> 8 >>spill-area-size drop ] [ cfg set ] bi
112 { T{ location f 0 int-rep int-regs } T{ location f 1 int-rep int-regs } }
113 { T{ location f 1 int-rep int-regs } T{ location f 0 int-rep int-regs } }
115 mapping-instructions {
117 T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 8 } } }
118 T{ ##copy { dst 0 } { src 1 } { rep int-rep } }
119 T{ ##reload { dst 1 } { rep int-rep } { src T{ spill-slot f 8 } } }
123 T{ ##spill { src 1 } { rep int-rep } { dst T{ spill-slot f 8 } } }
124 T{ ##copy { dst 1 } { src 0 } { rep int-rep } }
125 T{ ##reload { dst 0 } { rep int-rep } { src T{ spill-slot f 8 } } }