summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
diff options
context:
space:
mode:
authorZakk Chen <zakk.chen@sifive.com>2019-11-28 18:00:54 -0800
committerHans Wennborg <hans@chromium.org>2020-01-27 19:07:09 +0100
commit72882ca30d87bd7ea85d8099e8b9d2244749b71e (patch)
tree08dc97948df36efcacf5742a1152fce2504eb57b /llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
parent4d342b7d8e9bc6f40001011b51b5ad812535c4a6 (diff)
downloadbcm5719-llvm-72882ca30d87bd7ea85d8099e8b9d2244749b71e.tar.gz
bcm5719-llvm-72882ca30d87bd7ea85d8099e8b9d2244749b71e.zip
[RISCV] Support ABI checking with per function target-features
1. if users don't specific -mattr, the default target-feature come from IR attribute. 2. fixed bug and re-land this patch Reviewers: lenary, asb Reviewed By: lenary Tags: #llvm Differential Revision: https://reviews.llvm.org/D70837 (cherry picked from commit 0cb274de397a193fb37c60653b336d48a3a4f1bd)
Diffstat (limited to 'llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp')
-rw-r--r--llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
index da87722632e..43b1f8b80c5 100644
--- a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
+++ b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
@@ -28,17 +28,8 @@ ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits,
errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring "
"target-abi)\n";
TargetABI = ABI_Unknown;
- } else if (ABIName.endswith("f") && !FeatureBits[RISCV::FeatureStdExtF]) {
- errs() << "Hard-float 'f' ABI can't be used for a target that "
- "doesn't support the F instruction set extension (ignoring "
- "target-abi)\n";
- TargetABI = ABI_Unknown;
- } else if (ABIName.endswith("d") && !FeatureBits[RISCV::FeatureStdExtD]) {
- errs() << "Hard-float 'd' ABI can't be used for a target that "
- "doesn't support the D instruction set extension (ignoring "
- "target-abi)\n";
- TargetABI = ABI_Unknown;
} else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) {
+ // TODO: move this checking to RISCVTargetLowering and RISCVAsmParser
errs()
<< "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n";
TargetABI = ABI_Unknown;
OpenPOWER on IntegriCloud