Lines Matching refs:MArch
87 StringRef MArch, StringRef Ext, StringRef In, in getExtensionVersion() argument
101 << MArch << Error << Ext; in getExtensionVersion()
112 D.Diag(diag::err_drv_invalid_riscv_ext_arch_name) << MArch << Error << In; in getExtensionVersion()
122 << MArch << Error << Ext; in getExtensionVersion()
128 << MArch << Error << Ext; in getExtensionVersion()
142 << MArch << Error << Ext; in getExtensionVersion()
157 D.Diag(diag::err_drv_invalid_riscv_ext_arch_name) << MArch << Error << Ext; in getExtensionVersion()
174 StringRef &MArch, StringRef &Exts) { in getExtensionFeatures() argument
191 D.Diag(diag::err_drv_invalid_riscv_arch_name) << MArch in getExtensionFeatures()
204 << MArch << "invalid extension prefix" << Ext; in getExtensionFeatures()
216 << MArch << Error << Ext; in getExtensionFeatures()
227 << MArch << Error << Type; in getExtensionFeatures()
232 if (!getExtensionVersion(D, Args, MArch, Name, Vers, Major, Minor)) in getExtensionFeatures()
240 << MArch << Error << Name; in getExtensionFeatures()
258 << MArch << Error << Ext; in getExtensionFeatures()
269 static bool getArchFeatures(const Driver &D, StringRef MArch, in getArchFeatures() argument
273 if (llvm::any_of(MArch, [](char c) { return isupper(c); })) { in getArchFeatures()
275 << MArch << "string must be lowercase"; in getArchFeatures()
280 if (!(MArch.startswith("rv32") || MArch.startswith("rv64")) || in getArchFeatures()
281 (MArch.size() < 5)) { in getArchFeatures()
283 << MArch << "string must begin with rv32{i,e,g} or rv64{i,g}"; in getArchFeatures()
287 bool HasRV64 = MArch.startswith("rv64"); in getArchFeatures()
293 char Baseline = MArch[4]; in getArchFeatures()
299 << MArch << "first letter should be 'e', 'i' or 'g'"; in getArchFeatures()
309 D.Diag(diag::err_drv_invalid_riscv_arch_name) << MArch << Error; in getArchFeatures()
327 StringRef Exts = MArch.substr(5); in getArchFeatures()
341 if (!getExtensionVersion(D, Args, MArch, std::string(1, Baseline), Exts, in getArchFeatures()
373 << MArch << Error << std::string(1, c); in getArchFeatures()
383 if (!getExtensionVersion(D, Args, MArch, std::string(1, c), Next, Major, in getArchFeatures()
393 << MArch << "unsupported standard user-level extension" in getArchFeatures()
437 << MArch << "d requires f extension to also be specified"; in getArchFeatures()
446 getExtensionFeatures(D, Args, Features, MArch, OtherExts); in getArchFeatures()
467 StringRef MArch = getRISCVArch(Args, Triple); in getRISCVTargetFeatures() local
469 if (!getArchFeatures(D, MArch, Features, Args)) in getRISCVTargetFeatures()
595 StringRef MArch = getRISCVArch(Args, Triple); in getRISCVABI() local
597 if (MArch.startswith_lower("rv32")) { in getRISCVABI()
599 if (MArch.substr(4).contains_lower("d") || MArch.startswith_lower("rv32g")) in getRISCVABI()
601 else if (MArch.startswith_lower("rv32e")) in getRISCVABI()
605 } else if (MArch.startswith_lower("rv64")) { in getRISCVABI()
607 if (MArch.substr(4).contains_lower("d") || MArch.startswith_lower("rv64g")) in getRISCVABI()
669 StringRef MArch = llvm::RISCV::getMArchFromMcpu(A->getValue()); in getRISCVArch() local
671 if (MArch != "") in getRISCVArch()
672 return MArch; in getRISCVArch()