[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/17: Move handle-interrupts slow path out of line
From: |
Andy Wingo |
Subject: |
[Guile-commits] 04/17: Move handle-interrupts slow path out of line |
Date: |
Wed, 11 Dec 2019 03:47:49 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit a3be0b1e2ddc6cd6b420a7c9fbe5ad84889e1145
Author: Andy Wingo <address@hidden>
Date: Tue Dec 10 17:08:22 2019 +0100
Move handle-interrupts slow path out of line
* libguile/jit.c (compile_handle_interrupts)
(compile_handle_interrupts_slow): Move slow path out of line.
---
libguile/jit.c | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/libguile/jit.c b/libguile/jit.c
index 1ed8f92..f7cdf25 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -3624,29 +3624,21 @@ compile_ulogxor_slow (scm_jit_state *j, uint8_t dst,
uint8_t a, uint8_t b)
static void
compile_handle_interrupts (scm_jit_state *j)
{
- uint32_t saved_state = save_reloadable_register_state (j);
-
- /* This instruction invalidates SP_CACHE_GPR / SP_CACHE_FPR. */
-
- void *again = jit_address (j->jit);
-
jit_addi (j->jit, T0, THREAD, thread_offset_pending_asyncs);
jit_ldr_atomic (j->jit, T0, T0);
- jit_reloc_t none_pending = jit_beqi (j->jit, T0, SCM_UNPACK (SCM_EOL));
- jit_ldxi_i (j->jit, T0, THREAD, thread_offset_block_asyncs);
- jit_reloc_t blocked = jit_bnei (j->jit, T0, 0);
-
- emit_store_current_ip (j, T0);
- jit_jmpi_with_link (j->jit, handle_interrupts_trampoline);
- jit_jmpi (j->jit, again);
-
- jit_patch_here (j->jit, none_pending);
- jit_patch_here (j->jit, blocked);
- j->register_state = saved_state;
+ add_slow_path_patch (j, jit_bnei (j->jit, T0, SCM_UNPACK (SCM_EOL)));
}
static void
compile_handle_interrupts_slow (scm_jit_state *j)
{
+ jit_ldxi_i (j->jit, T0, THREAD, thread_offset_block_asyncs);
+ add_inter_instruction_patch (j,
+ jit_bnei (j->jit, T0, 0),
+ j->next_ip);
+
+ emit_store_current_ip (j, T0);
+ jit_jmpi_with_link (j->jit, handle_interrupts_trampoline);
+ continue_after_slow_path (j, j->ip);
}
static void
- [Guile-commits] branch master updated (4a6a7e1 -> 114198d), Andy Wingo, 2019/12/11
- [Guile-commits] 02/17: Move add/immediate, sub/immediate slow paths out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 03/17: Move add, sub slow paths out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 04/17: Move handle-interrupts slow path out of line,
Andy Wingo <=
- [Guile-commits] 10/17: Add subr-call out-of-line slow path, Andy Wingo, 2019/12/11
- [Guile-commits] 09/17: Move alloc-frame slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 13/17: Move assert-nargs-le slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 14/17: Move allocate-words/immediate slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 05/17: Move receive slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 07/17: Move assert-nargs-ee slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 06/17: Move receive-values slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 08/17: Move assert-nargs-ge slow path out of line, Andy Wingo, 2019/12/11
- [Guile-commits] 11/17: Add out-of-line slow path for compose-continuation, Andy Wingo, 2019/12/11
- [Guile-commits] 12/17: Add out-of-line slow path for abort, Andy Wingo, 2019/12/11