summaryrefslogtreecommitdiff
path: root/src/buildvm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x86.h')
-rw-r--r--src/buildvm_x86.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 68f27f93..e98d2622 100644
--- a/src/buildvm_x86.h
+++ b/src/buildvm_x86.h
@@ -2403,6 +2403,51 @@ static void emit_asm_debug(BuildCtx *ctx)
2403 "\t.align " SZPTR "\n" 2403 "\t.align " SZPTR "\n"
2404 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE); 2404 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE);
2405 break; 2405 break;
2406 case BUILD_coffasm:
2407 fprintf(ctx->fp, "\t.section .eh_frame,\"dr\"\n");
2408 fprintf(ctx->fp,
2409 "\t.def %slj_err_unwind_dwarf; .scl 2; .type 32; .endef\n",
2410 LJ_32 ? "_" : "");
2411 fprintf(ctx->fp,
2412 "Lframe1:\n"
2413 "\t.long LECIE1-LSCIE1\n"
2414 "LSCIE1:\n"
2415 "\t.long 0\n"
2416 "\t.byte 0x1\n"
2417 "\t.string \"zP\"\n"
2418 "\t.uleb128 0x1\n"
2419 "\t.sleb128 -" SZPTR "\n"
2420 "\t.byte " REG_RA "\n"
2421 "\t.uleb128 5\n" /* augmentation length */
2422 "\t.byte 0x00\n" /* absptr */
2423 "\t.long %slj_err_unwind_dwarf\n"
2424 "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n"
2425 "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n"
2426 "\t.align " SZPTR "\n"
2427 "LECIE1:\n\n", LJ_32 ? "_" : "");
2428 fprintf(ctx->fp,
2429 "LSFDE1:\n"
2430 "\t.long LEFDE1-LASFDE1\n"
2431 "LASFDE1:\n"
2432 "\t.long LASFDE1-Lframe1\n"
2433 "\t.long %slj_vm_asm_begin\n"
2434 "\t.long %d\n"
2435 "\t.uleb128 0\n" /* augmentation length */
2436 "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */
2437#if LJ_64
2438 "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */
2439 "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */
2440 "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */
2441 "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */
2442#else
2443 "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */
2444 "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */
2445 "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */
2446 "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */
2447#endif
2448 "\t.align " SZPTR "\n"
2449 "LEFDE1:\n\n", LJ_32 ? "_" : "", (int)ctx->codesz, CFRAME_SIZE);
2450 break;
2406 case BUILD_machasm: 2451 case BUILD_machasm:
2407 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n"); 2452 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n");
2408 fprintf(ctx->fp, 2453 fprintf(ctx->fp,