1 ! Copyright (C) 2011 Erik Charlebois
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors system kernel layouts combinators
4 compiler.cfg.builder.alien.boxing sequences arrays
5 alien.c-types cpu.architecture cpu.ppc alien.complex ;
8 M: linux lr-save 1 cells ;
12 M: linux reserved-area-size 2 cells ;
14 M: linux allows-null-dereference f ;
18 { int-regs { 3 4 5 6 7 8 9 10 } }
19 { float-regs { 1 2 3 4 5 6 7 8 } }
23 lookup-c-type [ complex-double lookup-c-type = ]
24 [ complex-float lookup-c-type = ] bi or ;
26 M: ppc dummy-stack-params? f ;
28 M: ppc dummy-int-params? f ;
30 M: ppc dummy-fp-params? f ;
32 M: ppc long-long-on-stack? f ;
34 M: ppc long-long-odd-register? t ;
36 M: ppc float-right-align-on-stack? f ;
38 M: ppc flatten-struct-type
40 { [ dup lookup-c-type complex-double lookup-c-type = ]
41 [ drop { { int-rep f f } { int-rep f f }
42 { int-rep f f } { int-rep f f } } ] }
43 { [ dup lookup-c-type complex-float lookup-c-type = ]
44 [ drop { { int-rep f f } { int-rep f f } } ] }
45 [ call-next-method [ first t f 3array ] map ]