File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,34 @@ bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {
273273 Diags.Report (diag::err_mips_fp64_req) << " -mfp64" ;
274274 return false ;
275275 }
276+ // FPXX requires mips2+
277+ if (FPMode == FPXX && CPU == " mips1" ) {
278+ Diags.Report (diag::err_opt_not_valid_with_opt) << " -mfpxx" << CPU;
279+ return false ;
280+ }
281+ // -mmsa with -msoft-float makes nonsense
282+ if (FloatABI == SoftFloat && HasMSA) {
283+ Diags.Report (diag::err_opt_not_valid_with_opt) << " -msoft-float"
284+ << " -mmsa" ;
285+ return false ;
286+ }
287+ // Option -mmsa permitted on Mips32 iff revision 2 or higher is present
288+ if (HasMSA && (CPU == " mips1" || CPU == " mips2" || getISARev () < 2 ) &&
289+ ABI == " o32" ) {
290+ Diags.Report (diag::err_mips_fp64_req) << " -mmsa" ;
291+ return false ;
292+ }
293+ // MSA requires FP64
294+ if (FPMode == FPXX && HasMSA) {
295+ Diags.Report (diag::err_opt_not_valid_with_opt) << " -mfpxx"
296+ << " -mmsa" ;
297+ return false ;
298+ }
299+ if (FPMode == FP32 && HasMSA) {
300+ Diags.Report (diag::err_opt_not_valid_with_opt) << " -mfp32"
301+ << " -mmsa" ;
302+ return false ;
303+ }
276304
277305 return true ;
278306}
You can’t perform that action at this time.
0 commit comments