summaryrefslogtreecommitdiff
path: root/src/buildvm_x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x64.h')
-rw-r--r--src/buildvm_x64.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index 76c640da..615b9b82 100644
--- a/src/buildvm_x64.h
+++ b/src/buildvm_x64.h
@@ -2252,6 +2252,51 @@ static void emit_asm_debug(BuildCtx *ctx)
2252 "\t.align " SZPTR "\n" 2252 "\t.align " SZPTR "\n"
2253 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE); 2253 ".LEFDE1:\n\n", (int)ctx->codesz, CFRAME_SIZE);
2254 break; 2254 break;
2255 case BUILD_coffasm:
2256 fprintf(ctx->fp, "\t.section .eh_frame,\"dr\"\n");
2257 fprintf(ctx->fp,
2258 "\t.def %slj_err_unwind_dwarf; .scl 2; .type 32; .endef\n",
2259 LJ_32 ? "_" : "");
2260 fprintf(ctx->fp,
2261 "Lframe1:\n"
2262 "\t.long LECIE1-LSCIE1\n"
2263 "LSCIE1:\n"
2264 "\t.long 0\n"
2265 "\t.byte 0x1\n"
2266 "\t.string \"zP\"\n"
2267 "\t.uleb128 0x1\n"
2268 "\t.sleb128 -" SZPTR "\n"
2269 "\t.byte " REG_RA "\n"
2270 "\t.uleb128 5\n" /* augmentation length */
2271 "\t.byte 0x00\n" /* absptr */
2272 "\t.long %slj_err_unwind_dwarf\n"
2273 "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n"
2274 "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n"
2275 "\t.align " SZPTR "\n"
2276 "LECIE1:\n\n", LJ_32 ? "_" : "");
2277 fprintf(ctx->fp,
2278 "LSFDE1:\n"
2279 "\t.long LEFDE1-LASFDE1\n"
2280 "LASFDE1:\n"
2281 "\t.long LASFDE1-Lframe1\n"
2282 "\t.long %slj_vm_asm_begin\n"
2283 "\t.long %d\n"
2284 "\t.uleb128 0\n" /* augmentation length */
2285 "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */
2286#if LJ_64
2287 "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */
2288 "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */
2289 "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */
2290 "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */
2291#else
2292 "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */
2293 "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */
2294 "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */
2295 "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */
2296#endif
2297 "\t.align " SZPTR "\n"
2298 "LEFDE1:\n\n", LJ_32 ? "_" : "", (int)ctx->codesz, CFRAME_SIZE);
2299 break;
2255 case BUILD_machasm: 2300 case BUILD_machasm:
2256 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n"); 2301 fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n");
2257 fprintf(ctx->fp, 2302 fprintf(ctx->fp,