Add ARMv7 architecture, Cortex processors and different FPU modes handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72337 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h
index 870a8c7..39e85b0 100644
--- a/lib/Target/ARM/ARMSubtarget.h
+++ b/lib/Target/ARM/ARMSubtarget.h
@@ -23,16 +23,19 @@
 class ARMSubtarget : public TargetSubtarget {
 protected:
   enum ARMArchEnum {
-    V4T, V5T, V5TE, V6
+    V4T, V5T, V5TE, V6, V7A
   };
 
-  /// ARMArchVersion - ARM architecture vecrsion: V4T (base), V5T, V5TE,
-  /// and V6.
+  enum ARMFPEnum {
+    None, VFPv2, VFPv3, NEON
+  };
+
+  /// ARMArchVersion - ARM architecture version: V4T (base), V5T, V5TE,
+  /// V6, V7A.
   ARMArchEnum ARMArchVersion;
 
-  /// HasVFP2 - True if the processor supports Vector Floating Point (VFP) V2
-  /// instructions.
-  bool HasVFP2;
+  /// ARMFPUType - Floating Point Unit type.
+  ARMFPEnum ARMFPUType;
 
   /// IsThumb - True if we are in thumb mode, false if in ARM mode.
   bool IsThumb;
@@ -72,17 +75,20 @@
     // Change this once Thumb ldmia / stmia support is added.
     return isThumb() ? 0 : 64;
   }
-  /// ParseSubtargetFeatures - Parses features string setting specified 
+  /// ParseSubtargetFeatures - Parses features string setting specified
   /// subtarget options.  Definition of function is auto generated by tblgen.
   std::string ParseSubtargetFeatures(const std::string &FS,
                                      const std::string &CPU);
 
-  bool hasV4TOps()  const { return ARMArchVersion >= V4T; }
-  bool hasV5TOps()  const { return ARMArchVersion >= V5T; }
+  bool hasV4TOps()  const { return ARMArchVersion >= V4T;  }
+  bool hasV5TOps()  const { return ARMArchVersion >= V5T;  }
   bool hasV5TEOps() const { return ARMArchVersion >= V5TE; }
-  bool hasV6Ops()   const { return ARMArchVersion >= V6; }
+  bool hasV6Ops()   const { return ARMArchVersion >= V6;   }
+  bool hasV7Ops()   const { return ARMArchVersion >= V7A;  }
 
-  bool hasVFP2() const { return HasVFP2; }
+  bool hasVFP2() const { return ARMFPUType >= VFPv2; }
+  bool hasVFP3() const { return ARMFPUType >= VFPv3; }
+  bool hasNEON() const { return ARMFPUType >= NEON;  }
 
   bool isTargetDarwin() const { return TargetType == isDarwin; }
   bool isTargetELF() const { return TargetType == isELF; }