[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 15:17:30 PST 2022
MaskRay added inline comments.
================
Comment at: libunwind/src/DwarfInstructions.hpp:86
+ case CFI_Parser<A>::kRegisterInCFADecrypt:
+ return addressSpace.getP(cfa + (pint_t)savedReg.value) ^
----------------
// Sparc-specific.
================
Comment at: libunwind/src/Registers.hpp:91
void setEDI(uint32_t value) { _registers.__edi = value; }
+ uint32_t getWCookie() const { return 0; }
----------------
// The Sparc-specific kRegisterInCFADecrypt uses getCookie. We define getWCookie to a dummy value for other targets.
================
Comment at: libunwind/src/Registers.hpp:3633
+
+ sparc64_thread_state_t _registers;
+ uint64_t _wcookie;
----------------
================
Comment at: libunwind/src/Registers.hpp:3634
+ sparc64_thread_state_t _registers;
+ uint64_t _wcookie;
+};
----------------
================
Comment at: libunwind/src/Registers.hpp:3647
+inline Registers_sparc64::Registers_sparc64() {
+ memset(&_registers, 0, sizeof(_registers));
+ _wcookie = 0;
----------------
Remove
================
Comment at: libunwind/src/Registers.hpp:3664
+inline uint64_t Registers_sparc64::getRegister(int regNum) const {
+ if (regNum >= UNW_SPARC_G0 && regNum <= UNW_SPARC_I7) {
+ return _registers.__regs[regNum];
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
2-space indentation
================
Comment at: libunwind/src/Registers.hpp:3678
+inline void Registers_sparc64::setRegister(int regNum, uint64_t value) {
+ if (regNum >= UNW_SPARC_G0 && regNum <= UNW_SPARC_I7) {
+ _registers.__regs[regNum] = value;
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116857/new/
https://reviews.llvm.org/D116857
More information about the libcxx-commits
mailing list