Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
Show All 22 Lines | ABI computeTargetABI(const Triple &TT, FeatureBitset FeatureBits, | ||||
} else if (ABIName.startswith("ilp32") && IsRV64) { | } else if (ABIName.startswith("ilp32") && IsRV64) { | ||||
errs() << "32-bit ABIs are not supported for 64-bit targets (ignoring " | errs() << "32-bit ABIs are not supported for 64-bit targets (ignoring " | ||||
"target-abi)\n"; | "target-abi)\n"; | ||||
TargetABI = ABI_Unknown; | TargetABI = ABI_Unknown; | ||||
} else if (ABIName.startswith("lp64") && !IsRV64) { | } else if (ABIName.startswith("lp64") && !IsRV64) { | ||||
errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring " | errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring " | ||||
"target-abi)\n"; | "target-abi)\n"; | ||||
TargetABI = ABI_Unknown; | 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) { | } else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) { | ||||
// TODO: move this checking to RISCVTargetLowering and RISCVAsmParser | |||||
errs() | errs() | ||||
<< "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n"; | << "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n"; | ||||
TargetABI = ABI_Unknown; | TargetABI = ABI_Unknown; | ||||
} | } | ||||
if (TargetABI != ABI_Unknown) | if (TargetABI != ABI_Unknown) | ||||
return TargetABI; | return TargetABI; | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |