factor/library/compiler/ppc/architecture.factor

25 lines
564 B
Factor
Raw Normal View History

2005-09-05 17:36:20 -04:00
IN: compiler-backend
2005-12-24 16:08:15 -05:00
USING: assembler compiler-backend kernel kernel-internals math ;
2005-09-05 17:14:15 -04:00
! PowerPC register assignments
! r3-r10 vregs
! r14 data stack
! r15 call stack
: fixnum-imm? ( -- ? )
#! Can fixnum operations take immediate operands?
f ; inline
2005-12-04 22:06:12 -05:00
: vregs { 3 4 5 6 7 8 9 10 } ; inline
2005-12-24 16:08:15 -05:00
M: int-regs return-reg drop 3 ;
M: int-regs fastcall-regs drop 8 ;
2005-12-24 16:08:15 -05:00
M: float-regs return-reg drop 1 ;
M: float-regs fastcall-regs drop 8 ;
! Mach-O -vs- Linux/PPC
: stack@ os "macosx" = 24 8 ? + ;
: lr@ os "macosx" = 8 4 ? + ;
: dual-fp/int-regs? os "macosx" = ;