summaryrefslogtreecommitdiff
path: root/src/buildvm_x86.dasc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x86.dasc')
-rw-r--r--src/buildvm_x86.dasc45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 1878613e..4e4ccc49 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -4920,6 +4920,51 @@ static void emit_asm_debug(BuildCtx *ctx)
4920 "\t.align " SZPTR "\n" 4920 "\t.align " SZPTR "\n"
4921 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE); 4921 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE);
4922 break; 4922 break;
4923 case BUILD_coffasm:
4924 fprintf(ctx->fp, "\t.section .eh_frame,\"dr\"\n");
4925 fprintf(ctx->fp,
4926 "\t.def %slj_err_unwind_dwarf; .scl 2; .type 32; .endef\n",
4927 LJ_32 ? "_" : "");
4928 fprintf(ctx->fp,
4929 "Lframe1:\n"
4930 "\t.long LECIE1-LSCIE1\n"
4931 "LSCIE1:\n"
4932 "\t.long 0\n"
4933 "\t.byte 0x1\n"
4934 "\t.string \"zP\"\n"
4935 "\t.uleb128 0x1\n"
4936 "\t.sleb128 -" SZPTR "\n"
4937 "\t.byte " REG_RA "\n"
4938 "\t.uleb128 5\n" /* augmentation length */
4939 "\t.byte 0x00\n" /* absptr */
4940 "\t.long %slj_err_unwind_dwarf\n"
4941 "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n"
4942 "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n"
4943 "\t.align " SZPTR "\n"
4944 "LECIE1:\n\n", LJ_32 ? "_" : "");
4945 fprintf(ctx->fp,
4946 "LSFDE1:\n"
4947 "\t.long LEFDE1-LASFDE1\n"
4948 "LASFDE1:\n"
4949 "\t.long LASFDE1-Lframe1\n"
4950 "\t.long %slj_vm_asm_begin\n"
4951 "\t.long %d\n"
4952 "\t.uleb128 0\n" /* augmentation length */
4953 "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */
4954#if LJ_64
4955 "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */
4956 "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */
4957 "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */
4958 "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */
4959#else
4960 "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */
4961 "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */
4962 "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */
4963 "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */
4964#endif
4965 "\t.align " SZPTR "\n"
4966 "LEFDE1:\n\n", LJ_32 ? "_" : "", (int)ctx->codesz, CFRAME_SIZE);
4967 break;
4923 case BUILD_machasm: 4968 case BUILD_machasm:
4924 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n"); 4969 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n");
4925 fprintf(ctx->fp, 4970 fprintf(ctx->fp,