M:: ppc %load-gc-root ( gc-root register -- )
register 1 gc-root gc-root@ LWZ ;
-M:: ppc %call-gc ( gc-root-count -- )
+M:: ppc %call-gc ( gc-root-count temp -- )
3 1 gc-root-base local@ ADDI
gc-root-count 4 LI
"inline_gc" f %alien-invoke ;
[ drop 0 ]
} cond RET ;
-M:: x86.32 %call-gc ( gc-root-count temp1 -- )
- ! USE: prettyprint "PHIL" pprint temp1 pprint temp2 pprint
- temp1 gc-root-base param@ LEA
+M:: x86.32 %call-gc ( gc-root-count temp -- )
+ temp gc-root-base param@ LEA
12 [
- 0 PUSH rc-absolute-cell rt-vm rel-fixup ! push the vm ptr as an argument
+ ! Pass the VM ptr as the third parameter
+ 0 PUSH rc-absolute-cell rt-vm rel-fixup
! Pass number of roots as second parameter
gc-root-count PUSH
! Pass pointer to start of GC roots as first parameter
- temp1 PUSH
+ temp PUSH
! Call GC
"inline_gc" f %alien-invoke
] with-aligned-stack ;
func f %alien-invoke
dst float-function-return ;
-M:: x86.64 %call-gc ( gc-root-count temp1 -- )
+M:: x86.64 %call-gc ( gc-root-count temp -- )
! Pass pointer to start of GC roots as first parameter
param-reg-1 gc-root-base param@ LEA
! Pass number of roots as second parameter
param-reg-2 gc-root-count MOV
- ! Pass vm as third parameter
+ ! Pass VM ptr as third parameter
param-reg-3 %mov-vm-ptr
! Call GC
"inline_gc" f %alien-invoke ;