[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] JIT and Debugger/DebugTools
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] JIT and Debugger/DebugTools |
Date: |
Sun, 22 Dec 2013 23:03:39 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Dec 22, 2013 at 10:19:08PM +0100, Holger Hans Peter Freyther wrote:
>
> anyone else got an idea of what I should look at/verify?
thisContext is actually not yet the current context. I am not sure how
this happens and which context/process I actually look at (being able to
send >>#inspect would be nice). But it looks like whenever the interrupt
check triggers we will also need to export the _gst_ip.
#0 empty_context_stack () at interp.c:758
#1 0xb7f6728c in change_process_context (newProcess=0x40443c08) at
interp.c:1315
#2 0xb7f73298 in _gst_interpret (address@hidden)
at interp-jit.inl:428
#3 0xb7f744f0 in _gst_nvmsg_send (address@hidden,
address@hidden, address@hidden,
address@hidden) at interp.c:2326
We could also move the new IP into the signature of emit_interrupt_check
so we have the load+store only in the failure case. Do you have an idea
what would be right ip for a checked primitive? 0? 1?
diff --git a/libgst/xlat.c b/libgst/xlat.c
index 3f4a555..3122f97 100644
--- a/libgst/xlat.c
+++ b/libgst/xlat.c
@@ -2975,7 +2975,10 @@ emit_primitive (int primitive, int numArgs)
if (attr & (PRIM_SUCCEED | PRIM_RELOAD_IP))
{
if (attr & PRIM_CHECK_INTERRUPT)
- emit_interrupt_check (JIT_V2);
+ {
+ #warning "TODO.. write out the current IP"
+ emit_interrupt_check (JIT_V2);
+ }
jit_jmpr (JIT_V2);
}
@@ -3218,6 +3221,8 @@ emit_method_prolog (OOP methodOOP,
emit_context_setup (header.numArgs, header.numTemps);
define_ip_map_entry (0);
+ jit_movi_ul (JIT_R0, 0);
+ jit_sti_ul (&ip, JIT_R0);
emit_interrupt_check (JIT_NOREG);
/* For simplicity, we emit user-defined methods by creating a code_tree
@@ -3326,6 +3331,8 @@ emit_block_prolog (OOP blockOOP,
emit_context_setup (header.numArgs, header.numTemps);
define_ip_map_entry (0);
+ jit_movi_ul (JIT_R0, 0);
+ jit_sti_ul (&ip, JIT_R0);
emit_interrupt_check (JIT_NOREG);
return (false);
- [Help-smalltalk] JIT and Debugger/DebugTools, Holger Hans Peter Freyther, 2013/12/22
- Re: [Help-smalltalk] JIT and Debugger/DebugTools, Holger Hans Peter Freyther, 2013/12/22
- Re: [Help-smalltalk] JIT and Debugger/DebugTools,
Holger Hans Peter Freyther <=
- [Help-smalltalk] [PATCH 1/2] jit: Update _gst_ip correctly when the method_prologue is left, Holger Hans Peter Freyther, 2013/12/23
- [Help-smalltalk] [PATCH 2/2] jit: Resume the method _after_ the interrupt check, Holger Hans Peter Freyther, 2013/12/23
- Re: [Help-smalltalk] [PATCH 2/2] jit: Resume the method _after_ the interrupt check, Holger Hans Peter Freyther, 2013/12/23
- Re: [Help-smalltalk] [PATCH 2/2] jit: Resume the method _after_ the interrupt check, Holger Hans Peter Freyther, 2013/12/23
- Re: [Help-smalltalk] [PATCH 2/2] jit: Resume the method _after_ the interrupt check, Holger Hans Peter Freyther, 2013/12/25