compiler.codegen passes temp reg to %call-gc
parent
4552e02624
commit
a07a2f7496
|
@ -271,7 +271,7 @@ M: _gc generate-insn
|
||||||
[ data-values>> save-data-regs ]
|
[ data-values>> save-data-regs ]
|
||||||
[ [ tagged-values>> ] [ temp1>> ] bi save-gc-roots ]
|
[ [ tagged-values>> ] [ temp1>> ] bi save-gc-roots ]
|
||||||
[ [ temp1>> ] [ temp2>> ] bi t %save-context ]
|
[ [ temp1>> ] [ temp2>> ] bi t %save-context ]
|
||||||
[ tagged-values>> length %call-gc ]
|
[ [ tagged-values>> length ] [ temp1>> ] bi %call-gc ]
|
||||||
[ [ tagged-values>> ] [ temp1>> ] bi load-gc-roots ]
|
[ [ tagged-values>> ] [ temp1>> ] bi load-gc-roots ]
|
||||||
[ data-values>> load-data-regs ]
|
[ data-values>> load-data-regs ]
|
||||||
} cleave
|
} cleave
|
||||||
|
|
|
@ -296,7 +296,7 @@ HOOK: %write-barrier cpu ( src card# table -- )
|
||||||
HOOK: %check-nursery cpu ( label temp1 temp2 -- )
|
HOOK: %check-nursery cpu ( label temp1 temp2 -- )
|
||||||
HOOK: %save-gc-root cpu ( gc-root register -- )
|
HOOK: %save-gc-root cpu ( gc-root register -- )
|
||||||
HOOK: %load-gc-root cpu ( gc-root register -- )
|
HOOK: %load-gc-root cpu ( gc-root register -- )
|
||||||
HOOK: %call-gc cpu ( gc-root-count -- )
|
HOOK: %call-gc cpu ( gc-root-count temp1 -- )
|
||||||
|
|
||||||
HOOK: %prologue cpu ( n -- )
|
HOOK: %prologue cpu ( n -- )
|
||||||
HOOK: %epilogue cpu ( n -- )
|
HOOK: %epilogue cpu ( n -- )
|
||||||
|
|
|
@ -311,15 +311,15 @@ M: x86.32 %callback-return ( n -- )
|
||||||
[ drop 0 ]
|
[ drop 0 ]
|
||||||
} cond RET ;
|
} cond RET ;
|
||||||
|
|
||||||
M:: x86.32 %call-gc ( gc-root-count -- )
|
M:: x86.32 %call-gc ( gc-root-count temp1 -- )
|
||||||
EAX gc-root-base param@ LEA
|
! USE: prettyprint "PHIL" pprint temp1 pprint temp2 pprint
|
||||||
|
temp1 gc-root-base param@ LEA
|
||||||
12 [
|
12 [
|
||||||
push-vm-ptr
|
0 PUSH rc-absolute-cell rt-vm rel-fixup ! push the vm ptr as an argument
|
||||||
! Pass number of roots as second parameter
|
! Pass number of roots as second parameter
|
||||||
temp-reg gc-root-count MOV
|
gc-root-count PUSH
|
||||||
temp-reg PUSH
|
|
||||||
! Pass pointer to start of GC roots as first parameter
|
! Pass pointer to start of GC roots as first parameter
|
||||||
EAX PUSH
|
temp1 PUSH
|
||||||
! Call GC
|
! Call GC
|
||||||
"inline_gc" f %alien-invoke
|
"inline_gc" f %alien-invoke
|
||||||
] with-aligned-stack ;
|
] with-aligned-stack ;
|
||||||
|
|
|
@ -233,7 +233,7 @@ 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 -- )
|
M:: x86.64 %call-gc ( gc-root-count temp1 -- )
|
||||||
! 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
|
||||||
|
|
Loading…
Reference in New Issue