aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-05-23 19:51:43 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-05-23 19:51:43 +0000
commit1bf0f08cf82ea6414cec0a8d043765cb4be3b122 (patch)
treedf27b9486511b106296ee53d7634a8cf659df09c /lib/Target/ARM/ARMSubtarget.h
parenta229f0b618bc12edf071c9cd647792b92921b0ea (diff)
downloadexternal_llvm-1bf0f08cf82ea6414cec0a8d043765cb4be3b122.zip
external_llvm-1bf0f08cf82ea6414cec0a8d043765cb4be3b122.tar.gz
external_llvm-1bf0f08cf82ea6414cec0a8d043765cb4be3b122.tar.bz2
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
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--lib/Target/ARM/ARMSubtarget.h28
1 files changed, 17 insertions, 11 deletions
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 Module;
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 @@ protected:
// 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; }