     [ 11 ] 2dip %alien-global 11 MTLR BLRL ;
 
 M: ppc %alien-callback ( quot -- )
-    3 swap %load-reference "c_to_factor" f %alien-invoke ;
+    3 swap %load-reference
+    4 %load-vm-addr
+    "c_to_factor" f %alien-invoke ;
 
 M: ppc %prepare-alien-indirect ( -- )
+    3 %load-vm-addr
     "unbox_alien" f %alien-invoke
     15 3 MR ;
 

    ! Value must be in r3
    ! Compute destination address and load struct size
    [ [ 4 1 ] dip local@ ADDI ] [ heap-size 5 LI ] bi*
    ! Call the function
    "to_value_struct" f %alien-invoke ;

M: ppc %box ( n rep func -- )
    ! If the source is a stack location, load it into freg #0.
    ! If the source is f, then we assume the value is already in
    ! freg #0.
    [ over [ 0 over reg-class-of param-reg swap %load-param-reg ] [ 2drop ] if ] dip
    f %alien-invoke ;

M: ppc %box-long-long ( n func -- )
    [

M: ppc %box-small-struct ( c-type -- )
    #! Box a <= 16-byte struct returned in r3:r4:r5:r6
    heap-size 7 LI
    8 %load-vm-addr
    "box_medium_struct" f %alien-invoke ;

: %unbox-struct-1 ( -- )
    ! Alien must be in r3.
    4 %load-vm-addr
    "alien_offset" f %alien-invoke
    3 3 0 LWZ ;

: %unbox-struct-2 ( -- )
    ! Alien must be in r3.
    4 %load-vm-addr
    "alien_offset" f %alien-invoke
    4 3 4 LWZ
    3 3 0 LWZ ;

: %unbox-struct-4 ( -- )
    ! Alien must be in r3.
    4 %load-vm-addr
    "alien_offset" f %alien-invoke
    6 3 12 LWZ
    5 3 8 LWZ
