[PATCH] D113237: [RISCV] Support I extension version 2.1

Zakk Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 24 07:35:22 PST 2022


khchen added a comment.
Herald added subscribers: pcwang-thead, eopXD.

https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/aE1ZeHHCYf4
RISC-V GNU toolchain are going to bump the default ISA spec to 20191213, which means will default with I 2.1, A 2.1, F 2.2 and D 2.2. 
I think it will be good if LLVM could supports I 2.1 and have the same default ISA version with gnu...

@achieveartificialintelligence Do you know what is the relation between your patch and D115921 <https://reviews.llvm.org/D115921>?



================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:236
   unsigned XLen = getTriple().isArch64Bit() ? 64 : 32;
-  auto ParseResult = llvm::RISCVISAInfo::parseFeatures(XLen, Features);
+  auto ParseResult = llvm::RISCVISAInfo::parseFeatures(XLen, false, Features);
   if (!ParseResult) {
----------------
```
auto ParseResult = llvm::RISCVISAInfo::parseFeatures(XLen, /*IsI2p1=*/ false, Features);
```


================
Comment at: clang/test/Driver/riscv-arch.c:3
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
 // RUN: %clang -target riscv32-unknown-elf -march=rv32i2p0 -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck %s
----------------
could we have a check for `-march=rv32i2p1`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113237



More information about the cfe-commits mailing list