guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/01: Fix assertion error running compile-file with thr


From: Andy Wingo
Subject: [Guile-commits] 01/01: Fix assertion error running compile-file with threshold 0
Date: Sun, 2 Sep 2018 15:30:20 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit e9b44c00fdad6a7c36ff8cf070cbaf771e6b70ad
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 2 21:29:24 2018 +0200

    Fix assertion error running compile-file with threshold 0
    
    * libguile/jit.c (emit_alloc_frame_for_sp): Don't require that FP be in
      a register, but if it was and we call out, do restore it.
---
 libguile/jit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libguile/jit.c b/libguile/jit.c
index 351648c..12c9cd3 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -681,8 +681,9 @@ static void
 emit_alloc_frame_for_sp (scm_jit_state *j, jit_gpr_t t)
 {
   jit_node_t *k, *fast, *watermark;
+  uint32_t saved_state = save_reloadable_register_state (j);
 
-  ASSERT_HAS_REGISTER_STATE (SP_IN_REGISTER | FP_IN_REGISTER);
+  ASSERT_HAS_REGISTER_STATE (SP_IN_REGISTER);
 
   emit_ldxi (j, t, THREAD, thread_offset_sp_min_since_gc);
   fast = jit_bger (SP, t);
@@ -692,8 +693,7 @@ emit_alloc_frame_for_sp (scm_jit_state *j, jit_gpr_t t)
   /* Slow case: call out to expand stack.  */
   emit_store_current_ip (j, t);
   emit_call_r_r (j, scm_vm_intrinsics.expand_stack, THREAD, SP);
-  emit_reload_sp (j);
-  emit_reload_fp (j);
+  restore_reloadable_register_state (j, saved_state);
   k = jit_jmpi ();
 
   /* Past sp_min_since_gc, but within stack_limit: update watermark and



reply via email to

[Prev in Thread] Current Thread [Next in Thread]