2012-02-18 20:03:15 +08:00
|
|
|
//===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===//
|
2006-05-15 06:18:28 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
2006-05-15 06:18:28 +08:00
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Target-independent interfaces which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2008-11-24 15:34:46 +08:00
|
|
|
include "llvm/Target/Target.td"
|
2006-05-15 06:18:28 +08:00
|
|
|
|
2011-07-07 16:26:46 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Subtarget state.
|
|
|
|
//
|
|
|
|
|
2011-07-08 03:05:12 +08:00
|
|
|
def ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Thumb mode">;
|
2010-09-30 09:57:53 +08:00
|
|
|
|
2007-01-19 15:51:42 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Subtarget features.
|
|
|
|
//
|
|
|
|
|
2011-07-07 11:55:05 +08:00
|
|
|
def FeatureVFP2 : SubtargetFeature<"vfp2", "HasVFPv2", "true",
|
2009-05-30 07:41:08 +08:00
|
|
|
"Enable VFP2 instructions">;
|
2011-07-07 11:55:05 +08:00
|
|
|
def FeatureVFP3 : SubtargetFeature<"vfp3", "HasVFPv3", "true",
|
|
|
|
"Enable VFP3 instructions",
|
|
|
|
[FeatureVFP2]>;
|
|
|
|
def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true",
|
|
|
|
"Enable NEON instructions",
|
|
|
|
[FeatureVFP3]>;
|
2011-07-07 08:08:19 +08:00
|
|
|
def FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true",
|
2009-05-30 07:41:08 +08:00
|
|
|
"Enable Thumb2 instructions">;
|
2010-08-11 15:17:46 +08:00
|
|
|
def FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true",
|
2013-06-11 07:20:58 +08:00
|
|
|
"Does not support ARM mode execution",
|
|
|
|
[ModeThumb]>;
|
2010-03-15 02:42:38 +08:00
|
|
|
def FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true",
|
|
|
|
"Enable half-precision floating point">;
|
2012-09-30 05:43:49 +08:00
|
|
|
def FeatureVFP4 : SubtargetFeature<"vfp4", "HasVFPv4", "true",
|
|
|
|
"Enable VFP4 instructions",
|
|
|
|
[FeatureVFP3, FeatureFP16]>;
|
2013-09-13 21:46:57 +08:00
|
|
|
def FeatureFPARMv8 : SubtargetFeature<"fp-armv8", "HasFPARMv8",
|
2013-06-27 19:49:26 +08:00
|
|
|
"true", "Enable ARMv8 FP",
|
|
|
|
[FeatureVFP4]>;
|
2010-10-13 00:22:47 +08:00
|
|
|
def FeatureD16 : SubtargetFeature<"d16", "HasD16", "true",
|
|
|
|
"Restrict VFP3 to 16 double registers">;
|
2010-05-06 07:44:43 +08:00
|
|
|
def FeatureHWDiv : SubtargetFeature<"hwdiv", "HasHardwareDivide", "true",
|
|
|
|
"Enable divide instructions">;
|
2012-09-30 05:43:49 +08:00
|
|
|
def FeatureHWDivARM : SubtargetFeature<"hwdiv-arm",
|
|
|
|
"HasHardwareDivideInARM", "true",
|
|
|
|
"Enable divide instructions in ARM mode">;
|
2010-08-11 14:51:54 +08:00
|
|
|
def FeatureT2XtPk : SubtargetFeature<"t2xtpk", "HasT2ExtractPack", "true",
|
2010-05-06 07:44:43 +08:00
|
|
|
"Enable Thumb2 extract and pack instructions">;
|
2010-08-11 14:51:54 +08:00
|
|
|
def FeatureDB : SubtargetFeature<"db", "HasDataBarrier", "true",
|
|
|
|
"Has data barrier (dmb / dsb) instructions">;
|
2010-07-14 03:21:50 +08:00
|
|
|
def FeatureSlowFPBrcc : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true",
|
|
|
|
"FP compare + branch is slow">;
|
2010-08-11 23:44:15 +08:00
|
|
|
def FeatureVFPOnlySP : SubtargetFeature<"fp-only-sp", "FPOnlySP", "true",
|
|
|
|
"Floating point unit supports single precision only">;
|
2013-05-24 03:11:14 +08:00
|
|
|
def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true",
|
|
|
|
"Enable support for Performance Monitor extensions">;
|
2013-04-10 20:08:35 +08:00
|
|
|
def FeatureTrustZone : SubtargetFeature<"trustzone", "HasTrustZone", "true",
|
|
|
|
"Enable support for TrustZone security extensions">;
|
2013-09-19 19:59:01 +08:00
|
|
|
def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true",
|
|
|
|
"Enable support for Cryptography extensions",
|
|
|
|
[FeatureNEON]>;
|
2013-10-29 17:47:35 +08:00
|
|
|
def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true",
|
|
|
|
"Enable support for CRC instructions">;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
2014-04-01 21:22:02 +08:00
|
|
|
// Cyclone has preferred instructions for zeroing VFP registers, which can
|
|
|
|
// execute in 0 cycles.
|
|
|
|
def FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
|
|
|
|
"Has zero-cycle zeroing instructions">;
|
|
|
|
|
2010-12-06 06:04:16 +08:00
|
|
|
// Some processors have FP multiply-accumulate instructions that don't
|
|
|
|
// play nicely with other VFP / NEON instructions, and it's generally better
|
2010-03-26 07:11:16 +08:00
|
|
|
// to just not use them.
|
2010-12-06 06:04:16 +08:00
|
|
|
def FeatureHasSlowFPVMLx : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true",
|
|
|
|
"Disable VFP / NEON MAC instructions">;
|
2011-04-01 03:38:48 +08:00
|
|
|
|
|
|
|
// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding.
|
|
|
|
def FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding",
|
|
|
|
"HasVMLxForwarding", "true",
|
|
|
|
"Has multiplier accumulator forwarding">;
|
|
|
|
|
2010-03-26 07:47:34 +08:00
|
|
|
// Some processors benefit from using NEON instructions for scalar
|
|
|
|
// single-precision FP operations.
|
2010-08-18 02:39:16 +08:00
|
|
|
def FeatureNEONForFP : SubtargetFeature<"neonfp", "UseNEONForSinglePrecisionFP",
|
|
|
|
"true",
|
|
|
|
"Use NEON for single precision FP">;
|
2010-03-26 07:47:34 +08:00
|
|
|
|
2010-08-10 02:35:19 +08:00
|
|
|
// Disable 32-bit to 16-bit narrowing for experimentation.
|
|
|
|
def FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true",
|
|
|
|
"Prefer 32-bit Thumb instrs">;
|
2010-03-26 07:11:16 +08:00
|
|
|
|
2011-04-20 02:11:49 +08:00
|
|
|
/// Some instructions update CPSR partially, which can add false dependency for
|
|
|
|
/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is
|
|
|
|
/// mapped to a separate physical register. Avoid partial CPSR update for these
|
|
|
|
/// processors.
|
|
|
|
def FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr",
|
|
|
|
"AvoidCPSRPartialUpdate", "true",
|
|
|
|
"Avoid CPSR partial update for OOO execution">;
|
|
|
|
|
2012-12-21 03:59:30 +08:00
|
|
|
def FeatureAvoidMOVsShOp : SubtargetFeature<"avoid-movs-shop",
|
|
|
|
"AvoidMOVsShifterOperand", "true",
|
|
|
|
"Avoid movs instructions with shifter operand">;
|
|
|
|
|
2012-02-29 02:51:51 +08:00
|
|
|
// Some processors perform return stack prediction. CodeGen should avoid issue
|
|
|
|
// "normal" call instructions to callees which do not return.
|
|
|
|
def FeatureHasRAS : SubtargetFeature<"ras", "HasRAS", "true",
|
|
|
|
"Has return address stack">;
|
|
|
|
|
2011-07-02 05:12:19 +08:00
|
|
|
/// Some M architectures don't have the DSP extension (v7E-M vs. v7M)
|
|
|
|
def FeatureDSPThumb2 : SubtargetFeature<"t2dsp", "Thumb2DSP", "true",
|
2011-08-26 05:46:20 +08:00
|
|
|
"Supports v7 DSP instructions in Thumb2">;
|
2011-07-02 05:12:19 +08:00
|
|
|
|
2010-11-03 14:34:55 +08:00
|
|
|
// Multiprocessing extension.
|
|
|
|
def FeatureMP : SubtargetFeature<"mp", "HasMPExtension", "true",
|
|
|
|
"Supports Multiprocessing extension">;
|
2010-08-11 14:51:54 +08:00
|
|
|
|
2013-11-01 21:27:35 +08:00
|
|
|
// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8).
|
|
|
|
def FeatureVirtualization : SubtargetFeature<"virtualization",
|
|
|
|
"HasVirtualization", "true",
|
|
|
|
"Supports Virtualization extension",
|
|
|
|
[FeatureHWDiv, FeatureHWDivARM]>;
|
|
|
|
|
2013-09-23 22:26:15 +08:00
|
|
|
// M-series ISA
|
|
|
|
def FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass",
|
2011-09-28 22:21:38 +08:00
|
|
|
"Is microcontroller profile ('M' series)">;
|
|
|
|
|
2013-09-23 22:26:15 +08:00
|
|
|
// R-series ISA
|
|
|
|
def FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass",
|
|
|
|
"Is realtime profile ('R' series)">;
|
|
|
|
|
|
|
|
// A-series ISA
|
|
|
|
def FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass",
|
|
|
|
"Is application profile ('A' series)">;
|
|
|
|
|
2013-01-31 00:30:19 +08:00
|
|
|
// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too.
|
|
|
|
// See ARMInstrInfo.td for details.
|
|
|
|
def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true",
|
|
|
|
"NaCl trap">;
|
|
|
|
|
2011-07-07 16:26:46 +08:00
|
|
|
// ARM ISAs.
|
2011-07-07 11:55:05 +08:00
|
|
|
def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v4T instructions">;
|
2011-07-07 11:55:05 +08:00
|
|
|
def HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v5T instructions",
|
2011-07-07 11:55:05 +08:00
|
|
|
[HasV4TOps]>;
|
|
|
|
def HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v5TE, v5TEj, and v5TExp instructions",
|
2011-07-07 11:55:05 +08:00
|
|
|
[HasV5TOps]>;
|
|
|
|
def HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v6 instructions",
|
2011-07-07 11:55:05 +08:00
|
|
|
[HasV5TEOps]>;
|
2013-10-07 19:10:47 +08:00
|
|
|
def HasV6MOps : SubtargetFeature<"v6m", "HasV6MOps", "true",
|
|
|
|
"Support ARM v6M instructions",
|
|
|
|
[HasV6Ops]>;
|
2015-03-17 19:55:28 +08:00
|
|
|
def HasV6KOps : SubtargetFeature<"v6k", "HasV6KOps", "true",
|
|
|
|
"Support ARM v6k instructions",
|
|
|
|
[HasV6Ops]>;
|
2011-07-07 11:55:05 +08:00
|
|
|
def HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v6t2 instructions",
|
2015-03-17 19:55:28 +08:00
|
|
|
[HasV6MOps, HasV6KOps, FeatureThumb2]>;
|
2011-07-07 11:55:05 +08:00
|
|
|
def HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true",
|
2011-07-07 16:26:46 +08:00
|
|
|
"Support ARM v7 instructions",
|
2013-05-24 03:11:14 +08:00
|
|
|
[HasV6T2Ops, FeaturePerfMon]>;
|
2013-06-27 00:58:26 +08:00
|
|
|
def HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true",
|
|
|
|
"Support ARM v8 instructions",
|
2013-11-01 21:27:35 +08:00
|
|
|
[HasV7Ops, FeatureVirtualization,
|
|
|
|
FeatureMP]>;
|
2010-08-11 14:51:54 +08:00
|
|
|
|
2007-01-19 15:51:42 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Processors supported.
|
|
|
|
//
|
|
|
|
|
2009-06-19 09:51:50 +08:00
|
|
|
include "ARMSchedule.td"
|
|
|
|
|
2010-09-10 09:29:16 +08:00
|
|
|
// ARM processor families.
|
2012-11-30 03:48:01 +08:00
|
|
|
def ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5",
|
|
|
|
"Cortex-A5 ARM processors",
|
2013-03-22 02:47:47 +08:00
|
|
|
[FeatureSlowFPBrcc, FeatureHasSlowFPVMLx,
|
2013-04-10 20:08:35 +08:00
|
|
|
FeatureVMLxForwarding, FeatureT2XtPk,
|
2013-11-25 21:17:15 +08:00
|
|
|
FeatureTrustZone, FeatureMP]>;
|
2013-11-21 22:03:21 +08:00
|
|
|
def ProcA7 : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7",
|
|
|
|
"Cortex-A7 ARM processors",
|
|
|
|
[FeatureSlowFPBrcc, FeatureHasSlowFPVMLx,
|
|
|
|
FeatureVMLxForwarding, FeatureT2XtPk,
|
|
|
|
FeatureVFP4, FeatureMP,
|
|
|
|
FeatureHWDiv, FeatureHWDivARM,
|
|
|
|
FeatureTrustZone, FeatureVirtualization]>;
|
2010-09-10 09:29:16 +08:00
|
|
|
def ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8",
|
|
|
|
"Cortex-A8 ARM processors",
|
2013-03-22 02:47:47 +08:00
|
|
|
[FeatureSlowFPBrcc, FeatureHasSlowFPVMLx,
|
2013-04-10 20:08:35 +08:00
|
|
|
FeatureVMLxForwarding, FeatureT2XtPk,
|
|
|
|
FeatureTrustZone]>;
|
2010-09-10 09:29:16 +08:00
|
|
|
def ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9",
|
2010-12-06 07:03:45 +08:00
|
|
|
"Cortex-A9 ARM processors",
|
2011-04-20 02:11:57 +08:00
|
|
|
[FeatureVMLxForwarding,
|
2011-04-20 02:11:49 +08:00
|
|
|
FeatureT2XtPk, FeatureFP16,
|
2013-04-10 20:08:35 +08:00
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureTrustZone]>;
|
2012-09-30 05:43:49 +08:00
|
|
|
def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift",
|
|
|
|
"Swift ARM processors",
|
|
|
|
[FeatureNEONForFP, FeatureT2XtPk,
|
|
|
|
FeatureVFP4, FeatureMP, FeatureHWDiv,
|
|
|
|
FeatureHWDivARM, FeatureAvoidPartialCPSR,
|
2012-12-21 03:59:30 +08:00
|
|
|
FeatureAvoidMOVsShOp,
|
2013-04-10 20:08:35 +08:00
|
|
|
FeatureHasSlowFPVMLx, FeatureTrustZone]>;
|
2013-11-22 19:53:16 +08:00
|
|
|
def ProcA12 : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12",
|
|
|
|
"Cortex-A12 ARM processors",
|
|
|
|
[FeatureVMLxForwarding,
|
|
|
|
FeatureT2XtPk, FeatureVFP4,
|
|
|
|
FeatureHWDiv, FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureTrustZone]>;
|
|
|
|
|
2012-09-30 05:43:49 +08:00
|
|
|
|
2012-09-13 23:05:10 +08:00
|
|
|
// FIXME: It has not been determined if A15 has these features.
|
|
|
|
def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
|
|
|
|
"Cortex-A15 ARM processors",
|
2013-08-08 23:47:33 +08:00
|
|
|
[FeatureT2XtPk, FeatureVFP4,
|
2013-10-18 18:18:40 +08:00
|
|
|
FeatureMP, FeatureHWDiv, FeatureHWDivARM,
|
2013-04-10 20:08:35 +08:00
|
|
|
FeatureAvoidPartialCPSR,
|
2013-11-01 21:27:35 +08:00
|
|
|
FeatureTrustZone, FeatureVirtualization]>;
|
2013-10-14 21:16:57 +08:00
|
|
|
|
2014-10-13 18:22:19 +08:00
|
|
|
def ProcA17 : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17",
|
|
|
|
"Cortex-A17 ARM processors",
|
|
|
|
[FeatureVMLxForwarding,
|
|
|
|
FeatureT2XtPk, FeatureVFP4,
|
|
|
|
FeatureHWDiv, FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureTrustZone]>;
|
|
|
|
|
2013-10-14 21:16:57 +08:00
|
|
|
def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
|
|
|
|
"Cortex-A53 ARM processors",
|
2013-11-01 21:27:35 +08:00
|
|
|
[FeatureHWDiv, FeatureHWDivARM,
|
2013-10-14 21:16:57 +08:00
|
|
|
FeatureTrustZone, FeatureT2XtPk,
|
2013-10-29 17:47:35 +08:00
|
|
|
FeatureCrypto, FeatureCRC]>;
|
2013-10-14 21:16:57 +08:00
|
|
|
|
2013-10-14 21:17:07 +08:00
|
|
|
def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
|
|
|
|
"Cortex-A57 ARM processors",
|
2013-11-01 21:27:35 +08:00
|
|
|
[FeatureHWDiv, FeatureHWDivARM,
|
2013-10-14 21:17:07 +08:00
|
|
|
FeatureTrustZone, FeatureT2XtPk,
|
2013-10-29 17:47:35 +08:00
|
|
|
FeatureCrypto, FeatureCRC]>;
|
2013-10-14 21:17:07 +08:00
|
|
|
|
2012-12-21 12:35:05 +08:00
|
|
|
def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
|
|
|
|
"Cortex-R5 ARM processors",
|
2013-06-05 06:52:09 +08:00
|
|
|
[FeatureSlowFPBrcc,
|
|
|
|
FeatureHWDiv, FeatureHWDivARM,
|
2012-12-21 12:35:05 +08:00
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureT2XtPk]>;
|
2010-09-10 09:29:16 +08:00
|
|
|
|
2013-12-07 06:48:17 +08:00
|
|
|
// FIXME: krait has currently the same features as A9
|
|
|
|
// plus VFP4 and hardware division features.
|
|
|
|
def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
|
|
|
|
"Qualcomm ARM processors",
|
|
|
|
[FeatureVMLxForwarding,
|
|
|
|
FeatureT2XtPk, FeatureFP16,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM]>;
|
|
|
|
|
2014-01-02 21:40:08 +08:00
|
|
|
|
2009-06-19 09:51:50 +08:00
|
|
|
class ProcNoItin<string Name, list<SubtargetFeature> Features>
|
2012-06-22 11:58:51 +08:00
|
|
|
: Processor<Name, NoItineraries, Features>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V4 Processors.
|
2009-06-19 09:51:50 +08:00
|
|
|
def : ProcNoItin<"generic", []>;
|
|
|
|
def : ProcNoItin<"arm8", []>;
|
|
|
|
def : ProcNoItin<"arm810", []>;
|
|
|
|
def : ProcNoItin<"strongarm", []>;
|
|
|
|
def : ProcNoItin<"strongarm110", []>;
|
|
|
|
def : ProcNoItin<"strongarm1100", []>;
|
|
|
|
def : ProcNoItin<"strongarm1110", []>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V4T Processors.
|
2011-07-07 11:55:05 +08:00
|
|
|
def : ProcNoItin<"arm7tdmi", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm7tdmi-s", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm710t", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm720t", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm9", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm9tdmi", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm920", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm920t", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm922t", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"arm940t", [HasV4TOps]>;
|
|
|
|
def : ProcNoItin<"ep9312", [HasV4TOps]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V5T Processors.
|
2011-07-07 11:55:05 +08:00
|
|
|
def : ProcNoItin<"arm10tdmi", [HasV5TOps]>;
|
|
|
|
def : ProcNoItin<"arm1020t", [HasV5TOps]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V5TE Processors.
|
2011-07-07 11:55:05 +08:00
|
|
|
def : ProcNoItin<"arm9e", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm926ej-s", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm946e-s", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm966e-s", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm968e-s", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm10e", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm1020e", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"arm1022e", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"xscale", [HasV5TEOps]>;
|
|
|
|
def : ProcNoItin<"iwmmxt", [HasV5TEOps]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V6 Processors.
|
2011-07-07 11:55:05 +08:00
|
|
|
def : Processor<"arm1136j-s", ARMV6Itineraries, [HasV6Ops]>;
|
|
|
|
def : Processor<"arm1136jf-s", ARMV6Itineraries, [HasV6Ops, FeatureVFP2,
|
2010-12-06 06:04:16 +08:00
|
|
|
FeatureHasSlowFPVMLx]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
2010-08-11 14:30:38 +08:00
|
|
|
// V6M Processors.
|
2013-10-07 19:10:47 +08:00
|
|
|
def : Processor<"cortex-m0", ARMV6Itineraries, [HasV6MOps, FeatureNoARM,
|
2011-09-28 22:21:38 +08:00
|
|
|
FeatureDB, FeatureMClass]>;
|
2015-02-18 18:33:30 +08:00
|
|
|
def : Processor<"cortex-m0plus", ARMV6Itineraries, [HasV6MOps, FeatureNoARM,
|
|
|
|
FeatureDB, FeatureMClass]>;
|
|
|
|
def : Processor<"cortex-m1", ARMV6Itineraries, [HasV6MOps, FeatureNoARM,
|
|
|
|
FeatureDB, FeatureMClass]>;
|
|
|
|
def : Processor<"sc000", ARMV6Itineraries, [HasV6MOps, FeatureNoARM,
|
|
|
|
FeatureDB, FeatureMClass]>;
|
2010-08-11 14:30:38 +08:00
|
|
|
|
2015-03-17 19:55:28 +08:00
|
|
|
// V6K Processors.
|
|
|
|
def : Processor<"arm1176jz-s", ARMV6Itineraries, [HasV6KOps]>;
|
|
|
|
def : Processor<"arm1176jzf-s", ARMV6Itineraries, [HasV6KOps, FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
|
|
|
def : Processor<"mpcorenovfp", ARMV6Itineraries, [HasV6KOps]>;
|
|
|
|
def : Processor<"mpcore", ARMV6Itineraries, [HasV6KOps, FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
|
|
|
|
2009-06-09 05:20:36 +08:00
|
|
|
// V6T2 Processors.
|
2011-09-21 05:38:18 +08:00
|
|
|
def : Processor<"arm1156t2-s", ARMV6Itineraries, [HasV6T2Ops,
|
|
|
|
FeatureDSPThumb2]>;
|
2011-07-07 11:55:05 +08:00
|
|
|
def : Processor<"arm1156t2f-s", ARMV6Itineraries, [HasV6T2Ops, FeatureVFP2,
|
2011-09-21 05:38:18 +08:00
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureDSPThumb2]>;
|
2009-05-30 07:41:08 +08:00
|
|
|
|
2011-07-07 11:55:05 +08:00
|
|
|
// V7a Processors.
|
2012-11-30 03:48:01 +08:00
|
|
|
// FIXME: A5 has currently the same Schedule model as A8
|
|
|
|
def : ProcessorModel<"cortex-a5", CortexA8Model,
|
|
|
|
[ProcA5, HasV7Ops, FeatureNEON, FeatureDB,
|
|
|
|
FeatureVFP4, FeatureDSPThumb2,
|
2013-09-23 22:26:15 +08:00
|
|
|
FeatureHasRAS, FeatureAClass]>;
|
2013-11-21 22:03:21 +08:00
|
|
|
def : ProcessorModel<"cortex-a7", CortexA8Model,
|
|
|
|
[ProcA7, HasV7Ops, FeatureNEON, FeatureDB,
|
|
|
|
FeatureDSPThumb2, FeatureHasRAS,
|
|
|
|
FeatureAClass]>;
|
2012-07-07 12:00:00 +08:00
|
|
|
def : ProcessorModel<"cortex-a8", CortexA8Model,
|
2011-07-07 11:55:05 +08:00
|
|
|
[ProcA8, HasV7Ops, FeatureNEON, FeatureDB,
|
2013-09-23 22:26:15 +08:00
|
|
|
FeatureDSPThumb2, FeatureHasRAS,
|
|
|
|
FeatureAClass]>;
|
2012-07-07 12:00:00 +08:00
|
|
|
def : ProcessorModel<"cortex-a9", CortexA9Model,
|
2011-07-07 11:55:05 +08:00
|
|
|
[ProcA9, HasV7Ops, FeatureNEON, FeatureDB,
|
2014-11-04 01:38:00 +08:00
|
|
|
FeatureDSPThumb2, FeatureHasRAS, FeatureMP,
|
2013-09-23 22:26:15 +08:00
|
|
|
FeatureAClass]>;
|
2013-11-22 19:53:16 +08:00
|
|
|
|
|
|
|
// FIXME: A12 has currently the same Schedule model as A9
|
|
|
|
def : ProcessorModel<"cortex-a12", CortexA9Model,
|
|
|
|
[ProcA12, HasV7Ops, FeatureNEON, FeatureDB,
|
|
|
|
FeatureDSPThumb2, FeatureMP,
|
|
|
|
FeatureHasRAS, FeatureAClass]>;
|
|
|
|
|
2012-09-13 23:05:10 +08:00
|
|
|
// FIXME: A15 has currently the same ProcessorModel as A9.
|
|
|
|
def : ProcessorModel<"cortex-a15", CortexA9Model,
|
|
|
|
[ProcA15, HasV7Ops, FeatureNEON, FeatureDB,
|
2013-09-23 22:26:15 +08:00
|
|
|
FeatureDSPThumb2, FeatureHasRAS,
|
|
|
|
FeatureAClass]>;
|
2013-11-22 19:53:16 +08:00
|
|
|
|
2014-10-13 18:22:19 +08:00
|
|
|
// FIXME: A17 has currently the same Schedule model as A9
|
|
|
|
def : ProcessorModel<"cortex-a17", CortexA9Model,
|
|
|
|
[ProcA17, HasV7Ops, FeatureNEON, FeatureDB,
|
|
|
|
FeatureDSPThumb2, FeatureMP,
|
|
|
|
FeatureHasRAS, FeatureAClass]>;
|
|
|
|
|
2014-04-01 21:22:02 +08:00
|
|
|
// FIXME: krait has currently the same Schedule model as A9
|
|
|
|
def : ProcessorModel<"krait", CortexA9Model,
|
|
|
|
[ProcKrait, HasV7Ops,
|
|
|
|
FeatureNEON, FeatureDB,
|
|
|
|
FeatureDSPThumb2, FeatureHasRAS,
|
|
|
|
FeatureAClass]>;
|
|
|
|
|
2012-12-21 12:35:05 +08:00
|
|
|
// FIXME: R5 has currently the same ProcessorModel as A8.
|
|
|
|
def : ProcessorModel<"cortex-r5", CortexA8Model,
|
|
|
|
[ProcR5, HasV7Ops, FeatureDB,
|
|
|
|
FeatureVFP3, FeatureDSPThumb2,
|
2013-10-08 00:55:23 +08:00
|
|
|
FeatureHasRAS, FeatureVFPOnlySP,
|
[arm] Implement eabi_attribute, cpu, and fpu directives.
This commit allows the ARM integrated assembler to parse
and assemble the code with .eabi_attribute, .cpu, and
.fpu directives.
To implement the feature, this commit moves the code from
AttrEmitter to ARMTargetStreamers, and several new test
cases related to cortex-m4, cortex-r5, and cortex-a15 are
added.
Besides, this commit also change the Subtarget->isFPOnlySP()
to Subtarget->hasD16() to match the usage of .fpu directive.
This commit changes the test cases:
* Several .eabi_attribute directives in
2010-09-29-mc-asm-header-test.ll are removed because the .fpu
directive already cover the functionality.
* In the Cortex-A15 test case, the value for
Tag_Advanced_SIMD_arch has be changed from 1 to 2,
which is more precise.
llvm-svn: 193524
2013-10-29 01:51:12 +08:00
|
|
|
FeatureD16, FeatureRClass]>;
|
2010-08-11 14:30:38 +08:00
|
|
|
|
2015-02-18 18:33:30 +08:00
|
|
|
// FIXME: R7 has currently the same ProcessorModel as A8 and is modelled as R5.
|
|
|
|
def : ProcessorModel<"cortex-r7", CortexA8Model,
|
|
|
|
[ProcR5, HasV7Ops, FeatureDB,
|
|
|
|
FeatureVFP3, FeatureDSPThumb2,
|
|
|
|
FeatureHasRAS, FeatureVFPOnlySP,
|
|
|
|
FeatureD16, FeatureMP, FeatureRClass]>;
|
|
|
|
|
2010-08-11 14:30:38 +08:00
|
|
|
// V7M Processors.
|
2011-07-07 11:55:05 +08:00
|
|
|
def : ProcNoItin<"cortex-m3", [HasV7Ops,
|
|
|
|
FeatureThumb2, FeatureNoARM, FeatureDB,
|
2011-09-28 22:21:38 +08:00
|
|
|
FeatureHWDiv, FeatureMClass]>;
|
2015-02-18 18:33:30 +08:00
|
|
|
def : ProcNoItin<"sc300", [HasV7Ops,
|
|
|
|
FeatureThumb2, FeatureNoARM, FeatureDB,
|
|
|
|
FeatureHWDiv, FeatureMClass]>;
|
2011-07-07 11:55:05 +08:00
|
|
|
|
|
|
|
// V7EM Processors.
|
|
|
|
def : ProcNoItin<"cortex-m4", [HasV7Ops,
|
|
|
|
FeatureThumb2, FeatureNoARM, FeatureDB,
|
|
|
|
FeatureHWDiv, FeatureDSPThumb2,
|
2012-08-02 16:35:55 +08:00
|
|
|
FeatureT2XtPk, FeatureVFP4,
|
[arm] Implement eabi_attribute, cpu, and fpu directives.
This commit allows the ARM integrated assembler to parse
and assemble the code with .eabi_attribute, .cpu, and
.fpu directives.
To implement the feature, this commit moves the code from
AttrEmitter to ARMTargetStreamers, and several new test
cases related to cortex-m4, cortex-r5, and cortex-a15 are
added.
Besides, this commit also change the Subtarget->isFPOnlySP()
to Subtarget->hasD16() to match the usage of .fpu directive.
This commit changes the test cases:
* Several .eabi_attribute directives in
2010-09-29-mc-asm-header-test.ll are removed because the .fpu
directive already cover the functionality.
* In the Cortex-A15 test case, the value for
Tag_Advanced_SIMD_arch has be changed from 1 to 2,
which is more precise.
llvm-svn: 193524
2013-10-29 01:51:12 +08:00
|
|
|
FeatureVFPOnlySP, FeatureD16,
|
|
|
|
FeatureMClass]>;
|
2014-10-01 17:02:17 +08:00
|
|
|
def : ProcNoItin<"cortex-m7", [HasV7Ops,
|
|
|
|
FeatureThumb2, FeatureNoARM, FeatureDB,
|
|
|
|
FeatureHWDiv, FeatureDSPThumb2,
|
|
|
|
FeatureT2XtPk, FeatureFPARMv8,
|
|
|
|
FeatureD16, FeatureMClass]>;
|
|
|
|
|
2009-05-24 03:51:43 +08:00
|
|
|
|
2012-09-30 05:43:49 +08:00
|
|
|
// Swift uArch Processors.
|
|
|
|
def : ProcessorModel<"swift", SwiftModel,
|
|
|
|
[ProcSwift, HasV7Ops, FeatureNEON,
|
|
|
|
FeatureDB, FeatureDSPThumb2,
|
2013-09-23 22:26:15 +08:00
|
|
|
FeatureHasRAS, FeatureAClass]>;
|
2012-09-30 05:43:49 +08:00
|
|
|
|
2013-06-27 00:58:26 +08:00
|
|
|
// V8 Processors
|
2013-10-14 21:16:57 +08:00
|
|
|
def : ProcNoItin<"cortex-a53", [ProcA53, HasV8Ops, FeatureAClass,
|
|
|
|
FeatureDB, FeatureFPARMv8,
|
|
|
|
FeatureNEON, FeatureDSPThumb2]>;
|
2013-10-14 21:17:07 +08:00
|
|
|
def : ProcNoItin<"cortex-a57", [ProcA57, HasV8Ops, FeatureAClass,
|
|
|
|
FeatureDB, FeatureFPARMv8,
|
|
|
|
FeatureNEON, FeatureDSPThumb2]>;
|
2015-02-04 21:31:29 +08:00
|
|
|
// FIXME: Cortex-A72 is currently modelled as an Cortex-A57.
|
|
|
|
def : ProcNoItin<"cortex-a72", [ProcA57, HasV8Ops, FeatureAClass,
|
|
|
|
FeatureDB, FeatureFPARMv8,
|
|
|
|
FeatureNEON, FeatureDSPThumb2]>;
|
2013-06-27 00:58:26 +08:00
|
|
|
|
2014-04-01 21:22:02 +08:00
|
|
|
// Cyclone is very similar to swift
|
|
|
|
def : ProcessorModel<"cyclone", SwiftModel,
|
|
|
|
[ProcSwift, HasV8Ops, HasV7Ops,
|
|
|
|
FeatureCrypto, FeatureFPARMv8,
|
|
|
|
FeatureDB,FeatureDSPThumb2,
|
|
|
|
FeatureHasRAS, FeatureZCZeroing]>;
|
2013-12-07 06:48:17 +08:00
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Register File Description
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "ARMRegisterInfo.td"
|
|
|
|
|
2009-04-18 03:07:39 +08:00
|
|
|
include "ARMCallingConv.td"
|
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Instruction Descriptions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "ARMInstrInfo.td"
|
|
|
|
|
2010-04-05 11:10:20 +08:00
|
|
|
def ARMInstrInfo : InstrInfo;
|
2006-05-15 06:18:28 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Declare the target which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def ARM : Target {
|
|
|
|
// Pull in Instruction Info:
|
|
|
|
let InstructionSet = ARMInstrInfo;
|
|
|
|
}
|