aboutsummaryrefslogtreecommitdiff
path: root/src/host/buildvm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/host/buildvm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/host/buildvm.c b/src/host/buildvm.c
index 2ce3b638..ce892006 100644
--- a/src/host/buildvm.c
+++ b/src/host/buildvm.c
@@ -320,20 +320,20 @@ static void emit_vmdef(BuildCtx *ctx)
320 char buf[80]; 320 char buf[80];
321 int i; 321 int i;
322 fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); 322 fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n");
323 fprintf(ctx->fp, "module(...)\n\n"); 323 fprintf(ctx->fp, "return {\n\n");
324 324
325 fprintf(ctx->fp, "bcnames = \""); 325 fprintf(ctx->fp, "bcnames = \"");
326 for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]); 326 for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]);
327 fprintf(ctx->fp, "\"\n\n"); 327 fprintf(ctx->fp, "\",\n\n");
328 328
329 fprintf(ctx->fp, "irnames = \""); 329 fprintf(ctx->fp, "irnames = \"");
330 for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]); 330 for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]);
331 fprintf(ctx->fp, "\"\n\n"); 331 fprintf(ctx->fp, "\",\n\n");
332 332
333 fprintf(ctx->fp, "irfpm = { [0]="); 333 fprintf(ctx->fp, "irfpm = { [0]=");
334 for (i = 0; irfpm_names[i]; i++) 334 for (i = 0; irfpm_names[i]; i++)
335 fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i])); 335 fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i]));
336 fprintf(ctx->fp, "}\n\n"); 336 fprintf(ctx->fp, "},\n\n");
337 337
338 fprintf(ctx->fp, "irfield = { [0]="); 338 fprintf(ctx->fp, "irfield = { [0]=");
339 for (i = 0; irfield_names[i]; i++) { 339 for (i = 0; irfield_names[i]; i++) {
@@ -343,17 +343,17 @@ static void emit_vmdef(BuildCtx *ctx)
343 if (p) *p = '.'; 343 if (p) *p = '.';
344 fprintf(ctx->fp, "\"%s\", ", buf); 344 fprintf(ctx->fp, "\"%s\", ", buf);
345 } 345 }
346 fprintf(ctx->fp, "}\n\n"); 346 fprintf(ctx->fp, "},\n\n");
347 347
348 fprintf(ctx->fp, "ircall = {\n[0]="); 348 fprintf(ctx->fp, "ircall = {\n[0]=");
349 for (i = 0; ircall_names[i]; i++) 349 for (i = 0; ircall_names[i]; i++)
350 fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]); 350 fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]);
351 fprintf(ctx->fp, "}\n\n"); 351 fprintf(ctx->fp, "},\n\n");
352 352
353 fprintf(ctx->fp, "traceerr = {\n[0]="); 353 fprintf(ctx->fp, "traceerr = {\n[0]=");
354 for (i = 0; trace_errors[i]; i++) 354 for (i = 0; trace_errors[i]; i++)
355 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); 355 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]);
356 fprintf(ctx->fp, "}\n\n"); 356 fprintf(ctx->fp, "},\n\n");
357} 357}
358 358
359/* -- Argument parsing ---------------------------------------------------- */ 359/* -- Argument parsing ---------------------------------------------------- */
@@ -490,6 +490,7 @@ int main(int argc, char **argv)
490 case BUILD_vmdef: 490 case BUILD_vmdef:
491 emit_vmdef(ctx); 491 emit_vmdef(ctx);
492 emit_lib(ctx); 492 emit_lib(ctx);
493 fprintf(ctx->fp, "}\n\n");
493 break; 494 break;
494 case BUILD_ffdef: 495 case BUILD_ffdef:
495 case BUILD_libdef: 496 case BUILD_libdef: