"to_value_struct" f %alien-invoke ;
M: x86.32 %nest-stacks ( -- )
- ! Save current frame. See comment in vm/contexts.hpp
+ ! Save current frame to ctx->magic_frame.
+ ! See comment in vm/contexts.hpp.
EAX stack-reg stack-frame get total-size>> 3 cells - [+] LEA
4 save-vm-ptr
0 stack@ EAX MOV
! load VM pointer
EDX 0 MOV 0 rc-absolute-cell jit-vm
]
-[
-
- ! pass quotation
- ESP [] EAX MOV
- ! pass VM pointer
- ESP 4 [+] EDX MOV
- ! call XT
- EAX quot-xt-offset [+] CALL
-]
-[
- ! pass quotation
- ESP 4 [+] EAX MOV
- ! pass VM pointer
- ESP 8 [+] EDX MOV
- ! jump to XT
- EAX quot-xt-offset [+] JMP
-]
+[ EAX quot-xt-offset [+] CALL ]
+[ EAX quot-xt-offset [+] JMP ]
\ (call) define-sub-primitive*
! Inline cache miss entry points
lea -4(%esp),%ebx
mov %ebx,4(%ecx)
- /* Call quot-xt. Parameters are already on the stack */
+ /* Call quot-xt */
call *QUOT_XT_OFFSET(%eax)
/* Tear down stack frame for the call to the boot quotation */
- pop %edx
pop %eax
+ pop %edx
add $4,%esp
/* Undo stack alignment */
/* load retainstack */
mov 12(%ecx),RS_REG
- /* pass arguments to error handler */
- mov %eax,4(%esp)
- mov %edx,8(%esp)
-
/* call the error handler */
jmp *QUOT_XT_OFFSET(%eax)
DEF(void,lazy_jit_compile_impl,(cell quot, void *vm)):
- /* load arguments */
- mov 4(%esp),%eax
- mov 8(%esp),%edx
-
/* load context */
mov (%edx),%ecx
/* save datastack */