guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 08/17: Move assert-nargs-ge slow path out of line


From: Andy Wingo
Subject: [Guile-commits] 08/17: Move assert-nargs-ge slow path out of line
Date: Wed, 11 Dec 2019 03:47:50 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 16c1a5d2cdb099b6f3fe6ebe42b1c72041e57140
Author: Andy Wingo <address@hidden>
Date:   Tue Dec 10 17:11:41 2019 +0100

    Move assert-nargs-ge slow path out of line
    
    * libguile/jit.c (compile_assert_nargs_ge)
      (compile_assert_nargs_ge_slow): Move slow path out of line.
---
 libguile/jit.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/libguile/jit.c b/libguile/jit.c
index 5ad85b6..4e37e7b 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -1934,24 +1934,17 @@ static void
 compile_assert_nargs_ge (scm_jit_state *j, uint32_t nlocals)
 {
   if (nlocals > 0)
-    {
-      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, 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);
-      j->register_state = saved_state;
-    }
+    add_slow_path_patch
+      (j, emit_branch_if_frame_locals_count_less_than (j, T0, nlocals));
 
   j->frame_size_min = nlocals;
 }
 static void
 compile_assert_nargs_ge_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



reply via email to

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