Merging r292723:
------------------------------------------------------------------------
r292723 | compnerd | 2017-01-21 08:22:59 -0800 (Sat, 21 Jan 2017) | 17 lines

X86: swap EBP, ESP on !APPLE

Restore the `libunwind.h` enumeration values back to the inverted
values.  This diverges from the DWARF definition of the register values.
However, this allows our header to be compatible with other unwind
implementations (e.g. HP, GNU Savannah, GCC).

The register IDs are only swapped in the header and need to be unswapped
when accessing the unwind register file.  The flipped EBP and ESP only
applies on non-Apple x86 targets.

When optimizations were enabled, EBP and ESP would no longer be
equivalent.  As a result, the incorrect access on Linux would manifest
as a failure to unwind the stack.  We can now unwind the stack with and
without FPO on Linux x86.

Resolves PR30879!
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libunwind/branches/release_40@293298 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed
tree: 66e9659f71c8560a00474e174e9c9bd33ed1c3ca
  1. cmake/
  2. include/
  3. src/
  4. test/
  5. .arcconfig
  6. .clang-format
  7. CMakeLists.txt