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