[libcxx-commits] [PATCH] D116857: [libunwind] [sparc] Add SPARCv9 support
Koakuma via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 31 19:21:18 PST 2022
koakuma added a comment.
In D116857#3285773 <https://reviews.llvm.org/D116857#3285773>, @MaskRay wrote:
> Would it be clearer to have `_LIBUNWIND_TARGET_SPARC32` and `_LIBUNWIND_TARGET_SPARC64` to indicate 32-bit and 64-bit variants?
>
> You can define `_LIBUNWIND_TARGET_SPARC` to mean either variant.
>From what I see in other parts of LLVM, `SPARC` is also generally taken to mean the 32-bit variant of the architecture. Would it be okay to change it here?
In any case, though, I feel like it's better to be done in another changeset if it's really needed to be changed.
================
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;
----------------
MaskRay wrote:
> https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
This one's also doing an early return in addition to setting the value, so I don't think I can remove the braces here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116857/new/
https://reviews.llvm.org/D116857
More information about the libcxx-commits
mailing list