[PATCH] SEH exceptions on Win64 (LLVM)

Vadim Chugunov vadimcn at gmail.com
Mon Apr 28 18:23:44 PDT 2014


@nrieck, you've said above "I believe it's not necessary to change the prologue emission for Win64".  However I don't see how would one express  'and ..., %rsp' with SEH unwind instructions, because the effective RSP offset here is not a compile-time constant.

As far as I understand, DWARF unwind info does not care about the exact number of bytes added to RSP, as long as it can compute the CFA, because that's where RSP is restored from.
SEH, on the other hand, wants to keep track of RSP offset at all times, so the MSVC way of realigning stack seems to be the only way possible.
An extra wrinkle here is that LLVM continues to use RSP for addressing stack variables, even though it had just established frame with RBP.   Seems like a bunch of codegen will need to change if we start re-aligning RBP instead.   

Am I missing something here?

(the asm code I am referring to is in http://llvm.org/bugs/show_bug.cgi?id=16779)

http://reviews.llvm.org/D3418






More information about the llvm-commits mailing list