aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.c
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:04 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:04 +0330
commit0879d0a42d137054057cd2a1e37437e6be78ed0b (patch)
treefcb16d3185c1f80fae8d54cd9062bd68d6c0c88d /src/core/core.c
parentmerge spec conformance suite (diff)
parentmerge main into work/line-tables (diff)
merge line tables
Diffstat (limited to 'src/core/core.c')
-rw-r--r--src/core/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/core.c b/src/core/core.c
index b571981..2a0c467 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -293,6 +293,7 @@ static Cell hostcall(Cell op, Cell a, Cell b, Cell c)
#else
return -1;
#endif
+ case 56: return cb_r; /* the return stack pointer as of the gate store: the word after the top return address */
case 1:
if (zcstr(a, path, 1024) < 0) return -1;
if (b == 1) return open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
@@ -3608,7 +3609,9 @@ static void syncicache(JW *a, JW *b)
#endif
}
-/* store hook for words that are covered by a translation */
+/* store hook for words that are covered by a translation. both jits reach it with s and r
+ published in S[1] and S[2] (the x86-64 jit's emit_store calls publish_stacks first), so a
+ gate store sees the exact stacks: cb_r is what op 56 returns to rt.trace() */
static int hook(Cell a, Cell v)
{
int j, hit = 0;