[PATCH] D133443: [RISCV][MC] Add support for experimental Zawrs extension

Philip Reames via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 12:02:23 PDT 2022


reames created this revision.
reames added reviewers: palmer-dabbelt, sunshaoce, craig.topper, kito-cheng, jrtc27, frasercrmck, asb, luismarques.
Herald added subscribers: VincentWu, luke957, StephenFan, vkmr, 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: cfe-commits, pcwang-thead, eopXD, MaskRay.
Herald added projects: clang, LLVM.

This implements the Zawrs specification as specified here: https://github.com/riscv/riscv-zawrs/releases/download/V1.0-rc3/Zawrs.pdf.  Despite the 1.0 version name, this does not appear to have been ratified, so putting it under experimental for the moment.  I have been told that the current version is near final, and unlikely to change (again), but have nothing to cite on that.

This change adds assembly support, but does not include C language or IR intrinsics.  We can decide if we want them, and handle that in a separate patch.

There were two prior attempts at implementing this.

D128235 <https://reviews.llvm.org/D128235> by @palmer-dabbelt implements a prior version of this extension.  Very annoyingly, the specification appears to have changed *without* a change in version number.  This patch also didn't make the extension experimental.

D129462 <https://reviews.llvm.org/D129462> by @sunshaoce implements the current version, but was abandoned due to confusion with the prior.  Additionally, it's missing a few tests.  I took the .td file change and the valid assembly test from that change.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133443

Files:
  clang/test/Preprocessor/riscv-target-features.c
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/lib/Target/RISCV/RISCV.td
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/lib/Target/RISCV/RISCVSubtarget.h
  llvm/test/CodeGen/RISCV/attributes.ll
  llvm/test/MC/RISCV/Zawrs-valid.s
  llvm/test/MC/RISCV/attribute-arch.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133443.458523.patch
Type: text/x-patch
Size: 6557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220907/1618fa22/attachment.bin>


More information about the cfe-commits mailing list