diff options
| author | 2026-10-14 16:40:41 +0330 | |
|---|---|---|
| committer | 2026-10-14 16:40:41 +0330 | |
| commit | c971a3b4389967c1b545ee17604ce1cf92b9bc5e (patch) | |
| tree | d4bf8bad8a7fc238a9c52778875d64c7dfa2f07b /src/core/core.c | |
| parent | test: a constant loop bound drops the fixed-array bounds check (bounds_proof) (diff) | |
core: an enhancement's ld reads 0 past 2^32 in xexec too (mread took an int), as the jits and the microcore do
Diffstat (limited to 'src/core/core.c')
| -rw-r--r-- | src/core/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
