mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 00:30:21 +02:00
Fix --disable-jit compilation
* libguile/jit.c: Wrap the whole thing in ENABLE_JIT. * libguile/threads.c (on_thread_exit): * libguile/vm.c (scm_call_n): * libguile/init.c (scm_i_init_guile): * libguile/vm-engine.c (VM_NAME): Wrap calls into jit.c with ENABLE_JIT. * configure.ac: Move up AC_CANONICAL_TARGET, as autoconf was complaining about it coming after AC_ARG_PROGRAM. * acinclude.m4 (GUILE_ENABLE_JIT): Fix to honor --enable-jit arg.
This commit is contained in:
parent
f03ff5304a
commit
ce9169804e
7 changed files with 27 additions and 8 deletions
|
@ -458,6 +458,7 @@ VM_NAME (scm_thread *thread)
|
|||
*/
|
||||
VM_DEFINE_OP (5, instrument_entry, "instrument-entry", OP2 (X32, N32))
|
||||
{
|
||||
#if ENABLE_JIT
|
||||
if (!VP->disable_mcode)
|
||||
{
|
||||
struct scm_jit_function_data *data;
|
||||
|
@ -490,6 +491,7 @@ VM_NAME (scm_thread *thread)
|
|||
else
|
||||
data->counter += SCM_JIT_COUNTER_ENTRY_INCREMENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
APPLY_HOOK ();
|
||||
|
||||
|
@ -575,6 +577,7 @@ VM_NAME (scm_thread *thread)
|
|||
old_fp = VP->fp;
|
||||
VP->fp = SCM_FRAME_DYNAMIC_LINK (old_fp);
|
||||
|
||||
#if ENABLE_JIT
|
||||
if (!VP->disable_mcode)
|
||||
{
|
||||
mcode = SCM_FRAME_MACHINE_RETURN_ADDRESS (old_fp);
|
||||
|
@ -585,6 +588,7 @@ VM_NAME (scm_thread *thread)
|
|||
NEXT (0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (old_fp);
|
||||
NEXT (0);
|
||||
|
@ -699,6 +703,7 @@ VM_NAME (scm_thread *thread)
|
|||
SYNC_IP ();
|
||||
mcode = CALL_INTRINSIC (compose_continuation, (thread, vmcont));
|
||||
|
||||
#if ENABLE_JIT
|
||||
if (mcode && !VP->disable_mcode)
|
||||
{
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
|
@ -706,6 +711,7 @@ VM_NAME (scm_thread *thread)
|
|||
NEXT (0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
|
@ -721,6 +727,7 @@ VM_NAME (scm_thread *thread)
|
|||
*/
|
||||
VM_DEFINE_OP (14, instrument_loop, "instrument-loop", OP2 (X32, N32))
|
||||
{
|
||||
#if ENABLE_JIT
|
||||
if (!VP->disable_mcode)
|
||||
{
|
||||
int32_t data_offset = ip[1];
|
||||
|
@ -745,6 +752,7 @@ VM_NAME (scm_thread *thread)
|
|||
else
|
||||
data->counter += SCM_JIT_COUNTER_LOOP_INCREMENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
NEXT (2);
|
||||
}
|
||||
|
@ -789,8 +797,10 @@ VM_NAME (scm_thread *thread)
|
|||
|
||||
ABORT_HOOK ();
|
||||
|
||||
#if ENABLE_JIT
|
||||
if (mcode && !VP->disable_mcode)
|
||||
scm_jit_enter_mcode (thread, mcode);
|
||||
#endif
|
||||
|
||||
CACHE_REGISTER ();
|
||||
NEXT (0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue