[libcxx-commits] [PATCH] D116857: [libunwind] [sparc] Add SPARCv9 support

Koakuma via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 8 00:16:14 PST 2022


koakuma created this revision.
koakuma added reviewers: venkatra, LemonBoy.
Herald added subscribers: libcxx-commits, fedor.sergeev, krytarowski, jyknight.
Herald added a project: libunwind.
Herald added a reviewer: libunwind.
koakuma requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Adds libunwind support for SPARCv9 (aka sparc64). This is a rebase of @kettenis' patch D32450 <https://reviews.llvm.org/D32450>, which I created (with his permission) because the original review has become inactive.
The changes are of a cosmetic nature to make it fit better with the new code style, and to reuse the existing SPARCv8 code, whenever possible.

Please let me know if I posted this on the wrong place. Also, the summary of the original review is reproduced below:

> This adds unwinder support for 64-bit SPARC (aka SPARCv9). The implementation was done on OpenBSD/sparc64, so it takes StackGhost into account:
>
> https://www.usenix.org/legacy/publications/library/proceedings/sec01/full_papers/frantzen/frantzen_html/index.html
>
> Since StackGhost xor's return addresses with a random cookie before storing them on the stack, the unwinder has to do some extra work to recover those. This is done by introducing a new kRegisterInCFADecrypt "location" type that is used to implement the DW_CFA_GNU_window_save opcode. That implementation is SPARC-specific, but should work for 32-bit SPARC as well. DW_CFA_GNU_window_save is only ever generated on SPARC as far as I know.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116857

Files:
  libunwind/include/__libunwind_config.h
  libunwind/src/DwarfInstructions.hpp
  libunwind/src/DwarfParser.hpp
  libunwind/src/Registers.hpp
  libunwind/src/UnwindCursor.hpp
  libunwind/src/UnwindRegistersRestore.S
  libunwind/src/UnwindRegistersSave.S
  libunwind/src/libunwind.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116857.398317.patch
Type: text/x-patch
Size: 19234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220108/47b1952a/attachment-0001.bin>


More information about the libcxx-commits mailing list