[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 17:30:15 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:739
 static constexpr ImpliedExtsEntry ImpliedExts[] = {
-    {{"v"}, {ImpliedExtsV}},
-    {{"zfh"}, {ImpliedExtsZfh}},
+    {"v", {ImpliedExtsV}},
+    {"zfh", {ImpliedExtsZfh}},
----------------
Need curly braces around the strings too.


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:805
+      unsigned ZvlLen = 0;
+      ExtName.getAsInteger(10, ZvlLen);
+      MinVLen = std::max(MinVLen, ZvlLen);
----------------
getAsInteger returns an indication of success or failure. We should check that too.  That will protect us in case someone creates an extension like "zvlfoob" in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108694



More information about the llvm-commits mailing list