diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-07-01 21:12:19 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-07-01 21:12:19 +0000 |
commit | a7603982dbf9e240ecc7ed6eddcd1cdb868107ac (patch) | |
tree | 87a983d92fb76b9bfbd27279864c36283ec030bc /lib/Target/ARM/ARMSubtarget.cpp | |
parent | 5b1b4489cf3a0f56f8be0673fc5cc380a32d277b (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.cpp')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 7619d40318..5f94a1f863 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -62,6 +62,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, , HasMPExtension(false) , FPOnlySP(false) , AllowsUnalignedMem(false) + , Thumb2DSP(false) , stackAlignment(4) , CPUString(CPU) , TargetTriple(TT) @@ -98,6 +99,9 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, if (Len >= Idx+2 && TT[Idx+1] == 'm') { ARMArchVersion = V7M; ARMArchFeature = "+v7m"; + } else if (Len >= Idx+3 && TT[Idx+1] == 'e'&& TT[Idx+2] == 'm') { + ARMArchVersion = V7EM; + ARMArchFeature = "+v7em"; } } else if (SubVer == '6') { ARMArchVersion = V6; |