summaryrefslogtreecommitdiff
path: root/libguile/jit.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-05-11 14:41:44 +0200
committerAndy Wingo <wingo@pobox.com>2020-05-11 14:41:44 +0200
commit35160ade03bea1c5bac54e2f5fa5591068e0a557 (patch)
tree4c61b929989960da0fdadf35dd029c7de4b7849a /libguile/jit.c
parent73a23027f5cf61365b4fc5049301b727bf29a10b (diff)
downloadguile-35160ade03bea1c5bac54e2f5fa5591068e0a557.tar.gz
Reload FP if needed in bind-rest also
* libguile/jit.c (compile_bind_rest): Reload FP if needed
Diffstat (limited to 'libguile/jit.c')
-rw-r--r--libguile/jit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/jit.c b/libguile/jit.c
index 1e34b4fd5..e32b859a4 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -2173,6 +2173,12 @@ compile_bind_rest (scm_jit_state *j, uint32_t dst)
jit_reloc_t k, cons;
jit_gpr_t t = T1;
+ /* As with receive-values, although bind-rest is usually used after a
+ call returns, the baseline compiler will sometimes emit it
+ elsewhere. In that case ensure that FP is in a register for the
+ frame-locals-count branches. */
+ restore_reloadable_register_state (j, FP_IN_REGISTER);
+
cons = emit_branch_if_frame_locals_count_greater_than (j, t, dst);
emit_alloc_frame (j, t, dst + 1);