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

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 31 18:54:48 PST 2022


MaskRay added a comment.

Would it be possible to simplify `defined(_LIBUNWIND_TARGET_SPARC) || defined(_LIBUNWIND_TARGET_SPARC64)` with `defined(_LIBUNWIND_TARGET_SPARC)` and let `_LIBUNWIND_TARGET_SPARC` mean either the 32-bit or 64-bit variant.



================
Comment at: libunwind/src/DwarfInstructions.hpp:87
+  case CFI_Parser<A>::kRegisterInCFADecrypt: // sparc64 specific
+    return addressSpace.getP(cfa + (pint_t)savedReg.value) ^
+           registers.getWCookie();
----------------
Perhaps guard the getWCookie() usage with the sparc macro here so that other targets don't have to define `getWCookie`. The comment can then be moved here.

Then you may remove ` // sparc64 specific`.


================
Comment at: libunwind/src/Registers.hpp:3666
+
+inline Registers_sparc64::Registers_sparc64() {
+  _wcookie = 0;
----------------
Delete the ctor. `_wcookie` has been initialized.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116857/new/

https://reviews.llvm.org/D116857



More information about the libcxx-commits mailing list