[PATCH] D151898: [RISCV] Guard Advance Interrupt Architecture CSRs with Smaia and Ssaia extensions.

garvit gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 02:19:03 PDT 2023


garvitgupta08 added a comment.

In D151898#4388317 <https://reviews.llvm.org/D151898#4388317>, @jrtc27 wrote:

> I don't think we want to do this. There's precedent for making all CSRs always visible, and it does little harm to expose them. Requiring OSes to specify -march=ssfoo_ssbar_ssbaz_... to do anything useful is just a waste of everyone's time IMO, and often wrong because OSes don't want to //require// those extensions, they just want to //support// them if present, so then you instead have to `.option arch, +ssfoo` all over the place. Or people will just use the numeric values instead of the names, which then makes the code less readable.

ok, I was not aware if this was done intentionally. But as you said, exposing all of them (especially the ones which are still in experimental stage) does harm because the same encodings are used by other CSRs. For eg. - miselect and mireg CSR in Advanced interrupt Architecture has the same encoding as of the mnscratch and mnepc CSR respectively in Sifive S76-MC. Therefore guarding CSRs which are in experimental stage will allow other CSRs with same encodings to be there until one of them is fully supported by community.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151898



More information about the llvm-commits mailing list