[PATCH] D144215: [WIP][RISCV] Accept zicntr and zihpm command line options

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 13:02:20 PST 2023


reames created this revision.
reames added reviewers: jrtc27, craig.topper, kito-cheng, asb, luke, luismarques.
Herald added subscribers: VincentWu, vkmr, frasercrmck, jdoerfert, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This change adds the definition of the two extensions, but does not either a) make any register definitions conditional on them or b) enabled the extensions by default.

This is somewhat analogous to https://reviews.llvm.org/D143953, but with some key differences.  Specifically:

- The ratification status is unclear.  They appear in older specifications without any indication they were un-ratified, but late last year we have https://www.reddit.com/r/RISCV/comments/yq73r4/public_review_for_standard_extensions_zicntr_and/.  I don't see any formal indication these have been fully ratified.
- Unless I'm missing it in the spec text, there's no version number assigned.  I used 1.0 here, but this seems like something which needs resolved on the spec side.
- It's not clear to me when these were split out of I.  I think it was in the same 2.0 to 2.1 transition as Zicsr (since these explicitly depend on zicsr), but this is not mentioned explicitly in the change log at all.  If anyone has an old copy of the 2.2 (document version!) spec, checking would be very appreciated.  It's possible - though not likely - that this was done separately at a later point.

The best discussion I can find on status is here: https://github.com/riscv/riscv-profiles/issues/43

I marked this is a WIP to indicate I don't think we should land it until the items above have been clarified, and we have citations to that effect.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144215

Files:
  llvm/docs/RISCVUsage.rst
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/lib/Target/RISCV/RISCVFeatures.td
  llvm/test/CodeGen/RISCV/attributes.ll
  llvm/test/MC/RISCV/attribute-arch.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144215.498127.patch
Type: text/x-patch
Size: 6694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230216/1ba22317/attachment-0001.bin>


More information about the llvm-commits mailing list