[mips] Add the SoftFloat MipsSubtarget feature.
[oota-llvm.git] / lib / Target / Mips / MipsSubtarget.h
index dda344b7d7ea87e38d4963449aaf9f46a4c3448d..932b5d5b0697a514e35bfc5aa0f015ef75b5afed 100644 (file)
@@ -48,6 +48,9 @@ class MipsSubtarget : public MipsGenSubtargetInfo {
   // IsLittle - The target is Little Endian
   bool IsLittle;
 
+  // IsSoftFloat - The target does not support any floating point instructions.
+  bool IsSoftFloat;
+
   // IsSingleFloat - The target only supports single precision float
   // point operations. This enable the target to use all 32 32-bit
   // floating point registers instead of only using even ones.
@@ -233,7 +236,9 @@ public:
 
   bool hasStandardEncoding() const { return !inMips16Mode(); }
 
-  bool abiUsesSoftFloat() const;
+  bool abiUsesSoftFloat() const {
+    return IsSoftFloat && !InMips16HardFloat;
+  }
 
   bool enableLongBranchPass() const {
     return hasStandardEncoding() || allowMixed16_32();