Fix bug in c_to_factor
parent
7271900e6f
commit
67153bf4bb
|
@ -215,7 +215,8 @@ M:: x86.32 %unbox-large-struct ( n c-type -- )
|
|||
"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
|
||||
|
|
|
@ -73,23 +73,8 @@ IN: bootstrap.x86
|
|||
! 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
|
||||
|
|
|
@ -40,12 +40,12 @@ DEF(void,c_to_factor,(cell quot, void *vm)):
|
|||
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 */
|
||||
|
@ -120,18 +120,10 @@ DEF(void,throw_impl,(cell quot, void *new_stack, void *vm)):
|
|||
/* 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 */
|
||||
|
|
Loading…
Reference in New Issue