aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-07-01 21:12:19 +0000
committerJim Grosbach <grosbach@apple.com>2011-07-01 21:12:19 +0000
commita7603982dbf9e240ecc7ed6eddcd1cdb868107ac (patch)
tree87a983d92fb76b9bfbd27279864c36283ec030bc /lib/Target/ARM/ARMSubtarget.h
parent5b1b4489cf3a0f56f8be0673fc5cc380a32d277b (diff)
ARMv7M vs. ARMv7E-M support.
The DSP instructions in the Thumb2 instruction set are an optional extension in the Cortex-M* archtitecture. When present, the implementation is considered an "ARMv7E-M implementation," and when not, an "ARMv7-M implementation." Add a subtarget feature hook for the v7e-m instructions and hook it up. The cortex-m3 cpu is an example of a v7m implementation, while the cortex-m4 is a v7e-m implementation. rdar://9572992 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--lib/Target/ARM/ARMSubtarget.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h
index b73bbba907..3a9431f090 100644
--- a/lib/Target/ARM/ARMSubtarget.h
+++ b/lib/Target/ARM/ARMSubtarget.h
@@ -28,7 +28,7 @@ class GlobalValue;
class ARMSubtarget : public ARMGenSubtargetInfo {
protected:
enum ARMArchEnum {
- V4, V4T, V5T, V5TE, V6, V6M, V6T2, V7A, V7M
+ V4, V4T, V5T, V5TE, V6, V6M, V6T2, V7A, V7M, V7EM
};
enum ARMProcFamilyEnum {
@@ -45,7 +45,7 @@ protected:
};
/// ARMArchVersion - ARM architecture version: V4, V4T (base), V5T, V5TE,
- /// V6, V6T2, V7A, V7M.
+ /// V6, V6T2, V7A, V7M, V7EM.
ARMArchEnum ARMArchVersion;
/// ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
@@ -130,6 +130,10 @@ protected:
/// ARMTargetLowering::allowsUnalignedMemoryAccesses().
bool AllowsUnalignedMem;
+ /// Thumb2DSP - If true, the subtarget supports the v7 DSP (saturating arith
+ /// and such) instructions in Thumb2 code.
+ bool Thumb2DSP;
+
/// stackAlignment - The minimum alignment known to hold of the stack frame on
/// entry to the function and which must be maintained by every function.
unsigned stackAlignment;
@@ -199,6 +203,7 @@ protected:
bool prefers32BitThumb() const { return Pref32BitThumb; }
bool avoidCPSRPartialUpdate() const { return AvoidCPSRPartialUpdate; }
bool hasMPExtension() const { return HasMPExtension; }
+ bool hasThumb2DSP() const { return Thumb2DSP; }
bool hasFP16() const { return HasFP16; }
bool hasD16() const { return HasD16; }