This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Add OpenRISC 1000 support
ClosedPublic

Authored by whitequark on Aug 10 2015, 1:11 AM.

Details

Summary

This patch makes no assumptions on ABI past the ABI defined in the OpenRISC 1000 spec except that the DWARF register numbers will be 0-31 for registers r0-r31, which is true for both gcc and clang at the moment.

Diff Detail

Event Timeline

whitequark updated this revision to Diff 31638.Aug 10 2015, 1:11 AM
whitequark retitled this revision from to [libunwind] Add OpenRISC 1000 support.
whitequark updated this object.
whitequark added reviewers: kledzik, rengolin.
whitequark added a subscriber: llvm-commits.

Ping? The change seems straightforward to me. It has been extensively tested in our environment as well.

asl added a subscriber: asl.Aug 27 2015, 12:25 AM
asl added inline comments.
src/Registers.hpp
1742

Any particular reason of having 32 variables instead of a single array?

whitequark added inline comments.Aug 27 2015, 12:35 AM
src/Registers.hpp
1742

The PPC registers, on which I based OR1K, were done like that. I will change it to an array.

whitequark updated this revision to Diff 33515.Aug 29 2015, 7:38 AM

Changed r0..r31 to __r[32].

asl added inline comments.Aug 29 2015, 12:44 PM
src/Registers.hpp
1779

Maybe we can rely on the fact that UNW_OR1K_R0 is 1, and therefore instead of switch do the range check on regNum and return _registers.__r[regNum] ?

emaste added a subscriber: emaste.Aug 30 2015, 6:03 PM

Would you be able to re-upload the diff with full context?

whitequark updated this revision to Diff 33555.Aug 30 2015, 7:32 PM

I've addressed all comments.

asl added inline comments.Aug 30 2015, 10:16 PM
src/Registers.hpp
1785

Minor nit - space after "if". Same in getRegister(). Ok from me with that change.

whitequark accepted this revision.Aug 30 2015, 10:28 PM
whitequark added a reviewer: whitequark.
This revision is now accepted and ready to land.Aug 30 2015, 10:28 PM
whitequark closed this revision.Aug 30 2015, 10:28 PM