[llvm] [clang] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 28 23:27:36 PST 2023


================
@@ -206,6 +210,17 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = {
     {"zvfbfwma", RISCVExtensionVersion{0, 8}},
 };
 
+static const RISCVProfile SupportedProfiles[] = {
+    {"rvi20u32", "rv32i"},
----------------
dtcxzyw wrote:

Profile names should use uppercase letters.
> e.g. `-march=RVA20U64` is a legal profile input, it will be expanded into:
 `-march=rv64imafdc_zicsr_ziccif_ziccrse_ziccamoa_zicclsm_za128rs`,
 which include all the mandatory extensions required by this profile.
 `-march=RVA20U64+zba_zbb_zbc_zbs` is also a legal profile input, it will add
 four new extensions after expanded profile strings:
 `-march=rv64imafdc_zicsr_ziccif_ziccrse_ziccamoa_zicclsm_za128rs_zba_zbb_zbc_zbs`
 and `-march=rva20u64` is an illegal profile input, it does not use uppercase letters.

https://github.com/llvm/llvm-project/pull/76357


More information about the cfe-commits mailing list