Lines Matching refs:Ext
33 static StringRef getExtensionTypeDesc(StringRef Ext) { in getExtensionTypeDesc() argument
34 if (Ext.startswith("sx")) in getExtensionTypeDesc()
36 if (Ext.startswith("s")) in getExtensionTypeDesc()
38 if (Ext.startswith("x")) in getExtensionTypeDesc()
40 if (Ext.startswith("z")) in getExtensionTypeDesc()
45 static StringRef getExtensionType(StringRef Ext) { in getExtensionType() argument
46 if (Ext.startswith("sx")) in getExtensionType()
48 if (Ext.startswith("s")) in getExtensionType()
50 if (Ext.startswith("x")) in getExtensionType()
52 if (Ext.startswith("z")) in getExtensionType()
60 isExperimentalExtension(StringRef Ext) { in isExperimentalExtension() argument
61 if (Ext == "b" || Ext == "zbb" || Ext == "zbc" || Ext == "zbe" || in isExperimentalExtension()
62 Ext == "zbf" || Ext == "zbm" || Ext == "zbp" || Ext == "zbr" || in isExperimentalExtension()
63 Ext == "zbs" || Ext == "zbt" || Ext == "zbproposedc") in isExperimentalExtension()
65 if (Ext == "v") in isExperimentalExtension()
67 if (Ext == "zfh") in isExperimentalExtension()
72 static bool isSupportedExtension(StringRef Ext) { in isSupportedExtension() argument
74 if (isExperimentalExtension(Ext)) in isSupportedExtension()
87 StringRef MArch, StringRef Ext, StringRef In, in getExtensionVersion() argument
101 << MArch << Error << Ext; in getExtensionVersion()
109 if (Ext.size() > 1 && In.size()) { in getExtensionVersion()
117 if (auto ExperimentalExtension = isExperimentalExtension(Ext)) { 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()
189 for (StringRef Ext : Split) { in getExtensionFeatures() local
190 if (Ext.empty()) { in getExtensionFeatures()
196 StringRef Type = getExtensionType(Ext); in getExtensionFeatures()
197 StringRef Desc = getExtensionTypeDesc(Ext); in getExtensionFeatures()
198 auto Pos = Ext.find_if(isDigit); in getExtensionFeatures()
199 StringRef Name(Ext.substr(0, Pos)); in getExtensionFeatures()
200 StringRef Vers(Ext.substr(Pos)); in getExtensionFeatures()
204 << MArch << "invalid extension prefix" << Ext; in getExtensionFeatures()
216 << MArch << Error << Ext; in getExtensionFeatures()
252 for (auto Ext : AllExts) { in getExtensionFeatures() local
253 if (!isSupportedExtension(Ext)) { in getExtensionFeatures()
254 StringRef Desc = getExtensionTypeDesc(getExtensionType(Ext)); in getExtensionFeatures()
258 << MArch << Error << Ext; in getExtensionFeatures()
261 if (isExperimentalExtension(Ext)) in getExtensionFeatures()
262 Features.push_back(Args.MakeArgString("+experimental-" + Ext)); in getExtensionFeatures()
264 Features.push_back(Args.MakeArgString("+" + Ext)); in getExtensionFeatures()