 ! f0-f29: float vregs
 ! f30, f31: float scratch
 
+enable-float-intrinsics
+
+<< \ ##integer>float t frame-required? set-word-prop
+\ ##float>integer t frame-required? set-word-prop >>
+
 M: ppc machine-registers
     {
         { int-regs T{ range f 2 26 1 } }
-        { double-float-regs T{ range f 0 28 1 } }
+        { double-float-regs T{ range f 0 29 1 } }
     } ;
 
 : scratch-reg 28 ; inline
-: fp-scratch-reg-1 29 ; inline
-: fp-scratch-reg-2 30 ; inline
+: fp-scratch-reg 30 ; inline
 
 M: ppc two-operand? f ;
 

    "end" resolve-label ;

M: ppc %prologue ( n -- )
    #! We use a volatile register (r11) here for scratch. Because
    #! callback bodies have a prologue too, we cannot assume
    #! that c_to_factor saved all non-volatile registers, so
    #! we have to respect the C calling convention. Also, we
    #! cannot touch any param-regs either.
    0 11 LOAD32 rc-absolute-ppc-2/2 rel-this
    0 MFLR
    1 1 pick neg ADDI

M: ppc %inc-r ( n -- ) rs-reg (%inc) ;

HOOK: reserved-area-size os ( -- n )

! The start of the stack frame contains the size of this frame
! as well as the currently executing XT
: factor-area-size ( -- n ) 2 cells ; foldable
: next-save ( n -- i ) cell - ;
: xt-save ( n -- i ) 2 cells - ;

! Next, we have the spill area as well as the FFI parameter area.
! They overlap, since basic blocks with FFI calls will never
! spill.
: param@ ( n -- x ) reserved-area-size + ; inline

: param-save-size ( -- n ) 8 cells ; foldable
