[all-commits] [llvm/llvm-project] e524da: [libunwind] Convert x86, x86_64, arm64 register re...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Aug 26 04:33:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e524daa7e8719f4b43e6ebcf25fd4e7d74c5d1c4
      https://github.com/llvm/llvm-project/commit/e524daa7e8719f4b43e6ebcf25fd4e7d74c5d1c4
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

  Changed paths:
    M libunwind/src/Registers.hpp
    M libunwind/src/UnwindRegistersRestore.S

  Log Message:
  -----------
  [libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling

Currently, the assembly functions for restoring register state have
been direct implementations of the Registers_*::jumpto() method
(contrary to the functions for saving register state, which are
implementations of the extern C function __unw_getcontext). This has
included having the assembly function name match the C++ mangling of
that method name (and having the function match the C++ member
function calling convention). To simplify the interface of the assembly
implementations, make the functions have C calling conventions and
name mangling.

This fixes building the library in with a MSVC C++ ABI with clang-cl,
which uses a significantly different method name mangling scheme.
(The library might not be of much use as C++ exception unwinder in such
an environment, but the libunwind.h interface for stepwise unwinding
still is usable, as is the _Unwind_Backtrace function.)

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




More information about the All-commits mailing list