diff options
author | Amara Emerson <amara.emerson@arm.com> | 2013-09-23 14:26:15 +0000 |
---|---|---|
committer | Amara Emerson <amara.emerson@arm.com> | 2013-09-23 14:26:15 +0000 |
commit | 0f22c134be40a337b30e30bdafb9e8b6880dea1e (patch) | |
tree | ee7c130b4490da27bc30ec31721a7f9613964c57 /lib/Target/ARM/ARMSubtarget.h | |
parent | baca5334db904819e6c0d26cd5f5203f82c44f6e (diff) | |
download | llvm-0f22c134be40a337b30e30bdafb9e8b6880dea1e.tar.gz llvm-0f22c134be40a337b30e30bdafb9e8b6880dea1e.tar.bz2 llvm-0f22c134be40a337b30e30bdafb9e8b6880dea1e.tar.xz |
[ARM] Split A/R class into separate subtarget features.
Patch by Bradley Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index a3b701a15a..11d8e8e6d6 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -33,10 +33,16 @@ protected: enum ARMProcFamilyEnum { Others, CortexA5, CortexA8, CortexA9, CortexA15, CortexR5, Swift }; + enum ARMProcClassEnum { + None, AClass, RClass, MClass + }; /// ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others. ARMProcFamilyEnum ARMProcFamily; + /// ARMProcClass - ARM processor class: None, AClass, RClass or MClass. + ARMProcClassEnum ARMProcClass; + /// HasV4TOps, HasV5TOps, HasV5TEOps, /// HasV6Ops, HasV6T2Ops, HasV7Ops, HasV8Ops - /// Specify whether target support specific ARM ISA variants. @@ -82,10 +88,6 @@ protected: /// HasThumb2 - True if Thumb2 instructions are supported. bool HasThumb2; - /// IsMClass - True if the subtarget belongs to the 'M' profile of CPUs - - /// v6m, v7m for example. - bool IsMClass; - /// NoARM - True if subtarget does not support ARM mode execution. bool NoARM; @@ -300,8 +302,9 @@ public: bool isThumb1Only() const { return InThumbMode && !HasThumb2; } bool isThumb2() const { return InThumbMode && HasThumb2; } bool hasThumb2() const { return HasThumb2; } - bool isMClass() const { return IsMClass; } - bool isARClass() const { return !IsMClass; } + bool isMClass() const { return ARMProcClass == MClass; } + bool isRClass() const { return ARMProcClass == RClass; } + bool isAClass() const { return ARMProcClass == AClass; } bool isR9Reserved() const { return IsR9Reserved; } |