compiler.cfg.linear-scan.resolve: unit tests

db4
Slava Pestov 2009-07-28 07:41:41 -05:00
parent 009cfbfc8d
commit 18717a449f
1 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,58 @@
IN: compiler.cfg.linear-scan.resolve.tests
USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
compiler.cfg.instructions cpu.architecture make
compiler.cfg.linear-scan.allocation.state ;
[
{
{ { T{ spill-slot f 0 } int-regs } { 1 int-regs } }
}
] [
[
0 <spill-slot> 1 int-regs add-mapping
] { } make
] unit-test
[
{
T{ _reload { dst 1 } { class int-regs } { n 0 } }
}
] [
[
{ T{ spill-slot f 0 } int-regs } { 1 int-regs } >insn
] { } make
] unit-test
[
{
T{ _spill { src 1 } { class int-regs } { n 0 } }
}
] [
[
{ 1 int-regs } { T{ spill-slot f 0 } int-regs } >insn
] { } make
] unit-test
[
{
T{ _copy { src 1 } { dst 2 } { class int-regs } }
}
] [
[
{ 1 int-regs } { 2 int-regs } >insn
] { } make
] unit-test
H{ { int-regs 10 } { float-regs 20 } } clone spill-counts set
H{ } clone spill-temps set
[
{
T{ _spill { src 1 } { class int-regs } { n 10 } }
T{ _copy { dst 1 } { src 0 } { class int-regs } }
T{ _reload { dst 0 } { class int-regs } { n 10 } }
}
] [
{ { { 0 int-regs } { 1 int-regs } } { { 1 int-regs } { 0 int-regs } } }
mapping-instructions
] unit-test