Support: add Windows ARM EH data structures
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 2 Jun 2014 01:17:49 +0000 (01:17 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 2 Jun 2014 01:17:49 +0000 (01:17 +0000)
commitb327103fdce1abffb33a450169d879614be19665
tree22101432b1acbf53aa97baf3b94a9a0c8b0d6abe
parent7f02e53f5a8d5df68d546c16872caf30eea62d85
Support: add Windows ARM EH data structures

Introduce the support structures necessary to deal with the Windows ARM EH data.
These definitions are extremely aggressive about assertions to aid future use
for generation of the entries and subsequent decoding.

The names for the various fields are meant to reflect the names used by the
Visual Studio toolchain to aid communication.

Due to the complexity in reading a few of the values, there are a couple of
additional utility functions to decode the information.

In general, there are two ways to encode the unwinding information:
- packed, which places the data inline into the
  _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure.
- unpacked, which places the data into auxiliary structures placed into the
  .xdata section.

The set of structures allow reading of data in either encoding, with the minor
caveat that epilogue scopes need to be decoded manually by constructing the
structure from the data returned by the RuntimeFunction structure.

These definitions are meant for read-only access at the current point as the
first use of them will be to decode the exception information.

llvm-svn: 209998
llvm/include/llvm/Support/ARMWinEH.h [new file with mode: 0644]
llvm/lib/Support/ARMWinEH.cpp [new file with mode: 0644]
llvm/lib/Support/CMakeLists.txt