[WinEH] Fix funclet prologues with stack realignment
authorReid Kleckner <rnk@google.com>
Thu, 5 Nov 2015 21:09:49 +0000 (21:09 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 5 Nov 2015 21:09:49 +0000 (21:09 +0000)
commit100773aba1086244b13a103005be1c9a63814a99
treedb8a7ea87d34951eeedea35a38c22a6638804bc1
parent981f1796e0c9779bcba0ccdede6c47b75bb96f70
[WinEH] Fix funclet prologues with stack realignment

We already had a test for this for 32-bit SEH catchpads, but those don't
actually create funclets. We had a bug that only appeared in funclet
prologues, where we would establish EBP and ESI as our FP and BP, and
then downstream prologue code would overwrite them.

While I was at it, I fixed Win64+funclets+stackrealign. This issue
doesn't come up as often there due to the ABI requring 16 byte stack
alignment, but now we can rest easy that AVX and WinEH will work well
together =P.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252210 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/WinException.cpp
lib/CodeGen/AsmPrinter/WinException.h
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/cleanuppad-realign.ll [new file with mode: 0644]