From 50b040ef83252730d75463bdeea589294e698532 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 19 Dec 2009 22:40:28 +0100 Subject: win64: add tiny unwind data for setjmp/longjmp This enables native unwind semantics with longjmp on win64 by putting an entry into the .pdata section for each compiled fuction. Also, the function now use a fixed stack and store arguments into X(%rsp) rather than using push. --- i386-asm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'i386-asm.c') diff --git a/i386-asm.c b/i386-asm.c index a378191..075d2ea 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -426,6 +426,10 @@ static void gen_disp32(ExprValue *pe) elimination in the linker */ gen_le32(pe->v + sym->jnext - ind - 4); } else { + if (sym && sym->type.t == VT_VOID) { + sym->type.t = VT_FUNC; + sym->type.ref = NULL; + } gen_addrpc32(VT_SYM, sym, pe->v); } } -- cgit v1.3.1