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 ba8fbcba..ef5f7fb9 100644
--- a/src/host/buildvm.c
+++ b/src/host/buildvm.c
@@ -314,20 +314,20 @@ static void emit_vmdef(BuildCtx *ctx)
314 char buf[80]; 314 char buf[80];
315 int i; 315 int i;
316 fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); 316 fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n");
317 fprintf(ctx->fp, "module(...)\n\n"); 317 fprintf(ctx->fp, "return {\n\n");
318 318
319 fprintf(ctx->fp, "bcnames = \""); 319 fprintf(ctx->fp, "bcnames = \"");
320 for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]); 320 for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]);
321 fprintf(ctx->fp, "\"\n\n"); 321 fprintf(ctx->fp, "\",\n\n");
322 322
323 fprintf(ctx->fp, "irnames = \""); 323 fprintf(ctx->fp, "irnames = \"");
324 for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]); 324 for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]);
325 fprintf(ctx->fp, "\"\n\n"); 325 fprintf(ctx->fp, "\",\n\n");
326 326
327 fprintf(ctx->fp, "irfpm = { [0]="); 327 fprintf(ctx->fp, "irfpm = { [0]=");
328 for (i = 0; irfpm_names[i]; i++) 328 for (i = 0; irfpm_names[i]; i++)
329 fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i])); 329 fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i]));
330 fprintf(ctx->fp, "}\n\n"); 330 fprintf(ctx->fp, "},\n\n");
331 331
332 fprintf(ctx->fp, "irfield = { [0]="); 332 fprintf(ctx->fp, "irfield = { [0]=");
333 for (i = 0; irfield_names[i]; i++) { 333 for (i = 0; irfield_names[i]; i++) {
@@ -337,17 +337,17 @@ static void emit_vmdef(BuildCtx *ctx)
337 if (p) *p = '.'; 337 if (p) *p = '.';
338 fprintf(ctx->fp, "\"%s\", ", buf); 338 fprintf(ctx->fp, "\"%s\", ", buf);
339 } 339 }
340 fprintf(ctx->fp, "}\n\n"); 340 fprintf(ctx->fp, "},\n\n");
341 341
342 fprintf(ctx->fp, "ircall = {\n[0]="); 342 fprintf(ctx->fp, "ircall = {\n[0]=");
343 for (i = 0; ircall_names[i]; i++) 343 for (i = 0; ircall_names[i]; i++)
344 fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]); 344 fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]);
345 fprintf(ctx->fp, "}\n\n"); 345 fprintf(ctx->fp, "},\n\n");
346 346
347 fprintf(ctx->fp, "traceerr = {\n[0]="); 347 fprintf(ctx->fp, "traceerr = {\n[0]=");
348 for (i = 0; trace_errors[i]; i++) 348 for (i = 0; trace_errors[i]; i++)
349 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); 349 fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]);
350 fprintf(ctx->fp, "}\n\n"); 350 fprintf(ctx->fp, "},\n\n");
351} 351}
352 352
353/* -- Argument parsing ---------------------------------------------------- */ 353/* -- Argument parsing ---------------------------------------------------- */
@@ -484,6 +484,7 @@ int main(int argc, char **argv)
484 case BUILD_vmdef: 484 case BUILD_vmdef:
485 emit_vmdef(ctx); 485 emit_vmdef(ctx);
486 emit_lib(ctx); 486 emit_lib(ctx);
487 fprintf(ctx->fp, "}\n\n");
487 break; 488 break;
488 case BUILD_ffdef: 489 case BUILD_ffdef:
489 case BUILD_libdef: 490 case BUILD_libdef: