[WinEH] Ensure that funclets obey the x64 ABI
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 29 Sep 2015 22:33:36 +0000 (22:33 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 29 Sep 2015 22:33:36 +0000 (22:33 +0000)
commit28c61f88cc67ea857234e9bcd334a61b7a3ac228
treeb730ba761d782cff1d01cc85ce84c8e6a2c6e83e
parentc96f87a89298932b0f4f3187a4270f558c48898a
[WinEH] Ensure that funclets obey the x64 ABI

The x64 ABI requires that epilogues do not contain code other than stack
adjustments and some limited control flow.  However, we'd insert code to
initialize the return address after stack adjustments.  Instead, insert
EAX/RAX with the current value before we create the stack adjustments in
the epilogue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248839 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ExpandPseudo.cpp
lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/X86/win-catchpad-csrs.ll
test/CodeGen/X86/win-catchpad.ll
test/CodeGen/X86/win-funclet-cfi.ll