cpu: cleanups
parent
c38d523185
commit
8610fa5e48
|
@ -510,7 +510,7 @@ M:: ppc %save-gc-root ( gc-root register -- )
|
||||||
M:: ppc %load-gc-root ( gc-root register -- )
|
M:: ppc %load-gc-root ( gc-root register -- )
|
||||||
register 1 gc-root gc-root@ LWZ ;
|
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
|
3 1 gc-root-base local@ ADDI
|
||||||
gc-root-count 4 LI
|
gc-root-count 4 LI
|
||||||
"inline_gc" f %alien-invoke ;
|
"inline_gc" f %alien-invoke ;
|
||||||
|
|
|
@ -314,15 +314,15 @@ M: x86.32 %callback-return ( n -- )
|
||||||
[ drop 0 ]
|
[ drop 0 ]
|
||||||
} cond RET ;
|
} cond RET ;
|
||||||
|
|
||||||
M:: x86.32 %call-gc ( gc-root-count temp1 -- )
|
M:: x86.32 %call-gc ( gc-root-count temp -- )
|
||||||
! USE: prettyprint "PHIL" pprint temp1 pprint temp2 pprint
|
temp gc-root-base param@ LEA
|
||||||
temp1 gc-root-base param@ LEA
|
|
||||||
12 [
|
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
|
! Pass number of roots as second parameter
|
||||||
gc-root-count PUSH
|
gc-root-count PUSH
|
||||||
! Pass pointer to start of GC roots as first parameter
|
! Pass pointer to start of GC roots as first parameter
|
||||||
temp1 PUSH
|
temp PUSH
|
||||||
! Call GC
|
! Call GC
|
||||||
"inline_gc" f %alien-invoke
|
"inline_gc" f %alien-invoke
|
||||||
] with-aligned-stack ;
|
] with-aligned-stack ;
|
||||||
|
|
|
@ -235,12 +235,12 @@ M:: x86.64 %binary-float-function ( dst src1 src2 func -- )
|
||||||
func f %alien-invoke
|
func f %alien-invoke
|
||||||
dst float-function-return ;
|
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
|
! Pass pointer to start of GC roots as first parameter
|
||||||
param-reg-1 gc-root-base param@ LEA
|
param-reg-1 gc-root-base param@ LEA
|
||||||
! Pass number of roots as second parameter
|
! Pass number of roots as second parameter
|
||||||
param-reg-2 gc-root-count MOV
|
param-reg-2 gc-root-count MOV
|
||||||
! Pass vm as third parameter
|
! Pass VM ptr as third parameter
|
||||||
param-reg-3 %mov-vm-ptr
|
param-reg-3 %mov-vm-ptr
|
||||||
! Call GC
|
! Call GC
|
||||||
"inline_gc" f %alien-invoke ;
|
"inline_gc" f %alien-invoke ;
|
||||||
|
|
Loading…
Reference in New Issue