[ drop 0 ]
} cond RET ;
+M:: x86.32 %call-gc ( gc-root-count -- )
+ EAX gc-root-base param@ LEA
+ 12 [
+ push-vm-ptr
+ ! Pass number of roots as second parameter
+ temp-reg gc-root-count MOV
+ temp-reg PUSH
+ ! Pass pointer to start of GC roots as first parameter
+ EAX PUSH
+ ! Call GC
+ "inline_gc" f %alien-invoke
+ ] with-aligned-stack ;
+
M: x86.32 dummy-stack-params? f ;
M: x86.32 dummy-int-params? f ;
func f %alien-invoke
dst float-function-return ;
+M:: x86.64 %call-gc ( gc-root-count -- )
+ ! 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
+ param-reg-3 0 MOV rc-absolute-cell rt-vm rel-fixup
+ ! Call GC
+ "inline_gc" f %alien-invoke ;
+
! The result of reading 4 bytes from memory is a fixnum on
! x86-64.
enable-alien-4-intrinsics
M: x86 %load-gc-root ( gc-root register -- ) swap gc-root@ MOV ;
-M:: x86 %call-gc ( gc-root-count -- )
- ! 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 argument
- param-reg-3 0 MOV rc-absolute-cell rt-vm rel-fixup
- ! Call GC
- "inline_gc" f %alien-invoke ;
-
M: x86 %alien-global ( dst symbol library -- )
[ 0 MOV ] 2dip rc-absolute-cell rel-dlsym ;
gc_locals.pop_back();
}
-VM_ASM_API_OVERFLOW void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm)
+VM_C_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm)
{
ASSERTVM();
VM_PTR->inline_gc(gc_roots_base,gc_roots_size);
PRIMITIVE(clear_gc_stats);
PRIMITIVE(become);
struct factor_vm;
-VM_ASM_API_OVERFLOW void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm);
+VM_C_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm);
}