]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / compiler / cfg / linear-scan / resolve / resolve-tests.factor
1 USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
2 accessors
3 compiler.cfg
4 compiler.cfg.instructions cpu.architecture make sequences
5 compiler.cfg.linear-scan.allocation.state ;
6 IN: compiler.cfg.linear-scan.resolve.tests
7
8 [
9     {
10         { { T{ spill-slot f 0 } int-rep } { 1 int-rep } }
11     }
12 ] [
13     [
14         0 <spill-slot> 1 int-rep add-mapping
15     ] { } make
16 ] unit-test
17
18 [
19     {
20         T{ _reload { dst 1 } { rep int-rep } { n 0 } }
21     }
22 ] [
23     [
24         { T{ spill-slot f 0 } int-rep } { 1 int-rep } >insn
25     ] { } make
26 ] unit-test
27
28 [
29     {
30         T{ _spill { src 1 } { rep int-rep } { n 0 } }
31     }
32 ] [
33     [
34         { 1 int-rep } { T{ spill-slot f 0 } int-rep } >insn
35     ] { } make
36 ] unit-test
37
38 [
39     {
40         T{ ##copy { src 1 } { dst 2 } { rep int-rep } }
41     }
42 ] [
43     [
44         { 1 int-rep } { 2 int-rep } >insn
45     ] { } make
46 ] unit-test
47
48 cfg new 8 >>spill-area-size cfg set
49 H{ } clone spill-temps set
50
51 [
52     t
53 ] [
54     { { { 0 int-rep } { 1 int-rep } } { { 1 int-rep } { 0 int-rep } } }
55     mapping-instructions {
56         {
57             T{ _spill { src 0 } { rep int-rep } { n 8 } }
58             T{ ##copy { dst 0 } { src 1 } { rep int-rep } }
59             T{ _reload { dst 1 } { rep int-rep } { n 8 } }
60         }
61         {
62             T{ _spill { src 1 } { rep int-rep } { n 8 } }
63             T{ ##copy { dst 1 } { src 0 } { rep int-rep } }
64             T{ _reload { dst 0 } { rep int-rep } { n 8 } }
65         }
66     } member?
67 ] unit-test