[mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error...
[oota-llvm.git] / lib / Target / Mips / MipsSubtarget.cpp
index 91e2535911c6740aae66bba494eabd81e7e7f0f7..3a122706aa283f76b8effb17e0002c7aff2994ef 100644 (file)
@@ -89,6 +89,11 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
           (hasMips64() && (isABI_N32() || isABI_N64()))) &&
          "Invalid  Arch & ABI pair.");
 
+  if (hasMSA() && !isFP64bit())
+    report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). "
+                       "See -mattr=+fp64.",
+                       false);
+
   // Is the target system Linux ?
   if (TT.find("linux") == std::string::npos)
     IsLinux = false;