mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
Adapt JIT calling convention; continuations take mra from stack
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Update prototype of capture-continuation. * libguile/jit.h: * libguile/jit.c (scm_jit_enter_mcode): Return void, not the vra. Instead, we expect the code to set vp->ip for the vra. * libguile/vm-engine.c (instrument-entry, instrument-loop) (return-values, abort): Adapt scm_jit_enter_mcode calling convention. (capture-continuation): No need to pass an mra; the intrinsic will read it from the stack. * libguile/vm.c (capture_continuation): Remove mra arg, as we take mra from the continuation. (scm_call_n): Adapt to scm_jit_enter_mcode change.
This commit is contained in:
parent
a20feea43e
commit
5df43b60a9
5 changed files with 17 additions and 26 deletions
|
@ -472,8 +472,8 @@ VM_NAME (scm_thread *thread)
|
|||
|
||||
if (mcode)
|
||||
{
|
||||
ip = scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_SP ();
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
}
|
||||
}
|
||||
|
@ -682,8 +682,8 @@ VM_NAME (scm_thread *thread)
|
|||
|
||||
if (mcode)
|
||||
{
|
||||
ip = scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_SP ();
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
}
|
||||
else
|
||||
|
@ -716,8 +716,8 @@ VM_NAME (scm_thread *thread)
|
|||
|
||||
if (mcode)
|
||||
{
|
||||
ip = scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_SP ();
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
}
|
||||
}
|
||||
|
@ -735,12 +735,11 @@ VM_NAME (scm_thread *thread)
|
|||
VM_DEFINE_OP (15, capture_continuation, "capture-continuation", DOP1 (X8_S24))
|
||||
{
|
||||
uint32_t dst;
|
||||
uint8_t *mra = NULL;
|
||||
|
||||
UNPACK_24 (op, dst);
|
||||
|
||||
SYNC_IP ();
|
||||
SP_SET (dst, CALL_INTRINSIC (capture_continuation, (thread, mra)));
|
||||
SP_SET (dst, CALL_INTRINSIC (capture_continuation, (thread)));
|
||||
|
||||
NEXT (1);
|
||||
}
|
||||
|
@ -769,16 +768,10 @@ VM_NAME (scm_thread *thread)
|
|||
ABORT_CONTINUATION_HOOK ();
|
||||
|
||||
if (mcode)
|
||||
{
|
||||
ip = scm_jit_enter_mcode (thread, mcode);
|
||||
CACHE_SP ();
|
||||
NEXT (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
}
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
}
|
||||
|
||||
/* builtin-ref dst:12 idx:12
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue