[libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (#66549)

`unw_getcontext` saves the caller's registers in the context. However,
if the caller of `unw_getcontext` is in a different module, the glue
code of `unw_getcontext` sets the TOC register (r2) with the new TOC
base and saves the original TOC register value in the stack frame. This
causes the incorrect TOC value is used when the caller steps up frames,
which fails libunwind LIT test case `unw_resume.pass.cpp`. This PR fixes
the problem by using the original TOC register value saved in the stack
if the caller is in a different module and enables `unw_resume.pass.cpp`
on AIX.

GitOrigin-RevId: e25cd088a642d270c688611b85e22bc83f32f48e
2 files changed
tree: 5eb8693404d1a8ba84eb21c4ea688b3fd3ec6b55
  1. cmake/
  2. docs/
  3. include/
  4. src/
  5. test/
  6. .clang-format
  7. CMakeLists.txt
  8. LICENSE.TXT