[PATCH] D73891: [RISCV] Support experimental/unratified extensions

Simon Cook via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 3 06:50:29 PST 2020


simoncook created this revision.
simoncook added reviewers: asb, lenary, PaoloS, s.egerton.
Herald added subscribers: cfe-commits, luismarques, apazos, sameer.abuasal, pzheng, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, johnrusso, rbar.
Herald added a project: clang.
simoncook added a parent revision: D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

This adds support for enabling experimental/unratified RISC-V ISA
extensions in the -march string in the case where an explicit version
number has been declared, and the -menable-experimental-extensions flag
has been provided.

This follows the design as discussed on the mailing lists in the
following RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-January/138364.html

Since the RISCV ToolChain definition currently rejects any extension
with an explicit version number, the parsing logic has been tweaked to
support this, and to allow standard extensions to have their versions
checked in future patches.

Support for the bitmanip 'b' extension has been added as a first example,
it should be clear how to extend this should vector 'v' land first.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73891

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/test/Driver/riscv-arch.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73891.242056.patch
Type: text/x-patch
Size: 8190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200203/1829e339/attachment.bin>


More information about the cfe-commits mailing list