summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV/Utils
diff options
context:
space:
mode:
authorZakk Chen <zakk.chen@sifive.com>2020-01-15 04:32:57 -0800
committerZakk Chen <zakk.chen@sifive.com>2020-01-15 04:32:57 -0800
commit3bc2860e926b7e35c381ea41dd90caeb7ae400d2 (patch)
tree31ceb9884a64f15b39783a531f91b1725e4a4174 /llvm/lib/Target/RISCV/Utils
parenteb82226f33525c7332f8008c048b821f08d725fa (diff)
downloadbcm5719-llvm-3bc2860e926b7e35c381ea41dd90caeb7ae400d2.tar.gz
bcm5719-llvm-3bc2860e926b7e35c381ea41dd90caeb7ae400d2.zip
Revert "[RISCV] Support ABI checking with per function target-features"
This reverts commit 109e4d12edda07bdec139de36d9fdb6f73399f92.
Diffstat (limited to 'llvm/lib/Target/RISCV/Utils')
-rw-r--r--llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
index 432ebb294d4..9c54c3749a1 100644
--- a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
+++ b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
@@ -37,8 +37,17 @@ 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