This is a merge of upstream LLVM libunwind to upstream trunk r351319,
which is just before the release_80 branch was created. After this
merge goes in, I will merge the latest release_80 changes, which are
pretty minor.
I have attempted to keep all the custom changes for riscv support, and
any discrepancies I found for mips support.
For mips, I specifically noticed different cursor sizes, e.g. ours has:
# if defined(_ABIO32) && _MIPS_SIM == _ABIO32 # define _LIBUNWIND_TARGET_MIPS_O32 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 50 # define _LIBUNWIND_CURSOR_SIZE 61 # else # define _LIBUNWIND_CONTEXT_SIZE 18 # define _LIBUNWIND_CURSOR_SIZE 29 # endif # elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 67 # define _LIBUNWIND_CURSOR_SIZE 78 # else # define _LIBUNWIND_CONTEXT_SIZE 35 # define _LIBUNWIND_CURSOR_SIZE 46 # endif # elif defined(_ABI64) && _MIPS_SIM == _ABI64 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 67 # define _LIBUNWIND_CURSOR_SIZE 79 # else # define _LIBUNWIND_CONTEXT_SIZE 35 # define _LIBUNWIND_CURSOR_SIZE 47 # endif
while upstream has:
# if defined(_ABIO32) && _MIPS_SIM == _ABIO32 # define _LIBUNWIND_TARGET_MIPS_O32 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 50 # define _LIBUNWIND_CURSOR_SIZE 57 # else # define _LIBUNWIND_CONTEXT_SIZE 18 # define _LIBUNWIND_CURSOR_SIZE 24 # endif # elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 67 # define _LIBUNWIND_CURSOR_SIZE 74 # else # define _LIBUNWIND_CONTEXT_SIZE 35 # define _LIBUNWIND_CURSOR_SIZE 42 # endif # elif defined(_ABI64) && _MIPS_SIM == _ABI64 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # if defined(__mips_hard_float) # define _LIBUNWIND_CONTEXT_SIZE 67 # define _LIBUNWIND_CURSOR_SIZE 79 # else # define _LIBUNWIND_CONTEXT_SIZE 35 # define _LIBUNWIND_CURSOR_SIZE 47 # endif
E.g. most cursor sizes are 4 bytes smaller, and in case of _ABIO32 and
!__mips_hard_float it's even 5 bytes. Somebody with mips-fu should be
able to tell what is correct.