Patch by Martell Malone, based on Kai Nacke patch from http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC
See http://reviews.llvm.org/differential/revision/edit/3419/ for the clang part of the patch.
Differential D3418
SEH exceptions on Win64 (LLVM) yaron.keren on Apr 18 2014, 12:58 AM. Authored by
Details Patch by Martell Malone, based on Kai Nacke patch from http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC See http://reviews.llvm.org/differential/revision/edit/3419/ for the clang part of the patch.
Diff Detail Event TimelineComment Actions Nico Reick comment from e-mail thread: Unwind emission still suffers from the same problems that the old code static const MachineInstr *getPrevNode(const MachineInstr *MI) { if (&*MI->getParent()->instr_begin() == MI) return nullptr; return MI->getPrevNode(); } Some small nits:
Spacing. Also, a comment clarifying that scale/index/segment must be + if (MI->getNextNode()) { I'd simplify this and just skip over all CFI instructions. If there's
This check should really differentiate between MSVC and Mingw. You can Overall this needs more tests covering __chkstk, alloca, manual Comment Actions if (is64Bit && Triple.isWindowsGNUEnvironment()) Comment Actions Ping... It's been a week since anything happened on this review. Is there any action that can be taken to un-stall this? Chandler, did Kai address your concern regarding patch authorship? Comment Actions First, reviews are sometimes slow, sorry. This isn't something I can easily It also still has the problems that I mentioned about any of the patches Comment Actions There's been much back-and-forth on the mailing list thread, so I am no longer sure which problems absolutely need to be fixed, and which were mentioned just in passing. It would be helpful to restate them in one place (here probably). I would really like to see this landing in LLVM master, because some of my work depends on it. If Kai and Martell have their hands full, I'd be happy to take over this patch to address any remaining technical problems with it. Kai, Martell, I assume that's all right with you guys? Finally, I'd like to make sure that we have the right set of people involved in this review. Who owns this area and can give the final go ahead? According to code_owners.txt that would be Anton, right? Comment Actions @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. Am I missing something here? (the asm code I am referring to is in http://llvm.org/bugs/show_bug.cgi?id=16779) Comment Actions @Vadim, Chandler Regarding the authorship of the code, I responded on llvm-dev. The base part of the code is by Charles Davis. I attach the mail communication how I received the code. From my point of view, I got the right to further develop this code. @Vadim Comment Actions @vadimcn: Everyone: |