2009-07-24 20:46:33 -04:00
|
|
|
USING: compiler.cfg.parallel-copy tools.test make arrays
|
|
|
|
compiler.cfg.registers namespaces compiler.cfg.instructions
|
|
|
|
cpu.architecture ;
|
|
|
|
IN: compiler.cfg.parallel-copy.tests
|
|
|
|
|
|
|
|
SYMBOL: temp
|
|
|
|
|
|
|
|
: test-parallel-copy ( mapping -- seq )
|
|
|
|
3 vreg-counter set-global
|
|
|
|
[ parallel-copy ] { } make ;
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
2009-08-07 18:44:50 -04:00
|
|
|
T{ ##copy f V int-rep 4 V int-rep 2 int-rep }
|
|
|
|
T{ ##copy f V int-rep 2 V int-rep 1 int-rep }
|
|
|
|
T{ ##copy f V int-rep 1 V int-rep 4 int-rep }
|
2009-07-24 20:46:33 -04:00
|
|
|
}
|
|
|
|
] [
|
|
|
|
H{
|
2009-08-07 18:44:50 -04:00
|
|
|
{ V int-rep 1 V int-rep 2 }
|
|
|
|
{ V int-rep 2 V int-rep 1 }
|
2009-07-24 20:46:33 -04:00
|
|
|
} test-parallel-copy
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
2009-08-07 18:44:50 -04:00
|
|
|
T{ ##copy f V int-rep 1 V int-rep 2 int-rep }
|
|
|
|
T{ ##copy f V int-rep 3 V int-rep 4 int-rep }
|
2009-07-24 20:46:33 -04:00
|
|
|
}
|
|
|
|
] [
|
|
|
|
H{
|
2009-08-07 18:44:50 -04:00
|
|
|
{ V int-rep 1 V int-rep 2 }
|
|
|
|
{ V int-rep 3 V int-rep 4 }
|
2009-07-24 20:46:33 -04:00
|
|
|
} test-parallel-copy
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
2009-08-07 18:44:50 -04:00
|
|
|
T{ ##copy f V int-rep 1 V int-rep 3 int-rep }
|
|
|
|
T{ ##copy f V int-rep 2 V int-rep 1 int-rep }
|
2009-07-24 20:46:33 -04:00
|
|
|
}
|
|
|
|
] [
|
|
|
|
H{
|
2009-08-07 18:44:50 -04:00
|
|
|
{ V int-rep 1 V int-rep 3 }
|
|
|
|
{ V int-rep 2 V int-rep 3 }
|
2009-07-24 20:46:33 -04:00
|
|
|
} test-parallel-copy
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
2009-08-07 18:44:50 -04:00
|
|
|
T{ ##copy f V int-rep 4 V int-rep 3 int-rep }
|
|
|
|
T{ ##copy f V int-rep 3 V int-rep 2 int-rep }
|
|
|
|
T{ ##copy f V int-rep 2 V int-rep 1 int-rep }
|
|
|
|
T{ ##copy f V int-rep 1 V int-rep 4 int-rep }
|
2009-07-24 20:46:33 -04:00
|
|
|
}
|
|
|
|
] [
|
|
|
|
{
|
2009-08-07 18:44:50 -04:00
|
|
|
{ V int-rep 2 V int-rep 1 }
|
|
|
|
{ V int-rep 3 V int-rep 2 }
|
|
|
|
{ V int-rep 1 V int-rep 3 }
|
|
|
|
{ V int-rep 4 V int-rep 3 }
|
2009-07-24 20:46:33 -04:00
|
|
|
} test-parallel-copy
|
|
|
|
] unit-test
|