[PATCH] D55763: [Sparc] Add Sparc V8 support

Saleem Abdulrasool via Phabricator reviews at reviews.llvm.org
Thu Dec 27 12:07:36 PST 2018


compnerd accepted this revision.
compnerd added inline comments.
This revision is now accepted and ready to land.


================
Comment at: src/DwarfParser.hpp:701
+
+      _LIBUNWIND_TRACE_DWARF("DW_CFA_window_save()\n");
+      break;
----------------
Could you put this before the execution of the op please?


================
Comment at: src/Registers.hpp:3339
+  void      setSP(uint32_t value) { _registers.__regs[UNW_SPARC_O6] = value; }
+  uint64_t  getIP() const         { return _registers.__regs[UNW_SPARC_O7]; }
+  void      setIP(uint32_t value) { _registers.__regs[UNW_SPARC_O7] = value; }
----------------
I guess as long as we don't care about async exceptions where the `%o7` is being twiddled around for a `call` or being used as a temporary, this should be okay (IIRC, `%o7` needs to be saved before `call` on SPARC).


================
Comment at: src/Registers.hpp:3374
+inline uint32_t Registers_sparc::getRegister(int regNum) const {
+
+  if ((UNW_SPARC_G0 <= regNum) && (regNum <= UNW_SPARC_I7)) {
----------------
Spurious empty line.


================
Comment at: src/Registers.hpp:3389
+inline void Registers_sparc::setRegister(int regNum, uint32_t value) {
+
+  if ((UNW_SPARC_G0 <= regNum) && (regNum <= UNW_SPARC_I7)) {
----------------
Spurious empty line


================
Comment at: src/UnwindRegistersRestore.S:1023
+  jmp %o7
+   nop
+
----------------
Indentation is off


================
Comment at: src/UnwindRegistersSave.S:974
+  jmp %o7
+   clr %o0                   // return UNW_ESUCCESS
+#endif
----------------
Indentation is off


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

https://reviews.llvm.org/D55763





More information about the libcxx-commits mailing list