Move bytecode offsets from lj_vm.* to generated header.

This commit is contained in:
Mike Pall
2010-02-05 20:15:01 +01:00
parent a0914c409b
commit c4dadf1d67
11 changed files with 49 additions and 62 deletions

View File

@@ -193,26 +193,6 @@ void emit_asm(BuildCtx *ctx)
pi = ni;
}
switch (ctx->mode) {
case BUILD_elfasm:
fprintf(ctx->fp, "\n\t.section .rodata\n");
break;
case BUILD_coffasm:
fprintf(ctx->fp, "\n\t.section .rdata,\"dr\"\n");
break;
case BUILD_machasm:
fprintf(ctx->fp, "\n\t.const\n");
break;
default:
break;
}
emit_asm_align(ctx, 5);
sprintf(name, "%s" LABEL_OP_OFS, symprefix);
emit_asm_label(ctx, name, 2*ctx->npc, 0);
for (i = 0; i < ctx->npc; i++)
fprintf(ctx->fp, "\t.short %d\n", ctx->sym_ofs[i]);
fprintf(ctx->fp, "\n");
switch (ctx->mode) {
case BUILD_elfasm: