diff options
author | Andy Wingo <wingo@pobox.com> | 2019-12-10 22:10:06 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-12-10 22:20:53 +0100 |
commit | 0c8a4d34264384e6ec8ffac0247a1ec8c327934b (patch) | |
tree | f255b637329e852d9a1099570b1ff0119b07e816 /libguile/jit.c | |
parent | 45b936a8e3e6244849c43a81319b6e82b82c5dc4 (diff) | |
download | guile-0c8a4d34264384e6ec8ffac0247a1ec8c327934b.tar.gz |
Move assert-nargs-le slow path out of line
* libguile/jit.c (compile_assert_nargs_le)
(compile_assert_nargs_le_slow): Move slow path out of line.
Diffstat (limited to 'libguile/jit.c')
-rw-r--r-- | libguile/jit.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libguile/jit.c b/libguile/jit.c index b9deaae83..1908f116e 100644 --- a/libguile/jit.c +++ b/libguile/jit.c @@ -1946,22 +1946,17 @@ compile_assert_nargs_ge_slow (scm_jit_state *j, uint32_t nlocals) static void compile_assert_nargs_le (scm_jit_state *j, uint32_t nlocals) { - jit_reloc_t k; - jit_gpr_t t = T0; - uint32_t saved_state = j->register_state; - - k = emit_branch_if_frame_locals_count_less_than (j, t, nlocals + 1); - emit_store_current_ip (j, t); - emit_call_1 (j, scm_vm_intrinsics.error_wrong_num_args, - thread_operand ()); - jit_patch_here (j->jit, k); + add_slow_path_patch + (j, emit_branch_if_frame_locals_count_greater_than (j, T0, nlocals)); - j->register_state = saved_state; j->frame_size_max = nlocals; } static void compile_assert_nargs_le_slow (scm_jit_state *j, uint32_t nlocals) { + emit_store_current_ip (j, T0); + emit_call_1 (j, scm_vm_intrinsics.error_wrong_num_args, + thread_operand ()); } static void |