factor/basis/compiler/cfg/builder/alien/params/params-tests.factor

29 lines
619 B
Factor
Raw Normal View History

2016-08-01 15:51:40 -04:00
USING: alien compiler.cfg.builder.alien.params cpu.architecture
cpu.x86.assembler.operands kernel system tools.test ;
IN: compiler.cfg.builder.alien.params.tests
! next-reg-param
cpu x86.64? [
{
RDI
XMM0
XMM1
RSI
} [
cdecl param-regs init-regs
f int-rep next-reg-param
f double-rep next-reg-param
f float-rep next-reg-param
f int-rep next-reg-param
] unit-test
] when
! reg-class-full?
{
f t V{ } f
} [
V{ 1 2 3 } clone f reg-class-full?
V{ 1 } clone [ t reg-class-full? ] keep
V{ 1 2 } t reg-class-full?
] unit-test