diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core.c | 5 |
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; |
