This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add CSRs defined in the recently ratified Smstateen extension
ClosedPublic

Authored by asb on Jan 14 2022, 6:52 AM.

Details

Summary

The "RISC-V State Enable Extension" was ratified at the end of at the
end of last year though hasn't yet been integrated in the main
specification documents (see
https://wiki.riscv.org/display/TECH/Recently+Ratified+Extensions).

This commit adds the CSRs defined by this extension in
https://github.com/riscv/riscv-state-enable/releases/download/v0.6.3/Smstateen.pdf.

Note I've defined the CSRs together in a single foreach loop. This is easiest to read when compared to the Smstateen spec. If/when these CSRs are merged into the tables in the privileged spec, we may want to loop back to match however they are grouped there.

Diff Detail

Event Timeline

asb created this revision.Jan 14 2022, 6:52 AM
asb requested review of this revision.Jan 14 2022, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2022, 6:52 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper added inline comments.Jan 14 2022, 12:25 PM
llvm/lib/Target/RISCV/RISCVSystemOperands.td
365

Is mstateen here twice?

asb updated this revision to Diff 400108.Jan 14 2022, 12:43 PM
asb marked an inline comment as done.

Address review comment.

This revision is now accepted and ready to land.Jan 14 2022, 12:51 PM