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
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Helper classes.
|
|
|
|
//
|
|
|
|
|
|
|
|
class ProcNoItin<string Name, list<SubtargetFeature> Features>
|
|
|
|
: Processor<Name, NoItineraries, Features>;
|
|
|
|
|
|
|
|
class Architecture<string fname, string aname, list<SubtargetFeature> features >
|
|
|
|
: SubtargetFeature<fname, "ARMArch", aname,
|
|
|
|
!strconcat(aname, " architecture"), features>;
|
|
|
|
|
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
|
|
|
|
2015-05-12 09:26:05 +08:00
|
|
|
def ModeSoftFloat : SubtargetFeature<"soft-float", "UseSoftFloat", "true",
|
|
|
|
"Use software floating point features.">;
|
|
|
|
|
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]>;
|
2015-12-01 18:23:06 +08:00
|
|
|
def FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true",
|
|
|
|
"Enable full half-precision floating point",
|
|
|
|
[FeatureFPARMv8]>;
|
2010-10-13 00:22:47 +08:00
|
|
|
def FeatureD16 : SubtargetFeature<"d16", "HasD16", "true",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Restrict FP 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">;
|
2016-01-15 18:23:46 +08:00
|
|
|
def FeatureV7Clrex : SubtargetFeature<"v7clrex", "HasV7Clrex", "true",
|
|
|
|
"Has v7 clrex instruction">;
|
|
|
|
def FeatureAcquireRelease : SubtargetFeature<"acquire-release",
|
|
|
|
"HasAcquireRelease", "true",
|
|
|
|
"Has v8 acquire/release (lda/ldaex etc) 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">;
|
2016-01-25 19:24:47 +08:00
|
|
|
def Feature8MSecExt : SubtargetFeature<"8msecext", "Has8MSecExt", "true",
|
|
|
|
"Enable support for ARMv8-M 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">;
|
2016-06-03 22:03:27 +08:00
|
|
|
// Not to be confused with FeatureHasRetAddrStack (return address stack)
|
|
|
|
def FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true",
|
|
|
|
"Enable Reliability, Availability and Serviceability extensions">;
|
2016-10-13 22:57:43 +08:00
|
|
|
def FeatureFPAO : SubtargetFeature<"fpao", "HasFPAO", "true",
|
|
|
|
"Enable fast computation of positive address offsets">;
|
2016-06-03 22:03:27 +08:00
|
|
|
|
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">;
|
|
|
|
|
2016-06-23 15:47:35 +08:00
|
|
|
// Whether or not it may be profitable to unpredicate certain instructions
|
|
|
|
// during if conversion.
|
|
|
|
def FeatureProfUnpredicate : SubtargetFeature<"prof-unpr",
|
|
|
|
"IsProfitableToUnpredicate",
|
|
|
|
"true",
|
|
|
|
"Is profitable to unpredicate">;
|
|
|
|
|
|
|
|
// Some targets (e.g. Swift) have microcoded VGETLNi32.
|
|
|
|
def FeatureSlowVGETLNi32 : SubtargetFeature<"slow-vgetlni32",
|
|
|
|
"HasSlowVGETLNi32", "true",
|
|
|
|
"Has slow VGETLNi32 - prefer VMOV">;
|
|
|
|
|
|
|
|
// Some targets (e.g. Swift) have microcoded VDUP32.
|
|
|
|
def FeatureSlowVDUP32 : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32", "true",
|
|
|
|
"Has slow VDUP32 - prefer VMOV">;
|
|
|
|
|
|
|
|
// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON
|
|
|
|
// for scalar FP, as this allows more effective execution domain optimization.
|
|
|
|
def FeaturePreferVMOVSR : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR",
|
|
|
|
"true", "Prefer VMOVSR">;
|
|
|
|
|
|
|
|
// Swift has ISHST barriers compatible with Atomic Release semantics but weaker
|
|
|
|
// than ISH
|
|
|
|
def FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHST",
|
|
|
|
"true", "Prefer ISHST barriers">;
|
|
|
|
|
2016-07-06 17:22:23 +08:00
|
|
|
// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU.
|
|
|
|
def FeatureMuxedUnits : SubtargetFeature<"muxed-units", "HasMuxedUnits", "true",
|
|
|
|
"Has muxed AGU and NEON/FPU">;
|
|
|
|
|
|
|
|
// On some targets, a VLDM/VSTM starting with an odd register number needs more
|
|
|
|
// microops than single VLDRS.
|
|
|
|
def FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "SlowOddRegister",
|
|
|
|
"true", "VLDM/VSTM starting with an odd register is slow">;
|
|
|
|
|
|
|
|
// Some targets have a renaming dependency when loading into D subregisters.
|
|
|
|
def FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg",
|
|
|
|
"SlowLoadDSubregister", "true",
|
|
|
|
"Loading into D subregs is slow">;
|
2016-07-06 19:22:11 +08:00
|
|
|
// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD.
|
|
|
|
def FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs",
|
|
|
|
"DontWidenVMOVS", "true",
|
|
|
|
"Don't widen VMOVS to VMOVD">;
|
2016-07-06 17:22:23 +08:00
|
|
|
|
2016-07-07 17:11:39 +08:00
|
|
|
// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions.
|
|
|
|
def FeatureExpandMLx : SubtargetFeature<"expand-fp-mlx", "ExpandMLx", "true",
|
|
|
|
"Expand VFP/NEON MLA/MLS instructions">;
|
|
|
|
|
|
|
|
// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS.
|
|
|
|
def FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards",
|
|
|
|
"true", "Has VMLx hazards">;
|
|
|
|
|
2016-06-23 15:47:35 +08:00
|
|
|
// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from
|
|
|
|
// VFP to NEON, as an execution domain optimization.
|
|
|
|
def FeatureNEONForFPMovs : SubtargetFeature<"neon-fpmovs", "UseNEONForFPMovs",
|
|
|
|
"true", "Convert VMOVSR, VMOVRS, VMOVS to NEON">;
|
|
|
|
|
|
|
|
// Some processors benefit from using NEON instructions for scalar
|
|
|
|
// single-precision FP operations. This affects instruction selection and should
|
|
|
|
// only be enabled if the handling of denormals is not important.
|
|
|
|
def FeatureNEONForFP : SubtargetFeature<"neonfp", "UseNEONForSinglePrecisionFP",
|
|
|
|
"true",
|
|
|
|
"Use NEON for single precision FP">;
|
|
|
|
|
2016-06-27 17:08:23 +08:00
|
|
|
// On some processors, VLDn instructions that access unaligned data take one
|
|
|
|
// extra cycle. Take that into account when computing operand latencies.
|
|
|
|
def FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAlign",
|
|
|
|
"true",
|
|
|
|
"Check for VLDn unaligned access">;
|
|
|
|
|
|
|
|
// Some processors have a nonpipelined VFP coprocessor.
|
|
|
|
def FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp",
|
|
|
|
"NonpipelinedVFP", "true",
|
|
|
|
"VFP instructions are not pipelined">;
|
|
|
|
|
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-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.
|
2016-06-03 22:03:27 +08:00
|
|
|
def FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack", "HasRetAddrStack", "true",
|
2012-02-29 02:51:51 +08:00
|
|
|
"Has return address stack">;
|
|
|
|
|
2015-10-24 01:19:19 +08:00
|
|
|
/// DSP extension.
|
|
|
|
def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true",
|
2015-09-25 01:31:16 +08:00
|
|
|
"Supports DSP instructions in ARM and/or 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">;
|
|
|
|
|
2015-07-29 06:44:28 +08:00
|
|
|
def FeatureStrictAlign : SubtargetFeature<"strict-align",
|
|
|
|
"StrictAlign", "true",
|
|
|
|
"Disallow all unaligned memory "
|
|
|
|
"access">;
|
|
|
|
|
2015-07-07 14:54:42 +08:00
|
|
|
def FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls", "true",
|
|
|
|
"Generate calls via indirect call "
|
|
|
|
"instructions">;
|
|
|
|
|
2015-07-21 09:42:02 +08:00
|
|
|
def FeatureReserveR9 : SubtargetFeature<"reserve-r9", "ReserveR9", "true",
|
|
|
|
"Reserve R9, making it unavailable as "
|
|
|
|
"GPR">;
|
|
|
|
|
2015-07-16 08:58:23 +08:00
|
|
|
def FeatureNoMovt : SubtargetFeature<"no-movt", "NoMovt", "true",
|
|
|
|
"Don't use movt/movw pairs for 32-bit "
|
|
|
|
"imms">;
|
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM ISAa.
|
|
|
|
//
|
|
|
|
|
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]>;
|
2016-01-15 18:24:39 +08:00
|
|
|
def HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true",
|
|
|
|
"Support ARM v8M Baseline instructions",
|
|
|
|
[HasV6MOps]>;
|
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",
|
2016-01-15 18:24:39 +08:00
|
|
|
[HasV8MBaselineOps, 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",
|
2016-01-15 18:23:46 +08:00
|
|
|
[HasV6T2Ops, FeaturePerfMon,
|
|
|
|
FeatureV7Clrex]>;
|
2013-06-27 00:58:26 +08:00
|
|
|
def HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true",
|
|
|
|
"Support ARM v8 instructions",
|
2016-07-20 03:49:13 +08:00
|
|
|
[HasV7Ops, FeatureAcquireRelease,
|
|
|
|
FeatureT2XtPk]>;
|
2015-04-01 22:54:56 +08:00
|
|
|
def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
|
2015-03-27 01:05:54 +08:00
|
|
|
"Support ARM v8.1a instructions",
|
2015-11-16 19:10:19 +08:00
|
|
|
[HasV8Ops]>;
|
2015-12-01 18:23:06 +08:00
|
|
|
def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
|
|
|
|
"Support ARM v8.2a instructions",
|
|
|
|
[HasV8_1aOps]>;
|
2016-01-15 18:24:39 +08:00
|
|
|
def HasV8MMainlineOps : SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true",
|
|
|
|
"Support ARM v8M Mainline instructions",
|
|
|
|
[HasV7Ops]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
2010-08-11 14:51:54 +08:00
|
|
|
|
2007-01-19 15:51:42 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2015-11-16 19:10:19 +08:00
|
|
|
// ARM Processor subtarget features.
|
2007-01-19 15:51:42 +08:00
|
|
|
//
|
|
|
|
|
2012-11-30 03:48:01 +08:00
|
|
|
def ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A5 ARM processors", []>;
|
2013-11-21 22:03:21 +08:00
|
|
|
def ProcA7 : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A7 ARM processors", []>;
|
2010-09-10 09:29:16 +08:00
|
|
|
def ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A8 ARM processors", []>;
|
2010-09-10 09:29:16 +08:00
|
|
|
def ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A9 ARM processors", []>;
|
2013-11-22 19:53:16 +08:00
|
|
|
def ProcA12 : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A12 ARM processors", []>;
|
|
|
|
def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
|
|
|
|
"Cortex-A15 ARM processors", []>;
|
2014-10-13 18:22:19 +08:00
|
|
|
def ProcA17 : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A17 ARM processors", []>;
|
2016-03-22 01:29:01 +08:00
|
|
|
def ProcA32 : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32",
|
|
|
|
"Cortex-A32 ARM processors", []>;
|
2015-12-02 19:53:44 +08:00
|
|
|
def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
|
|
|
|
"Cortex-A35 ARM processors", []>;
|
2013-10-14 21:16:57 +08:00
|
|
|
def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A53 ARM processors", []>;
|
2013-10-14 21:17:07 +08:00
|
|
|
def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-A57 ARM processors", []>;
|
|
|
|
def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
|
|
|
|
"Cortex-A72 ARM processors", []>;
|
2016-06-02 18:48:52 +08:00
|
|
|
def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
|
|
|
|
"Cortex-A73 ARM processors", []>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
|
|
|
|
"Qualcomm ARM processors", []>;
|
|
|
|
def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift",
|
|
|
|
"Swift ARM processors", []>;
|
2013-10-14 21:17:07 +08:00
|
|
|
|
2016-01-05 20:51:59 +08:00
|
|
|
def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1",
|
|
|
|
"Samsung Exynos-M1 processors", []>;
|
2015-04-09 22:07:28 +08:00
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
def ProcR4 : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4",
|
2016-01-15 18:23:46 +08:00
|
|
|
"Cortex-R4 ARM processors", []>;
|
2012-12-21 12:35:05 +08:00
|
|
|
def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
|
2015-11-16 19:10:19 +08:00
|
|
|
"Cortex-R5 ARM processors", []>;
|
|
|
|
def ProcR7 : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7",
|
|
|
|
"Cortex-R7 ARM processors", []>;
|
2016-10-07 20:06:40 +08:00
|
|
|
def ProcR52 : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52",
|
|
|
|
"Cortex-R52 ARM processors", []>;
|
2013-12-07 06:48:17 +08:00
|
|
|
|
2016-03-24 00:18:13 +08:00
|
|
|
def ProcM3 : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3",
|
|
|
|
"Cortex-M3 ARM processors", []>;
|
2014-01-02 21:40:08 +08:00
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM schedules.
|
|
|
|
//
|
|
|
|
|
|
|
|
include "ARMSchedule.td"
|
|
|
|
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM architectures
|
|
|
|
//
|
|
|
|
|
|
|
|
def ARMv2 : Architecture<"armv2", "ARMv2", []>;
|
|
|
|
|
|
|
|
def ARMv2a : Architecture<"armv2a", "ARMv2a", []>;
|
|
|
|
|
|
|
|
def ARMv3 : Architecture<"armv3", "ARMv3", []>;
|
|
|
|
|
|
|
|
def ARMv3m : Architecture<"armv3m", "ARMv3m", []>;
|
|
|
|
|
|
|
|
def ARMv4 : Architecture<"armv4", "ARMv4", []>;
|
|
|
|
|
|
|
|
def ARMv4t : Architecture<"armv4t", "ARMv4t", [HasV4TOps]>;
|
|
|
|
|
|
|
|
def ARMv5t : Architecture<"armv5t", "ARMv5t", [HasV5TOps]>;
|
|
|
|
|
|
|
|
def ARMv5te : Architecture<"armv5te", "ARMv5te", [HasV5TEOps]>;
|
|
|
|
|
|
|
|
def ARMv5tej : Architecture<"armv5tej", "ARMv5tej", [HasV5TEOps]>;
|
|
|
|
|
|
|
|
def ARMv6 : Architecture<"armv6", "ARMv6", [HasV6Ops]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
def ARMv6t2 : Architecture<"armv6t2", "ARMv6t2", [HasV6T2Ops,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureDSP,
|
|
|
|
FeatureT2XtPk]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def ARMv6k : Architecture<"armv6k", "ARMv6k", [HasV6KOps]>;
|
|
|
|
|
2015-11-16 22:05:32 +08:00
|
|
|
def ARMv6kz : Architecture<"armv6kz", "ARMv6kz", [HasV6KOps,
|
2015-10-29 21:56:19 +08:00
|
|
|
FeatureTrustZone]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def ARMv6m : Architecture<"armv6-m", "ARMv6m", [HasV6MOps,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureMClass]>;
|
|
|
|
|
|
|
|
def ARMv6sm : Architecture<"armv6s-m", "ARMv6sm", [HasV6MOps,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureMClass]>;
|
|
|
|
|
|
|
|
def ARMv7a : Architecture<"armv7-a", "ARMv7a", [HasV7Ops,
|
|
|
|
FeatureNEON,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureDSP,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAClass,
|
|
|
|
FeatureT2XtPk]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def ARMv7r : Architecture<"armv7-r", "ARMv7r", [HasV7Ops,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureHWDiv,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureRClass,
|
|
|
|
FeatureT2XtPk]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def ARMv7m : Architecture<"armv7-m", "ARMv7m", [HasV7Ops,
|
|
|
|
FeatureThumb2,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureMClass]>;
|
|
|
|
|
|
|
|
def ARMv7em : Architecture<"armv7e-m", "ARMv7em", [HasV7Ops,
|
|
|
|
FeatureThumb2,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureMClass,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureT2XtPk]>;
|
|
|
|
|
|
|
|
def ARMv8a : Architecture<"armv8-a", "ARMv8a", [HasV8Ops,
|
|
|
|
FeatureAClass,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureNEON,
|
|
|
|
FeatureDSP,
|
2015-10-29 21:56:19 +08:00
|
|
|
FeatureTrustZone,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureMP,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
|
|
|
def ARMv81a : Architecture<"armv8.1-a", "ARMv81a", [HasV8_1aOps,
|
|
|
|
FeatureAClass,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureNEON,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
2015-12-01 18:33:56 +08:00
|
|
|
def ARMv82a : Architecture<"armv8.2-a", "ARMv82a", [HasV8_2aOps,
|
|
|
|
FeatureAClass,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureNEON,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureCrypto,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureCRC,
|
|
|
|
FeatureRAS]>;
|
2015-12-01 18:33:56 +08:00
|
|
|
|
2016-10-07 20:06:40 +08:00
|
|
|
def ARMv8r : Architecture<"armv8-r", "ARMv8r", [HasV8Ops,
|
|
|
|
FeatureRClass,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureT2XtPk,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureCRC,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureNEON]>;
|
|
|
|
|
2016-01-15 18:24:39 +08:00
|
|
|
def ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline",
|
|
|
|
[HasV8MBaselineOps,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureHWDiv,
|
2016-01-15 18:26:51 +08:00
|
|
|
FeatureV7Clrex,
|
2016-01-25 19:24:47 +08:00
|
|
|
Feature8MSecExt,
|
2016-01-15 18:24:39 +08:00
|
|
|
FeatureAcquireRelease,
|
|
|
|
FeatureMClass]>;
|
|
|
|
|
|
|
|
def ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline",
|
|
|
|
[HasV8MMainlineOps,
|
|
|
|
FeatureNoARM,
|
|
|
|
FeatureDB,
|
|
|
|
FeatureHWDiv,
|
2016-01-25 19:24:47 +08:00
|
|
|
Feature8MSecExt,
|
2016-01-15 18:24:39 +08:00
|
|
|
FeatureAcquireRelease,
|
|
|
|
FeatureMClass]>;
|
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
// Aliases
|
|
|
|
def IWMMXT : Architecture<"iwmmxt", "ARMv5te", [ARMv5te]>;
|
|
|
|
def IWMMXT2 : Architecture<"iwmmxt2", "ARMv5te", [ARMv5te]>;
|
|
|
|
def XScale : Architecture<"xscale", "ARMv5te", [ARMv5te]>;
|
|
|
|
def ARMv6j : Architecture<"armv6j", "ARMv7a", [ARMv6]>;
|
|
|
|
def ARMv7k : Architecture<"armv7k", "ARMv7a", [ARMv7a]>;
|
|
|
|
def ARMv7s : Architecture<"armv7s", "ARMv7a", [ARMv7a]>;
|
|
|
|
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM processors
|
|
|
|
//
|
|
|
|
|
|
|
|
// Dummy CPU, used to target architectures
|
|
|
|
def : ProcNoItin<"generic", []>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"arm8", [ARMv4]>;
|
|
|
|
def : ProcNoItin<"arm810", [ARMv4]>;
|
|
|
|
def : ProcNoItin<"strongarm", [ARMv4]>;
|
|
|
|
def : ProcNoItin<"strongarm110", [ARMv4]>;
|
|
|
|
def : ProcNoItin<"strongarm1100", [ARMv4]>;
|
|
|
|
def : ProcNoItin<"strongarm1110", [ARMv4]>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"arm7tdmi", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm7tdmi-s", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm710t", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm720t", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm9", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm9tdmi", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm920", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm920t", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm922t", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"arm940t", [ARMv4t]>;
|
|
|
|
def : ProcNoItin<"ep9312", [ARMv4t]>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"arm10tdmi", [ARMv5t]>;
|
|
|
|
def : ProcNoItin<"arm1020t", [ARMv5t]>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"arm9e", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm926ej-s", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm946e-s", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm966e-s", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm968e-s", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm10e", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm1020e", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"arm1022e", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"xscale", [ARMv5te]>;
|
|
|
|
def : ProcNoItin<"iwmmxt", [ARMv5te]>;
|
|
|
|
|
|
|
|
def : Processor<"arm1136j-s", ARMV6Itineraries, [ARMv6]>;
|
|
|
|
def : Processor<"arm1136jf-s", ARMV6Itineraries, [ARMv6,
|
|
|
|
FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
|
|
|
|
|
|
|
def : Processor<"cortex-m0", ARMV6Itineraries, [ARMv6m]>;
|
|
|
|
def : Processor<"cortex-m0plus", ARMV6Itineraries, [ARMv6m]>;
|
|
|
|
def : Processor<"cortex-m1", ARMV6Itineraries, [ARMv6m]>;
|
|
|
|
def : Processor<"sc000", ARMV6Itineraries, [ARMv6m]>;
|
|
|
|
|
2015-11-16 22:05:32 +08:00
|
|
|
def : Processor<"arm1176jz-s", ARMV6Itineraries, [ARMv6kz]>;
|
|
|
|
def : Processor<"arm1176jzf-s", ARMV6Itineraries, [ARMv6kz,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
|
|
|
|
|
|
|
def : Processor<"mpcorenovfp", ARMV6Itineraries, [ARMv6k]>;
|
|
|
|
def : Processor<"mpcore", ARMV6Itineraries, [ARMv6k,
|
|
|
|
FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
|
|
|
|
|
|
|
def : Processor<"arm1156t2-s", ARMV6Itineraries, [ARMv6t2]>;
|
|
|
|
def : Processor<"arm1156t2f-s", ARMV6Itineraries, [ARMv6t2,
|
|
|
|
FeatureVFP2,
|
|
|
|
FeatureHasSlowFPVMLx]>;
|
2009-05-30 07:41:08 +08:00
|
|
|
|
2012-11-30 03:48:01 +08:00
|
|
|
// FIXME: A5 has currently the same Schedule model as A8
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-a5", CortexA8Model, [ARMv7a, ProcA5,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureSlowFPBrcc,
|
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVFP4]>;
|
|
|
|
|
|
|
|
def : ProcessorModel<"cortex-a7", CortexA8Model, [ARMv7a, ProcA7,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureSlowFPBrcc,
|
2016-07-07 17:11:39 +08:00
|
|
|
FeatureHasVMLxHazards,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureVirtualization]>;
|
|
|
|
|
|
|
|
def : ProcessorModel<"cortex-a8", CortexA8Model, [ARMv7a, ProcA8,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2016-06-27 17:08:23 +08:00
|
|
|
FeatureNonpipelinedVFP,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureSlowFPBrcc,
|
2016-07-07 17:11:39 +08:00
|
|
|
FeatureHasVMLxHazards,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureHasSlowFPVMLx,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureVMLxForwarding]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def : ProcessorModel<"cortex-a9", CortexA9Model, [ARMv7a, ProcA9,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
2016-07-07 17:11:39 +08:00
|
|
|
FeatureHasVMLxHazards,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureFP16,
|
|
|
|
FeatureAvoidPartialCPSR,
|
2016-07-07 17:11:39 +08:00
|
|
|
FeatureExpandMLx,
|
2016-06-23 15:47:35 +08:00
|
|
|
FeaturePreferVMOVSR,
|
2016-07-06 17:22:23 +08:00
|
|
|
FeatureMuxedUnits,
|
2016-06-23 15:47:35 +08:00
|
|
|
FeatureNEONForFPMovs,
|
2016-06-27 17:08:23 +08:00
|
|
|
FeatureCheckVLDnAlign,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureMP]>;
|
2013-11-22 19:53:16 +08:00
|
|
|
|
|
|
|
// FIXME: A12 has currently the same Schedule model as A9
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-a12", CortexA9Model, [ARMv7a, ProcA12,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVirtualization,
|
|
|
|
FeatureMP]>;
|
|
|
|
|
|
|
|
// FIXME: A15 has currently the same Schedule model as A9.
|
|
|
|
def : ProcessorModel<"cortex-a15", CortexA9Model, [ARMv7a, ProcA15,
|
2016-07-06 19:22:11 +08:00
|
|
|
FeatureDontWidenVMOVS,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2016-07-06 17:22:23 +08:00
|
|
|
FeatureMuxedUnits,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureMP,
|
2016-06-27 17:08:23 +08:00
|
|
|
FeatureCheckVLDnAlign,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVirtualization]>;
|
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
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-a17", CortexA9Model, [ARMv7a, ProcA17,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureTrustZone,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVirtualization]>;
|
2014-10-13 18:22:19 +08:00
|
|
|
|
2014-04-01 21:22:02 +08:00
|
|
|
// FIXME: krait has currently the same Schedule model as A9
|
2015-11-16 19:10:19 +08:00
|
|
|
// FIXME: krait has currently the same features as A9 plus VFP4 and hardware
|
|
|
|
// division features.
|
|
|
|
def : ProcessorModel<"krait", CortexA9Model, [ARMv7a, ProcKrait,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2016-07-06 17:22:23 +08:00
|
|
|
FeatureMuxedUnits,
|
2016-06-27 17:08:23 +08:00
|
|
|
FeatureCheckVLDnAlign,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureVMLxForwarding,
|
|
|
|
FeatureFP16,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM]>;
|
|
|
|
|
|
|
|
def : ProcessorModel<"swift", SwiftModel, [ARMv7a, ProcSwift,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureNEONForFP,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureAvoidMOVsShOp,
|
2016-06-23 15:47:35 +08:00
|
|
|
FeatureHasSlowFPVMLx,
|
2016-07-07 17:11:39 +08:00
|
|
|
FeatureHasVMLxHazards,
|
2016-06-23 15:47:35 +08:00
|
|
|
FeatureProfUnpredicate,
|
|
|
|
FeaturePrefISHSTBarrier,
|
2016-07-06 17:22:23 +08:00
|
|
|
FeatureSlowOddRegister,
|
|
|
|
FeatureSlowLoadDSubreg,
|
2016-06-23 15:47:35 +08:00
|
|
|
FeatureSlowVGETLNi32,
|
|
|
|
FeatureSlowVDUP32]>;
|
2014-04-01 21:22:02 +08:00
|
|
|
|
2015-04-09 22:07:28 +08:00
|
|
|
// FIXME: R4 has currently the same ProcessorModel as A8.
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-r4", CortexA8Model, [ARMv7r, ProcR4,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAvoidPartialCPSR]>;
|
2015-04-09 22:07:28 +08:00
|
|
|
|
|
|
|
// FIXME: R4F has currently the same ProcessorModel as A8.
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-r4f", CortexA8Model, [ARMv7r, ProcR4,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureSlowFPBrcc,
|
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureVFP3,
|
|
|
|
FeatureD16,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAvoidPartialCPSR]>;
|
2015-04-09 22:07:28 +08:00
|
|
|
|
2012-12-21 12:35:05 +08:00
|
|
|
// FIXME: R5 has currently the same ProcessorModel as A8.
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-r5", CortexA8Model, [ARMv7r, ProcR5,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureVFP3,
|
|
|
|
FeatureD16,
|
|
|
|
FeatureSlowFPBrcc,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureHasSlowFPVMLx,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAvoidPartialCPSR]>;
|
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.
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cortex-r7", CortexA8Model, [ARMv7r, ProcR7,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureVFP3,
|
|
|
|
FeatureD16,
|
2015-12-07 18:54:36 +08:00
|
|
|
FeatureFP16,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureMP,
|
|
|
|
FeatureSlowFPBrcc,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureHasSlowFPVMLx,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAvoidPartialCPSR]>;
|
2016-03-11 01:38:41 +08:00
|
|
|
|
|
|
|
def : ProcessorModel<"cortex-r8", CortexA8Model, [ARMv7r,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2016-03-11 01:38:41 +08:00
|
|
|
FeatureVFP3,
|
|
|
|
FeatureD16,
|
|
|
|
FeatureFP16,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureSlowFPBrcc,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureHasSlowFPVMLx,
|
2016-07-20 03:49:13 +08:00
|
|
|
FeatureAvoidPartialCPSR]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
2016-03-24 00:18:13 +08:00
|
|
|
def : ProcNoItin<"cortex-m3", [ARMv7m, ProcM3]>;
|
|
|
|
def : ProcNoItin<"sc300", [ARMv7m, ProcM3]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def : ProcNoItin<"cortex-m4", [ARMv7em,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureVFPOnlySP,
|
|
|
|
FeatureD16]>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"cortex-m7", [ARMv7em,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureD16]>;
|
|
|
|
|
2017-02-01 19:55:03 +08:00
|
|
|
def : ProcNoItin<"cortex-m23", [ARMv8mBaseline,
|
|
|
|
FeatureNoMovt]>;
|
|
|
|
|
|
|
|
def : ProcNoItin<"cortex-m33", [ARMv8mMainline,
|
|
|
|
FeatureDSP,
|
|
|
|
FeatureT2XtPk,
|
|
|
|
FeatureFPARMv8,
|
|
|
|
FeatureD16,
|
|
|
|
FeatureVFPOnlySP]>;
|
|
|
|
|
2016-03-22 01:29:01 +08:00
|
|
|
def : ProcNoItin<"cortex-a32", [ARMv8a,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
2015-12-02 19:53:44 +08:00
|
|
|
def : ProcNoItin<"cortex-a35", [ARMv8a, ProcA35,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcNoItin<"cortex-a53", [ARMv8a, ProcA53,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
2016-10-13 22:57:43 +08:00
|
|
|
FeatureCRC,
|
|
|
|
FeatureFPAO]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def : ProcNoItin<"cortex-a57", [ARMv8a, ProcA57,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
2016-10-13 22:57:43 +08:00
|
|
|
FeatureCRC,
|
|
|
|
FeatureFPAO]>;
|
2015-11-16 19:10:19 +08:00
|
|
|
|
|
|
|
def : ProcNoItin<"cortex-a72", [ARMv8a, ProcA72,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
2013-06-27 00:58:26 +08:00
|
|
|
|
2016-06-02 18:48:52 +08:00
|
|
|
def : ProcNoItin<"cortex-a73", [ARMv8a, ProcA73,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
2014-04-01 21:22:02 +08:00
|
|
|
// Cyclone is very similar to swift
|
2015-11-16 19:10:19 +08:00
|
|
|
def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift,
|
2016-06-03 22:03:27 +08:00
|
|
|
FeatureHasRetAddrStack,
|
2015-11-16 19:10:19 +08:00
|
|
|
FeatureNEONForFP,
|
|
|
|
FeatureVFP4,
|
|
|
|
FeatureMP,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureAvoidPartialCPSR,
|
|
|
|
FeatureAvoidMOVsShOp,
|
|
|
|
FeatureHasSlowFPVMLx,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureZCZeroing]>;
|
|
|
|
|
2016-01-05 20:51:59 +08:00
|
|
|
def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynosM1,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
2013-12-07 06:48:17 +08:00
|
|
|
|
2016-08-02 02:39:45 +08:00
|
|
|
def : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynosM1,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
2016-12-14 07:31:41 +08:00
|
|
|
def : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynosM1,
|
|
|
|
FeatureHWDiv,
|
|
|
|
FeatureHWDivARM,
|
|
|
|
FeatureCrypto,
|
|
|
|
FeatureCRC]>;
|
|
|
|
|
2016-11-15 19:34:54 +08:00
|
|
|
def : ProcessorModel<"cortex-r52", CortexR52Model, [ARMv8r, ProcR52,
|
2016-10-18 17:08:54 +08:00
|
|
|
FeatureFPAO]>;
|
2016-10-07 20:06:40 +08:00
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Register File Description
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "ARMRegisterInfo.td"
|
|
|
|
|
2017-02-05 20:07:55 +08:00
|
|
|
include "ARMRegisterBanks.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
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-03-28 07:41:42 +08:00
|
|
|
def ARMAsmWriter : AsmWriter {
|
|
|
|
string AsmWriterClassName = "InstPrinter";
|
|
|
|
int PassSubtarget = 1;
|
|
|
|
int Variant = 0;
|
|
|
|
bit isMCAsmWriter = 1;
|
|
|
|
}
|
|
|
|
|
2015-11-09 08:31:07 +08:00
|
|
|
def ARMAsmParserVariant : AsmParserVariant {
|
|
|
|
int Variant = 0;
|
|
|
|
string Name = "ARM";
|
|
|
|
string BreakCharacters = ".";
|
|
|
|
}
|
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
def ARM : Target {
|
|
|
|
// Pull in Instruction Info:
|
|
|
|
let InstructionSet = ARMInstrInfo;
|
2015-03-28 07:41:42 +08:00
|
|
|
let AssemblyWriters = [ARMAsmWriter];
|
2015-11-09 08:31:07 +08:00
|
|
|
let AssemblyParserVariants = [ARMAsmParserVariant];
|
2006-05-15 06:18:28 +08:00
|
|
|
}
|