From c971a3b4389967c1b545ee17604ce1cf92b9bc5e Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 16:40:41 +0330 Subject: core: an enhancement's ld reads 0 past 2^32 in xexec too (mread took an int), as the jits and the microcore do --- src/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/core.c b/src/core/core.c index 2a0c467..7ffbd02 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -633,7 +633,7 @@ static int unew(int op, int a, int b, int c, Cell imm) u = &ub[un++]; u->op = op; u->d = unv++; u->a = a; u->b = b; u->c = c; u->imm = imm; return u->d; } -static Cell mread(int a) { return (unsigned)a < MW ? m[a] : 0; } +static Cell mread(Cell a) { return (UCell)a < MW ? m[a] : 0; } /* the whole word: an address past 2^32 reads 0, as on the jits and the microcore */ /* recipe text: one statement per line or per ';' r0 = sdiv r0 r1 dst = op operands, operands are rN, parameter names or numbers -- cgit v1.2.3