diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp | 83 |
1 files changed, 42 insertions, 41 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp b/contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp index bbbaf26a7bd4..7256e9a29329 100644 --- a/contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Support/RISCVISAInfo.cpp @@ -145,6 +145,9 @@ static const RISCVSupportedExtension SupportedExtensions[] = { {"zmmul", RISCVExtensionVersion{1, 0}}, + {"zvbb", RISCVExtensionVersion{1, 0}}, + {"zvbc", RISCVExtensionVersion{1, 0}}, + {"zve32f", RISCVExtensionVersion{1, 0}}, {"zve32x", RISCVExtensionVersion{1, 0}}, {"zve64d", RISCVExtensionVersion{1, 0}}, @@ -154,6 +157,22 @@ static const RISCVSupportedExtension SupportedExtensions[] = { {"zvfh", RISCVExtensionVersion{1, 0}}, {"zvfhmin", RISCVExtensionVersion{1, 0}}, + // vector crypto + {"zvkb", RISCVExtensionVersion{1, 0}}, + {"zvkg", RISCVExtensionVersion{1, 0}}, + {"zvkn", RISCVExtensionVersion{1, 0}}, + {"zvknc", RISCVExtensionVersion{1, 0}}, + {"zvkned", RISCVExtensionVersion{1, 0}}, + {"zvkng", RISCVExtensionVersion{1, 0}}, + {"zvknha", RISCVExtensionVersion{1, 0}}, + {"zvknhb", RISCVExtensionVersion{1, 0}}, + {"zvks", RISCVExtensionVersion{1, 0}}, + {"zvksc", RISCVExtensionVersion{1, 0}}, + {"zvksed", RISCVExtensionVersion{1, 0}}, + {"zvksg", RISCVExtensionVersion{1, 0}}, + {"zvksh", RISCVExtensionVersion{1, 0}}, + {"zvkt", RISCVExtensionVersion{1, 0}}, + {"zvl1024b", RISCVExtensionVersion{1, 0}}, {"zvl128b", RISCVExtensionVersion{1, 0}}, {"zvl16384b", RISCVExtensionVersion{1, 0}}, @@ -179,27 +198,8 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = { {"ztso", RISCVExtensionVersion{0, 1}}, - {"zvbb", RISCVExtensionVersion{1, 0}}, - {"zvbc", RISCVExtensionVersion{1, 0}}, - {"zvfbfmin", RISCVExtensionVersion{0, 8}}, {"zvfbfwma", RISCVExtensionVersion{0, 8}}, - - // vector crypto - {"zvkb", RISCVExtensionVersion{1, 0}}, - {"zvkg", RISCVExtensionVersion{1, 0}}, - {"zvkn", RISCVExtensionVersion{1, 0}}, - {"zvknc", RISCVExtensionVersion{1, 0}}, - {"zvkned", RISCVExtensionVersion{1, 0}}, - {"zvkng", RISCVExtensionVersion{1, 0}}, - {"zvknha", RISCVExtensionVersion{1, 0}}, - {"zvknhb", RISCVExtensionVersion{1, 0}}, - {"zvks", RISCVExtensionVersion{1, 0}}, - {"zvksc", RISCVExtensionVersion{1, 0}}, - {"zvksed", RISCVExtensionVersion{1, 0}}, - {"zvksg", RISCVExtensionVersion{1, 0}}, - {"zvksh", RISCVExtensionVersion{1, 0}}, - {"zvkt", RISCVExtensionVersion{1, 0}}, }; static void verifyTables() { @@ -215,11 +215,12 @@ static void verifyTables() { #endif } -static void PrintExtension(const std::string Name, const std::string Version, - const std::string Description) { - outs() << " " - << format(Description.empty() ? "%-20s%s\n" : "%-20s%-10s%s\n", - Name.c_str(), Version.c_str(), Description.c_str()); +static void PrintExtension(StringRef Name, StringRef Version, + StringRef Description) { + outs().indent(4); + unsigned VersionWidth = Description.empty() ? 0 : 10; + outs() << left_justify(Name, 20) << left_justify(Version, VersionWidth) + << Description << "\n"; } void llvm::riscvExtensionsHelp(StringMap<StringRef> DescMap) { @@ -233,7 +234,7 @@ void llvm::riscvExtensionsHelp(StringMap<StringRef> DescMap) { for (const auto &E : ExtMap) { std::string Version = std::to_string(E.second.MajorVersion) + "." + std::to_string(E.second.MinorVersion); - PrintExtension(E.first, Version, DescMap[E.first].str()); + PrintExtension(E.first, Version, DescMap[E.first]); } outs() << "\nExperimental extensions\n"; @@ -243,7 +244,7 @@ void llvm::riscvExtensionsHelp(StringMap<StringRef> DescMap) { for (const auto &E : ExtMap) { std::string Version = std::to_string(E.second.MajorVersion) + "." + std::to_string(E.second.MinorVersion); - PrintExtension(E.first, Version, DescMap["experimental-" + E.first].str()); + PrintExtension(E.first, Version, DescMap["experimental-" + E.first]); } outs() << "\nUse -march to specify the target's extension.\n" @@ -995,25 +996,25 @@ static const char *ImpliedExtsD[] = {"f"}; static const char *ImpliedExtsF[] = {"zicsr"}; static const char *ImpliedExtsV[] = {"zvl128b", "zve64d"}; static const char *ImpliedExtsXTHeadVdot[] = {"v"}; -static const char *ImpliedExtsXsfvcp[] = {"zve32x"}; -static const char *ImpliedExtsXsfvfnrclipxfqf[] = {"zve32f"}; -static const char *ImpliedExtsXsfvfwmaccqqq[] = {"zve32f", "zvfbfmin"}; -static const char *ImpliedExtsXsfvqmaccdod[] = {"zve32x"}; -static const char *ImpliedExtsXsfvqmaccqoq[] = {"zve32x"}; +static const char *ImpliedExtsXSfvcp[] = {"zve32x"}; +static const char *ImpliedExtsXSfvfnrclipxfqf[] = {"zve32f"}; +static const char *ImpliedExtsXSfvfwmaccqqq[] = {"zvfbfmin"}; +static const char *ImpliedExtsXSfvqmaccdod[] = {"zve32x"}; +static const char *ImpliedExtsXSfvqmaccqoq[] = {"zve32x"}; static const char *ImpliedExtsZacas[] = {"a"}; static const char *ImpliedExtsZcb[] = {"zca"}; static const char *ImpliedExtsZcd[] = {"d", "zca"}; static const char *ImpliedExtsZce[] = {"zcb", "zcmp", "zcmt"}; static const char *ImpliedExtsZcf[] = {"f", "zca"}; static const char *ImpliedExtsZcmp[] = {"zca"}; -static const char *ImpliedExtsZcmt[] = {"zca"}; +static const char *ImpliedExtsZcmt[] = {"zca", "zicsr"}; static const char *ImpliedExtsZdinx[] = {"zfinx"}; static const char *ImpliedExtsZfa[] = {"f"}; static const char *ImpliedExtsZfbfmin[] = {"f"}; static const char *ImpliedExtsZfh[] = {"zfhmin"}; static const char *ImpliedExtsZfhmin[] = {"f"}; static const char *ImpliedExtsZfinx[] = {"zicsr"}; -static const char *ImpliedExtsZhinx[] = {"zfinx"}; +static const char *ImpliedExtsZhinx[] = {"zhinxmin"}; static const char *ImpliedExtsZhinxmin[] = {"zfinx"}; static const char *ImpliedExtsZicntr[] = {"zicsr"}; static const char *ImpliedExtsZihpm[] = {"zicsr"}; @@ -1027,9 +1028,9 @@ static const char *ImpliedExtsZve32x[] = {"zvl32b", "zicsr"}; static const char *ImpliedExtsZve64d[] = {"zve64f", "d"}; static const char *ImpliedExtsZve64f[] = {"zve64x", "zve32f"}; static const char *ImpliedExtsZve64x[] = {"zve32x", "zvl64b"}; -static const char *ImpliedExtsZvfbfmin[] = {"zve32f", "zfbfmin"}; -static const char *ImpliedExtsZvfbfwma[] = {"zvfbfmin"}; -static const char *ImpliedExtsZvfh[] = {"zve32f", "zfhmin"}; +static const char *ImpliedExtsZvfbfmin[] = {"zve32f"}; +static const char *ImpliedExtsZvfbfwma[] = {"zvfbfmin", "zfbfmin"}; +static const char *ImpliedExtsZvfh[] = {"zvfhmin", "zfhmin"}; static const char *ImpliedExtsZvfhmin[] = {"zve32f"}; static const char *ImpliedExtsZvkn[] = {"zvkb", "zvkned", "zvknhb", "zvkt"}; static const char *ImpliedExtsZvknc[] = {"zvbc", "zvkn"}; @@ -1066,11 +1067,11 @@ static constexpr ImpliedExtsEntry ImpliedExts[] = { {{"d"}, {ImpliedExtsD}}, {{"f"}, {ImpliedExtsF}}, {{"v"}, {ImpliedExtsV}}, - {{"xsfvcp"}, {ImpliedExtsXsfvcp}}, - {{"xsfvfnrclipxfqf"}, {ImpliedExtsXsfvfnrclipxfqf}}, - {{"xsfvfwmaccqqq"}, {ImpliedExtsXsfvfwmaccqqq}}, - {{"xsfvqmaccdod"}, {ImpliedExtsXsfvqmaccdod}}, - {{"xsfvqmaccqoq"}, {ImpliedExtsXsfvqmaccqoq}}, + {{"xsfvcp"}, {ImpliedExtsXSfvcp}}, + {{"xsfvfnrclipxfqf"}, {ImpliedExtsXSfvfnrclipxfqf}}, + {{"xsfvfwmaccqqq"}, {ImpliedExtsXSfvfwmaccqqq}}, + {{"xsfvqmaccdod"}, {ImpliedExtsXSfvqmaccdod}}, + {{"xsfvqmaccqoq"}, {ImpliedExtsXSfvqmaccqoq}}, {{"xtheadvdot"}, {ImpliedExtsXTHeadVdot}}, {{"zacas"}, {ImpliedExtsZacas}}, {{"zcb"}, {ImpliedExtsZcb}}, |