         } case
     ] ?if ;
 
-M:: ppc %store-memory-imm ( src base offset rep c-type -- )
+: (%memory) ( val base displacement scale offset rep c-type -- base val displacement rep c-type )
+    [ [ 0 assert= ] bi@ swapd ] 2dip ; inline
+
+M: ppc %load-memory ( dst base displacement scale offset rep c-type -- )
+    (%memory) [
+        {
+            { c:char   [ [ LBZX ] [ drop dup EXTSB ] 2bi ] }
+            { c:uchar  [ LBZX ] }
+            { c:short  [ LHAX ] }
+            { c:ushort [ LHZX ] }
+        } case
+    ] [
+        {
+            { int-rep [ LWZX ] }
+            { float-rep [ LFSX ] }
+            { double-rep [ LFDX ] }
+        } case
+    ] ?if ;
+
+M: ppc %store-memory-imm ( src base offset rep c-type -- )
     [
         {
             { c:char   [ STB ] }

        "end" resolve-label
    ] with-scope ;

M:: ppc %load-memory-imm ( dst base offset rep c-type -- )
    [
        {
            { c:char   [ [ dup ] 2dip LBZ dup EXTSB ] }

    temp2 load-decks-offset
    temp1 scratch-reg temp2 STBX ;

M:: ppc %write-barrier ( src slot scale tag temp1 temp2 -- )
    scale 0 assert= tag 0 assert=
    temp1 src slot ADD
    temp1 temp2 (%write-barrier) ;

M:: ppc %write-barrier-imm ( src slot tag temp1 temp2 -- )
    temp1 src slot tag slot-offset ADDI
    temp1 temp2 (%write-barrier) ;

M:: ppc %check-nursery-branch ( label size cc temp1 temp2 -- )
    temp1 vm-reg "nursery" vm-field-offset LWZ
    temp2 vm-reg "nursery" vm-field-offset 2 cells + LWZ
    temp1 temp1 size ADDI
    ! is here >= end?
    temp1 0 temp2 CMP
