summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2019-12-07 22:20:08 +0100
committerAndy Wingo <wingo@pobox.com>2019-12-10 17:09:20 +0100
commit1152036333bd7e047087a2be7c38ef565b7c03f8 (patch)
tree98fcf71a3d4f3a546934402d56f75731ad3e5dc4
parenta3be0b1e2ddc6cd6b420a7c9fbe5ad84889e1145 (diff)
downloadguile-1152036333bd7e047087a2be7c38ef565b7c03f8.tar.gz
Move receive slow path out of line
* libguile/jit.c (compile_receive, compile_receive_slow): Move slow path out of line.
-rw-r--r--libguile/jit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libguile/jit.c b/libguile/jit.c
index f7cdf25f4..b9eccad0a 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -1592,14 +1592,9 @@ static void
compile_receive (scm_jit_state *j, uint16_t dst, uint16_t proc, uint32_t nlocals)
{
jit_gpr_t t = T0;
- jit_reloc_t k;
- uint32_t saved_state = j->register_state;
- k = emit_branch_if_frame_locals_count_greater_than (j, t, proc);
- emit_store_current_ip (j, T0);
- emit_call_0 (j, scm_vm_intrinsics.error_no_values);
- j->register_state = saved_state;
- jit_patch_here (j->jit, k);
+ add_slow_path_patch
+ (j, emit_branch_if_frame_locals_count_less_than (j, t, proc + 1));
emit_fp_ref_scm (j, t, proc);
emit_fp_set_scm (j, dst, t);
emit_reset_frame (j, nlocals);
@@ -1609,6 +1604,8 @@ compile_receive (scm_jit_state *j, uint16_t dst, uint16_t proc, uint32_t nlocals
static void
compile_receive_slow (scm_jit_state *j, uint16_t dst, uint16_t proc, uint32_t nlocals)
{
+ emit_store_current_ip (j, T0);
+ emit_call_0 (j, scm_vm_intrinsics.error_no_values);
}
static void