mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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; }
|
||||
|
Reference in New Issue
Block a user