libunwind: fix X86 register numbers for FreeBSD/i386
authorEd Maste <emaste@freebsd.org>
Tue, 30 Aug 2016 15:10:08 +0000 (15:10 +0000)
committerEd Maste <emaste@freebsd.org>
Tue, 30 Aug 2016 15:10:08 +0000 (15:10 +0000)
commitb0abba5c329a4a8c8349c8945cf31ba5e9fe4675
treea708a6c5b65a352a33baf8eec0d7eeec0a3832ce
parenta016a45d60ae5940b360b24880f8c271f03ae359
libunwind: fix X86 register numbers for FreeBSD/i386

For historical reasons i386 has ebp and esp swapped in the eh_frame
register numbering on at least Darwin.  That is:

                 Darwin      FreeBSD
        Reg #    eh_frame    eh_frame    DWARF
        =====    ========    ========    =====
          4        ebp         esp        esp
          5        esp         ebp        ebp

Although the UNW_X86_* constants are not intended to be coupled with
DWARF / eh_frame numbering they are currently conflated in libunwind.

Differential Revision: https://reviews.llvm.org/D22508

llvm-svn: 280099
libunwind/include/libunwind.h