stage0 printf的格式化统一 展开strdup

This commit is contained in:
zzy
2026-08-19 21:42:06 +08:00
parent c81a57dacb
commit d6113a5417
2 changed files with 8 additions and 5 deletions

View File

@@ -59,14 +59,14 @@ int main(int argc, const char **argv) {
/* annotate jumps / calls */
if (ins->opcode == SPL_JMP || ins->opcode == SPL_BZ || ins->opcode == SPL_BNZ) {
long long target = (long long)i + 1 + (long long)ins->imm;
printf(" ; -> %zd", target);
spl_vm_val_t target = i + 1 + ins->imm;
printf(" ; -> %zu", target);
} else if (ins->opcode == SPL_CALL) {
printf(" ; nargs=%zd, from stack", (long long)ins->imm);
printf(" ; nargs=%zu, from stack", ins->imm);
} else if (ins->opcode == SPL_CALLI) {
printf(" ; indirect call");
} else if (ins->opcode == SPL_GADDR) {
printf(" ; gdata[%zd]", (long long)ins->imm);
printf(" ; gdata[%zu]", ins->imm);
}
printf("\n");
}