stage1 vm abi更新 修复更多问题

This commit is contained in:
zzy committed 2026-09-16 10:35:36 +08:00
1 parent 09d05e3a34
commit f6a0bce9f0
6 files changed
+124 -60

No files matched your search

+6 -3
View File
@@ -175,11 +175,14 @@ static isize parse_int_literal(const spl_tok_t *t) {
buf[j++] = t->lexeme[i];
}
buf[j] = 0;
/* 字面量按无符号位模式解析,以容纳完整的 u64 值域 */
if (j >= 3 && buf[0] == '0' && (buf[1] == 'b' || buf[1] == 'B'))
return (isize)strtoll(buf + 2, NULL, 2);
return (isize)strtoull(buf + 2, NULL, 2);
if (j >= 3 && buf[0] == '0' && (buf[1] == 'o' || buf[1] == 'O'))
return (isize)strtoll(buf + 2, NULL, 8);
return (isize)strtoll(buf, NULL, 0);
return (isize)strtoull(buf + 2, NULL, 8);
if (j >= 3 && buf[0] == '0' && (buf[1] == 'x' || buf[1] == 'X'))
return (isize)strtoull(buf, NULL, 16);
return (isize)strtoull(buf, NULL, 10);
}
static double parse_float_literal(const spl_tok_t *t) {