[libcxx-commits] [PATCH] D100132: [libunwind][AIX] implementation of the unwinder for AIX
Saleem Abdulrasool via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 31 09:43:13 PST 2022
compnerd added inline comments.
================
Comment at: libunwind/include/__libunwind_config.h:65
# define _LIBUNWIND_CURSOR_SIZE 124
+#endif
# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC
----------------
Should we consider just padding on clang instead of having a 1-entry difference on clang and gcc?
================
Comment at: libunwind/src/Registers.hpp:611
void setIP(uint32_t value) { _registers.__srr0 = value; }
+ uint64_t getCR() const { return _registers.__cr; }
+ void setCR(uint32_t value) { _registers.__cr = value; }
----------------
xingxue wrote:
> cebowleratibm wrote:
> > formatting is not consistent with surrounding code.
> This is from the `git-clang-format`.
Please prefer the surrounding area's formatting rather than `git-clang-format`.
================
Comment at: libunwind/src/Registers.hpp:1179
void setIP(uint64_t value) { _registers.__srr0 = value; }
+ uint64_t getCR() const { return _registers.__cr; }
+ void setCR(uint64_t value) { _registers.__cr = value; }
----------------
xingxue wrote:
> cebowleratibm wrote:
> > formatting is not consistent with surrounding code.
> This is from `git-clang-format`.
Similar.
================
Comment at: libunwind/src/UnwindCursor.hpp:1229
+ return stepWithTBTable((pint_t)this->getReg(UNW_REG_IP),
+ (tbtable *)_info.unwind_info, _registers,
+ _isSignalFrame);
----------------
Prefer a C++ style cast - `reinterpret_cast<tbtable *>(_info.unwind_info)`.
================
Comment at: libunwind/src/UnwindCursor.hpp:1308
+uintptr_t UnwindCursor<A, R>::getDataRelBase() {
+ return (uintptr_t)_info.extra;
+}
----------------
Please prefer a C++style cast: `reinterpret_cast<uintptr_t>(_info.extra);`.
================
Comment at: libunwind/src/UnwindCursor.hpp:1968
+bool UnwindCursor<A, R>::getInfoFromTBTable(pint_t pc, R ®isters) {
+ uint32_t *p = (uint32_t *)pc;
+
----------------
C++ style casts please and throughout this change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100132/new/
https://reviews.llvm.org/D100132
More information about the libcxx-commits
mailing list