guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 02/03: jit: Direct tail calls assert that target can hav


From: Andy Wingo
Subject: [Guile-commits] 02/03: jit: Direct tail calls assert that target can have mcode
Date: Tue, 18 Jun 2019 15:51:56 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit e8203a3f8c34b0505fa0f914503348c1b85c74d3
Author: Andy Wingo <address@hidden>
Date:   Tue Jun 18 21:26:34 2019 +0200

    jit: Direct tail calls assert that target can have mcode
    
    * libguile/jit.c (emit_direct_tail_call): Assert that the callee label
      starts with an instrument-entry.
---
 libguile/jit.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libguile/jit.c b/libguile/jit.c
index ed95ba5..8e0781d 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -815,16 +815,12 @@ emit_direct_tail_call (scm_jit_state *j, const uint32_t 
*vcode)
 {
   ASSERT_HAS_REGISTER_STATE (FP_IN_REGISTER | SP_IN_REGISTER);
 
+  ASSERT ((vcode[0] & 0xff) == scm_op_instrument_entry);
+
   if (vcode == j->start)
     {
       jit_jmpi (j->jit, j->labels[0]);
     }
-  else if ((vcode[0] & 0xff) != scm_op_instrument_entry)
-    {
-      emit_movi (j, T0, (intptr_t) vcode);
-      emit_store_ip (j, T0);
-      emit_exit (j);
-    }
   else
     {
       struct scm_jit_function_data *data;



reply via email to

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