compiler.codegen passes temp reg to %call-gc

db4
Phil Dawes 2009-09-25 18:48:13 +01:00
parent 4552e02624
commit a07a2f7496
4 changed files with 9 additions and 9 deletions

View File

@ -271,7 +271,7 @@ M: _gc generate-insn
[ data-values>> save-data-regs ]
[ [ tagged-values>> ] [ temp1>> ] bi save-gc-roots ]
[ [ 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 ]
[ data-values>> load-data-regs ]
} cleave

View File

@ -296,7 +296,7 @@ HOOK: %write-barrier cpu ( src card# table -- )
HOOK: %check-nursery cpu ( label temp1 temp2 -- )
HOOK: %save-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: %epilogue cpu ( n -- )

View File

@ -311,15 +311,15 @@ M: x86.32 %callback-return ( n -- )
[ drop 0 ]
} cond RET ;
M:: x86.32 %call-gc ( gc-root-count -- )
EAX gc-root-base param@ LEA
M:: x86.32 %call-gc ( gc-root-count temp1 -- )
! USE: prettyprint "PHIL" pprint temp1 pprint temp2 pprint
temp1 gc-root-base param@ LEA
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
temp-reg gc-root-count MOV
temp-reg PUSH
gc-root-count PUSH
! Pass pointer to start of GC roots as first parameter
EAX PUSH
temp1 PUSH
! Call GC
"inline_gc" f %alien-invoke
] with-aligned-stack ;

View File

@ -233,7 +233,7 @@ M:: x86.64 %binary-float-function ( dst src1 src2 func -- )
func f %alien-invoke
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
param-reg-1 gc-root-base param@ LEA
! Pass number of roots as second parameter