[PATCH] D70837: [RISCV] Support ABI checking with per function target-features

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 05:56:50 PST 2020


lenary added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:194
+        !getSTI().getFeatureBits()[RISCV::FeatureStdExtF]) {
+      errs() << "Hard-float 'f' ABI can't be used for a target that "
+                "doesn't support the F instruction set extension (ignoring "
----------------
I'm not sure we should be using `errs()` here directly, should we perhaps be using `report_fatal_error` here?


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:58
+                          "target-abi)\n";
+    ABI = Subtarget.is64Bit() ? RISCVABI::ABI_LP64 : RISCVABI::ABI_ILP32;
+  } else if ((ABI == RISCVABI::ABI_ILP32D || ABI == RISCVABI::ABI_LP64D) &&
----------------
I don't think we should be changing the ABI here if the user already chose one explicitly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70837





More information about the llvm-commits mailing list