From 7c54e48bca711a6596be4bb17fcaa4330b9928e3 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 15:52:01 +0330 Subject: line tables and backtraces: port agent/line-tables onto main, op 56 on the x86-64 jit, docs, measurements, tests; default genome reservation 0x68000 --- src/core/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') 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; -- cgit v1.2.3