summaryrefslogtreecommitdiff
path: root/src/buildvm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/buildvm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/buildvm.c b/src/buildvm.c
index 44fd2c71..dd0cbcc6 100644
--- a/src/buildvm.c
+++ b/src/buildvm.c
@@ -256,12 +256,12 @@ static void emit_bcdef(BuildCtx *ctx)
256{ 256{
257 int i; 257 int i;
258 fprintf(ctx->fp, "/* This is a generated file. DO NOT EDIT! */\n\n"); 258 fprintf(ctx->fp, "/* This is a generated file. DO NOT EDIT! */\n\n");
259 fprintf(ctx->fp, "LJ_DATADEF const uint16_t lj_bc_ofs[BC__MAX+1] = {\n "); 259 fprintf(ctx->fp, "LJ_DATADEF const uint16_t lj_bc_ofs[] = {\n");
260 for (i = 0; i < ctx->npc; i++) { 260 for (i = 0; i < ctx->npc; i++) {
261 fprintf(ctx->fp, " %4d,", ctx->sym_ofs[i]); 261 if (i != 0)
262 if ((i & 7) == 7) fprintf(ctx->fp, "\n "); 262 fprintf(ctx->fp, ",\n");
263 fprintf(ctx->fp, "%d", ctx->sym_ofs[i]);
263 } 264 }
264 fprintf(ctx->fp, " 0\n};\n\n");
265} 265}
266 266
267/* Emit VM definitions as Lua code for debug modules. */ 267/* Emit VM definitions as Lua code for debug modules. */
@@ -433,10 +433,12 @@ int main(int argc, char **argv)
433 break; 433 break;
434 case BUILD_bcdef: 434 case BUILD_bcdef:
435 emit_bcdef(ctx); 435 emit_bcdef(ctx);
436 emit_lib(ctx);
436 break; 437 break;
437 case BUILD_vmdef: 438 case BUILD_vmdef:
438 emit_vmdef(ctx); 439 emit_vmdef(ctx);
439 /* fallthrough */ 440 emit_lib(ctx);
441 break;
440 case BUILD_ffdef: 442 case BUILD_ffdef:
441 case BUILD_libdef: 443 case BUILD_libdef:
442 case BUILD_recdef: 444 case BUILD_recdef: