[WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic
authorReid Kleckner <reid@kleckner.net>
Thu, 11 Jun 2015 22:32:23 +0000 (22:32 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 11 Jun 2015 22:32:23 +0000 (22:32 +0000)
commit3e16bd3aaf5055ea94d9068210e98ae5ed4da78b
tree7ae6e91fc42272be8d6e6c5fd347aa40d1663637
parent5e9819c5bdb37d90a7b3196ea77034e60d2609c3
[WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic

This intrinsic is like framerecover plus a load. It recovers the EH
registration stack allocation from the parent frame and loads the
exception information field out of it, giving back a pointer to an
EXCEPTION_POINTERS struct. It's designed for clang to use in SEH filter
expressions instead of accessing the EXCEPTION_POINTERS parameter that
is available on x64.

This required a minor change to MC to allow defining a label variable to
another absolute framerecover label variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239567 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/WinEHFuncInfo.h
include/llvm/IR/Intrinsics.td
include/llvm/IR/IntrinsicsX86.td
lib/CodeGen/AsmPrinter/WinException.cpp
lib/MC/WinCOFFObjectWriter.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86WinEHState.cpp
test/CodeGen/X86/seh-catch-all-win32.ll [new file with mode: 0644]
test/CodeGen/X86/seh-catch-all.ll
test/CodeGen/X86/seh-safe-div-win32.ll