xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ARM.td (revision 8bcb0991864975618c09697b1aca10683346d9f0)
10b57cec5SDimitry Andric//===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===//
20b57cec5SDimitry Andric//
30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric//
70b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric//
90b57cec5SDimitry Andric//
100b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
110b57cec5SDimitry Andric
120b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric// Target-independent interfaces which we are implementing
140b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
150b57cec5SDimitry Andric
160b57cec5SDimitry Andricinclude "llvm/Target/Target.td"
170b57cec5SDimitry Andric
180b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
190b57cec5SDimitry Andric// ARM Subtarget state.
200b57cec5SDimitry Andric//
210b57cec5SDimitry Andric
220b57cec5SDimitry Andricdef ModeThumb             : SubtargetFeature<"thumb-mode", "InThumbMode",
230b57cec5SDimitry Andric                                             "true", "Thumb mode">;
240b57cec5SDimitry Andric
250b57cec5SDimitry Andricdef ModeSoftFloat         : SubtargetFeature<"soft-float","UseSoftFloat",
260b57cec5SDimitry Andric                                             "true", "Use software floating "
270b57cec5SDimitry Andric                                             "point features.">;
280b57cec5SDimitry Andric
290b57cec5SDimitry Andric
300b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
310b57cec5SDimitry Andric// ARM Subtarget features.
320b57cec5SDimitry Andric//
330b57cec5SDimitry Andric
340b57cec5SDimitry Andric// Floating Point, HW Division and Neon Support
350b57cec5SDimitry Andric
360b57cec5SDimitry Andric// FP loads/stores/moves, shared between VFP and MVE (even in the integer-only
370b57cec5SDimitry Andric// version).
380b57cec5SDimitry Andricdef FeatureFPRegs         : SubtargetFeature<"fpregs", "HasFPRegs", "true",
390b57cec5SDimitry Andric                                             "Enable FP registers">;
400b57cec5SDimitry Andric
410b57cec5SDimitry Andric// 16-bit FP loads/stores/moves, shared between VFP (with the v8.2A FP16
420b57cec5SDimitry Andric// extension) and MVE (even in the integer-only version).
430b57cec5SDimitry Andricdef FeatureFPRegs16       : SubtargetFeature<"fpregs16", "HasFPRegs16", "true",
440b57cec5SDimitry Andric                                             "Enable 16-bit FP registers",
450b57cec5SDimitry Andric                                             [FeatureFPRegs]>;
460b57cec5SDimitry Andric
470b57cec5SDimitry Andricdef FeatureFPRegs64       : SubtargetFeature<"fpregs64", "HasFPRegs64", "true",
480b57cec5SDimitry Andric                                             "Enable 64-bit FP registers",
490b57cec5SDimitry Andric                                             [FeatureFPRegs]>;
500b57cec5SDimitry Andric
510b57cec5SDimitry Andricdef FeatureFP64           : SubtargetFeature<"fp64", "HasFP64", "true",
520b57cec5SDimitry Andric                                             "Floating point unit supports "
530b57cec5SDimitry Andric                                             "double precision",
540b57cec5SDimitry Andric                                             [FeatureFPRegs64]>;
550b57cec5SDimitry Andric
560b57cec5SDimitry Andricdef FeatureD32            : SubtargetFeature<"d32", "HasD32", "true",
570b57cec5SDimitry Andric                                             "Extend FP to 32 double registers">;
580b57cec5SDimitry Andric
590b57cec5SDimitry Andricmulticlass VFPver<string name, string query, string description,
600b57cec5SDimitry Andric                  list<SubtargetFeature> prev,
610b57cec5SDimitry Andric                  list<SubtargetFeature> otherimplies,
620b57cec5SDimitry Andric                  list<SubtargetFeature> vfp2prev = []> {
630b57cec5SDimitry Andric  def _D16_SP: SubtargetFeature<
640b57cec5SDimitry Andric    name#"d16sp", query#"D16SP", "true",
650b57cec5SDimitry Andric    description#" with only 16 d-registers and no double precision",
660b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16_SP")) #
670b57cec5SDimitry Andric      !foreach(v, vfp2prev, !cast<SubtargetFeature>(v # "_SP")) #
680b57cec5SDimitry Andric      otherimplies>;
690b57cec5SDimitry Andric  def _SP: SubtargetFeature<
700b57cec5SDimitry Andric    name#"sp", query#"SP", "true",
710b57cec5SDimitry Andric    description#" with no double precision",
720b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_SP")) #
730b57cec5SDimitry Andric      otherimplies # [FeatureD32, !cast<SubtargetFeature>(NAME # "_D16_SP")]>;
740b57cec5SDimitry Andric  def _D16: SubtargetFeature<
750b57cec5SDimitry Andric    name#"d16", query#"D16", "true",
760b57cec5SDimitry Andric    description#" with only 16 d-registers",
770b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16")) #
780b57cec5SDimitry Andric      vfp2prev #
790b57cec5SDimitry Andric      otherimplies # [FeatureFP64, !cast<SubtargetFeature>(NAME # "_D16_SP")]>;
800b57cec5SDimitry Andric  def "": SubtargetFeature<
810b57cec5SDimitry Andric    name, query, "true", description,
820b57cec5SDimitry Andric    prev # otherimplies # [
830b57cec5SDimitry Andric        !cast<SubtargetFeature>(NAME # "_D16"),
840b57cec5SDimitry Andric        !cast<SubtargetFeature>(NAME # "_SP")]>;
850b57cec5SDimitry Andric}
860b57cec5SDimitry Andric
87c14a5a88SDimitry Andricdef FeatureVFP2_SP        : SubtargetFeature<"vfp2sp", "HasVFPv2SP", "true",
88c14a5a88SDimitry Andric                                             "Enable VFP2 instructions with "
89c14a5a88SDimitry Andric                                             "no double precision",
90*8bcb0991SDimitry Andric                                             [FeatureFPRegs]>;
91*8bcb0991SDimitry Andric
920b57cec5SDimitry Andricdef FeatureVFP2           : SubtargetFeature<"vfp2", "HasVFPv2", "true",
930b57cec5SDimitry Andric                                             "Enable VFP2 instructions",
94*8bcb0991SDimitry Andric                                             [FeatureFP64, FeatureVFP2_SP]>;
950b57cec5SDimitry Andric
960b57cec5SDimitry Andricdefm FeatureVFP3: VFPver<"vfp3", "HasVFPv3", "Enable VFP3 instructions",
970b57cec5SDimitry Andric                         [], [], [FeatureVFP2]>;
980b57cec5SDimitry Andric
990b57cec5SDimitry Andricdef FeatureNEON           : SubtargetFeature<"neon", "HasNEON", "true",
1000b57cec5SDimitry Andric                                             "Enable NEON instructions",
1010b57cec5SDimitry Andric                                             [FeatureVFP3]>;
1020b57cec5SDimitry Andric
1030b57cec5SDimitry Andricdef FeatureFP16           : SubtargetFeature<"fp16", "HasFP16", "true",
1040b57cec5SDimitry Andric                                             "Enable half-precision "
1050b57cec5SDimitry Andric                                             "floating point">;
1060b57cec5SDimitry Andric
1070b57cec5SDimitry Andricdefm FeatureVFP4: VFPver<"vfp4", "HasVFPv4", "Enable VFP4 instructions",
1080b57cec5SDimitry Andric                         [FeatureVFP3], [FeatureFP16]>;
1090b57cec5SDimitry Andric
1100b57cec5SDimitry Andricdefm FeatureFPARMv8: VFPver<"fp-armv8", "HasFPARMv8", "Enable ARMv8 FP",
1110b57cec5SDimitry Andric                         [FeatureVFP4], []>;
1120b57cec5SDimitry Andric
1130b57cec5SDimitry Andricdef FeatureFullFP16       : SubtargetFeature<"fullfp16", "HasFullFP16", "true",
1140b57cec5SDimitry Andric                                             "Enable full half-precision "
1150b57cec5SDimitry Andric                                             "floating point",
1160b57cec5SDimitry Andric                                             [FeatureFPARMv8_D16_SP, FeatureFPRegs16]>;
1170b57cec5SDimitry Andric
1180b57cec5SDimitry Andricdef FeatureFP16FML        : SubtargetFeature<"fp16fml", "HasFP16FML", "true",
1190b57cec5SDimitry Andric                                             "Enable full half-precision "
1200b57cec5SDimitry Andric                                             "floating point fml instructions",
1210b57cec5SDimitry Andric                                             [FeatureFullFP16]>;
1220b57cec5SDimitry Andric
1230b57cec5SDimitry Andricdef FeatureHWDivThumb     : SubtargetFeature<"hwdiv",
1240b57cec5SDimitry Andric                                             "HasHardwareDivideInThumb", "true",
1250b57cec5SDimitry Andric                                             "Enable divide instructions in Thumb">;
1260b57cec5SDimitry Andric
1270b57cec5SDimitry Andricdef FeatureHWDivARM       : SubtargetFeature<"hwdiv-arm",
1280b57cec5SDimitry Andric                                             "HasHardwareDivideInARM", "true",
1290b57cec5SDimitry Andric                                             "Enable divide instructions in ARM mode">;
1300b57cec5SDimitry Andric
1310b57cec5SDimitry Andric// Atomic Support
1320b57cec5SDimitry Andricdef FeatureDB             : SubtargetFeature<"db", "HasDataBarrier", "true",
1330b57cec5SDimitry Andric                                             "Has data barrier (dmb/dsb) instructions">;
1340b57cec5SDimitry Andric
1350b57cec5SDimitry Andricdef FeatureV7Clrex        : SubtargetFeature<"v7clrex", "HasV7Clrex", "true",
1360b57cec5SDimitry Andric                                             "Has v7 clrex instruction">;
1370b57cec5SDimitry Andric
1380b57cec5SDimitry Andricdef FeatureDFB  : SubtargetFeature<"dfb", "HasFullDataBarrier", "true",
1390b57cec5SDimitry Andric                                   "Has full data barrier (dfb) instruction">;
1400b57cec5SDimitry Andric
1410b57cec5SDimitry Andricdef FeatureAcquireRelease : SubtargetFeature<"acquire-release",
1420b57cec5SDimitry Andric                                             "HasAcquireRelease", "true",
1430b57cec5SDimitry Andric                                             "Has v8 acquire/release (lda/ldaex "
1440b57cec5SDimitry Andric                                             " etc) instructions">;
1450b57cec5SDimitry Andric
1460b57cec5SDimitry Andric
1470b57cec5SDimitry Andricdef FeatureSlowFPBrcc     : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true",
1480b57cec5SDimitry Andric                                             "FP compare + branch is slow">;
1490b57cec5SDimitry Andric
1500b57cec5SDimitry Andricdef FeaturePerfMon        : SubtargetFeature<"perfmon", "HasPerfMon", "true",
1510b57cec5SDimitry Andric                                             "Enable support for Performance "
1520b57cec5SDimitry Andric                                             "Monitor extensions">;
1530b57cec5SDimitry Andric
1540b57cec5SDimitry Andric
1550b57cec5SDimitry Andric// TrustZone Security Extensions
1560b57cec5SDimitry Andricdef FeatureTrustZone      : SubtargetFeature<"trustzone", "HasTrustZone", "true",
1570b57cec5SDimitry Andric                                             "Enable support for TrustZone "
1580b57cec5SDimitry Andric                                             "security extensions">;
1590b57cec5SDimitry Andric
1600b57cec5SDimitry Andricdef Feature8MSecExt       : SubtargetFeature<"8msecext", "Has8MSecExt", "true",
1610b57cec5SDimitry Andric                                             "Enable support for ARMv8-M "
1620b57cec5SDimitry Andric                                             "Security Extensions">;
1630b57cec5SDimitry Andric
1640b57cec5SDimitry Andricdef FeatureSHA2           : SubtargetFeature<"sha2", "HasSHA2", "true",
1650b57cec5SDimitry Andric                                             "Enable SHA1 and SHA256 support", [FeatureNEON]>;
1660b57cec5SDimitry Andric
1670b57cec5SDimitry Andricdef FeatureAES            : SubtargetFeature<"aes", "HasAES", "true",
1680b57cec5SDimitry Andric                                             "Enable AES support", [FeatureNEON]>;
1690b57cec5SDimitry Andric
1700b57cec5SDimitry Andricdef FeatureCrypto         : SubtargetFeature<"crypto", "HasCrypto", "true",
1710b57cec5SDimitry Andric                                             "Enable support for "
1720b57cec5SDimitry Andric                                             "Cryptography extensions",
1730b57cec5SDimitry Andric                                             [FeatureNEON, FeatureSHA2, FeatureAES]>;
1740b57cec5SDimitry Andric
1750b57cec5SDimitry Andricdef FeatureCRC            : SubtargetFeature<"crc", "HasCRC", "true",
1760b57cec5SDimitry Andric                                             "Enable support for CRC instructions">;
1770b57cec5SDimitry Andric
1780b57cec5SDimitry Andricdef FeatureDotProd        : SubtargetFeature<"dotprod", "HasDotProd", "true",
1790b57cec5SDimitry Andric                                             "Enable support for dot product instructions",
1800b57cec5SDimitry Andric                                             [FeatureNEON]>;
1810b57cec5SDimitry Andric
1820b57cec5SDimitry Andric// Not to be confused with FeatureHasRetAddrStack (return address stack)
1830b57cec5SDimitry Andricdef FeatureRAS            : SubtargetFeature<"ras", "HasRAS", "true",
1840b57cec5SDimitry Andric                                             "Enable Reliability, Availability "
1850b57cec5SDimitry Andric                                             "and Serviceability extensions">;
1860b57cec5SDimitry Andric
1870b57cec5SDimitry Andric// Fast computation of non-negative address offsets
1880b57cec5SDimitry Andricdef FeatureFPAO           : SubtargetFeature<"fpao", "HasFPAO", "true",
1890b57cec5SDimitry Andric                                             "Enable fast computation of "
1900b57cec5SDimitry Andric                                             "positive address offsets">;
1910b57cec5SDimitry Andric
1920b57cec5SDimitry Andric// Fast execution of AES crypto operations
1930b57cec5SDimitry Andricdef FeatureFuseAES        : SubtargetFeature<"fuse-aes", "HasFuseAES", "true",
1940b57cec5SDimitry Andric                                             "CPU fuses AES crypto operations">;
1950b57cec5SDimitry Andric
1960b57cec5SDimitry Andric// Fast execution of bottom and top halves of literal generation
1970b57cec5SDimitry Andricdef FeatureFuseLiterals   : SubtargetFeature<"fuse-literals", "HasFuseLiterals", "true",
1980b57cec5SDimitry Andric                                             "CPU fuses literal generation operations">;
1990b57cec5SDimitry Andric
2000b57cec5SDimitry Andric// The way of reading thread pointer
2010b57cec5SDimitry Andricdef FeatureReadTp :  SubtargetFeature<"read-tp-hard", "ReadTPHard", "true",
2020b57cec5SDimitry Andric                                      "Reading thread pointer from register">;
2030b57cec5SDimitry Andric
2040b57cec5SDimitry Andric// Cyclone can zero VFP registers in 0 cycles.
2050b57cec5SDimitry Andricdef FeatureZCZeroing      : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
2060b57cec5SDimitry Andric                                             "Has zero-cycle zeroing instructions">;
2070b57cec5SDimitry Andric
2080b57cec5SDimitry Andric// Whether it is profitable to unpredicate certain instructions during if-conversion
2090b57cec5SDimitry Andricdef FeatureProfUnpredicate : SubtargetFeature<"prof-unpr",
2100b57cec5SDimitry Andric                                              "IsProfitableToUnpredicate", "true",
2110b57cec5SDimitry Andric                                              "Is profitable to unpredicate">;
2120b57cec5SDimitry Andric
2130b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VGETLNi32.
2140b57cec5SDimitry Andricdef FeatureSlowVGETLNi32  : SubtargetFeature<"slow-vgetlni32",
2150b57cec5SDimitry Andric                                             "HasSlowVGETLNi32", "true",
2160b57cec5SDimitry Andric                                             "Has slow VGETLNi32 - prefer VMOV">;
2170b57cec5SDimitry Andric
2180b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VDUP32.
2190b57cec5SDimitry Andricdef FeatureSlowVDUP32     : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32",
2200b57cec5SDimitry Andric                                             "true",
2210b57cec5SDimitry Andric                                             "Has slow VDUP32 - prefer VMOV">;
2220b57cec5SDimitry Andric
2230b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON
2240b57cec5SDimitry Andric// for scalar FP, as this allows more effective execution domain optimization.
2250b57cec5SDimitry Andricdef FeaturePreferVMOVSR   : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR",
2260b57cec5SDimitry Andric                                             "true", "Prefer VMOVSR">;
2270b57cec5SDimitry Andric
2280b57cec5SDimitry Andric// Swift has ISHST barriers compatible with Atomic Release semantics but weaker
2290b57cec5SDimitry Andric// than ISH
2300b57cec5SDimitry Andricdef FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHST",
2310b57cec5SDimitry Andric                                               "true", "Prefer ISHST barriers">;
2320b57cec5SDimitry Andric
2330b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU.
2340b57cec5SDimitry Andricdef FeatureMuxedUnits     : SubtargetFeature<"muxed-units", "HasMuxedUnits",
2350b57cec5SDimitry Andric                                             "true",
2360b57cec5SDimitry Andric                                             "Has muxed AGU and NEON/FPU">;
2370b57cec5SDimitry Andric
2380b57cec5SDimitry Andric// Whether VLDM/VSTM starting with odd register number need more microops
2390b57cec5SDimitry Andric// than single VLDRS
2400b57cec5SDimitry Andricdef FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "SlowOddRegister",
2410b57cec5SDimitry Andric                                              "true", "VLDM/VSTM starting "
2420b57cec5SDimitry Andric                                              "with an odd register is slow">;
2430b57cec5SDimitry Andric
2440b57cec5SDimitry Andric// Some targets have a renaming dependency when loading into D subregisters.
2450b57cec5SDimitry Andricdef FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg",
2460b57cec5SDimitry Andric                                              "SlowLoadDSubregister", "true",
2470b57cec5SDimitry Andric                                              "Loading into D subregs is slow">;
2480b57cec5SDimitry Andric
2490b57cec5SDimitry Andricdef FeatureUseWideStrideVFP : SubtargetFeature<"wide-stride-vfp",
2500b57cec5SDimitry Andric                                               "UseWideStrideVFP", "true",
2510b57cec5SDimitry Andric                                               "Use a wide stride when allocating VFP registers">;
2520b57cec5SDimitry Andric
2530b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD.
2540b57cec5SDimitry Andricdef FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs",
2550b57cec5SDimitry Andric                                             "DontWidenVMOVS", "true",
2560b57cec5SDimitry Andric                                             "Don't widen VMOVS to VMOVD">;
2570b57cec5SDimitry Andric
2580b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) prefer to avoid mixing operations on different
2590b57cec5SDimitry Andric// VFP register widths.
2600b57cec5SDimitry Andricdef FeatureSplatVFPToNeon : SubtargetFeature<"splat-vfp-neon",
2610b57cec5SDimitry Andric                                             "SplatVFPToNeon", "true",
2620b57cec5SDimitry Andric                                             "Splat register from VFP to NEON",
2630b57cec5SDimitry Andric                                             [FeatureDontWidenVMOVS]>;
2640b57cec5SDimitry Andric
2650b57cec5SDimitry Andric// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions.
2660b57cec5SDimitry Andricdef FeatureExpandMLx      : SubtargetFeature<"expand-fp-mlx",
2670b57cec5SDimitry Andric                                             "ExpandMLx", "true",
2680b57cec5SDimitry Andric                                             "Expand VFP/NEON MLA/MLS instructions">;
2690b57cec5SDimitry Andric
2700b57cec5SDimitry Andric// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS.
2710b57cec5SDimitry Andricdef FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards",
2720b57cec5SDimitry Andric                                             "true", "Has VMLx hazards">;
2730b57cec5SDimitry Andric
2740b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from
2750b57cec5SDimitry Andric// VFP to NEON, as an execution domain optimization.
2760b57cec5SDimitry Andricdef FeatureNEONForFPMovs  : SubtargetFeature<"neon-fpmovs",
2770b57cec5SDimitry Andric                                             "UseNEONForFPMovs", "true",
2780b57cec5SDimitry Andric                                             "Convert VMOVSR, VMOVRS, "
2790b57cec5SDimitry Andric                                             "VMOVS to NEON">;
2800b57cec5SDimitry Andric
2810b57cec5SDimitry Andric// Some processors benefit from using NEON instructions for scalar
2820b57cec5SDimitry Andric// single-precision FP operations. This affects instruction selection and should
2830b57cec5SDimitry Andric// only be enabled if the handling of denormals is not important.
2840b57cec5SDimitry Andricdef FeatureNEONForFP      : SubtargetFeature<"neonfp",
2850b57cec5SDimitry Andric                                             "UseNEONForSinglePrecisionFP",
2860b57cec5SDimitry Andric                                             "true",
2870b57cec5SDimitry Andric                                             "Use NEON for single precision FP">;
2880b57cec5SDimitry Andric
2890b57cec5SDimitry Andric// On some processors, VLDn instructions that access unaligned data take one
2900b57cec5SDimitry Andric// extra cycle. Take that into account when computing operand latencies.
2910b57cec5SDimitry Andricdef FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAlign",
2920b57cec5SDimitry Andric                                             "true",
2930b57cec5SDimitry Andric                                             "Check for VLDn unaligned access">;
2940b57cec5SDimitry Andric
2950b57cec5SDimitry Andric// Some processors have a nonpipelined VFP coprocessor.
2960b57cec5SDimitry Andricdef FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp",
2970b57cec5SDimitry Andric                                              "NonpipelinedVFP", "true",
2980b57cec5SDimitry Andric                                              "VFP instructions are not pipelined">;
2990b57cec5SDimitry Andric
3000b57cec5SDimitry Andric// Some processors have FP multiply-accumulate instructions that don't
3010b57cec5SDimitry Andric// play nicely with other VFP / NEON instructions, and it's generally better
3020b57cec5SDimitry Andric// to just not use them.
3030b57cec5SDimitry Andricdef FeatureHasSlowFPVMLx  : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true",
3040b57cec5SDimitry Andric                                             "Disable VFP / NEON MAC instructions">;
3050b57cec5SDimitry Andric
3060b57cec5SDimitry Andric// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding.
3070b57cec5SDimitry Andricdef FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding",
3080b57cec5SDimitry Andric                                             "HasVMLxForwarding", "true",
3090b57cec5SDimitry Andric                                             "Has multiplier accumulator forwarding">;
3100b57cec5SDimitry Andric
3110b57cec5SDimitry Andric// Disable 32-bit to 16-bit narrowing for experimentation.
3120b57cec5SDimitry Andricdef FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true",
3130b57cec5SDimitry Andric                                             "Prefer 32-bit Thumb instrs">;
3140b57cec5SDimitry Andric
315*8bcb0991SDimitry Andricdef FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopLogAlignment","2",
3160b57cec5SDimitry Andric                                              "Prefer 32-bit alignment for loops">;
3170b57cec5SDimitry Andric
318*8bcb0991SDimitry Andricdef FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "1",
319*8bcb0991SDimitry Andric                        "Model MVE instructions as a 1 beat per tick architecture">;
320*8bcb0991SDimitry Andric
321*8bcb0991SDimitry Andricdef FeatureMVEVectorCostFactor2 : SubtargetFeature<"mve2beat", "MVEVectorCostFactor", "2",
322*8bcb0991SDimitry Andric                        "Model MVE instructions as a 2 beats per tick architecture">;
323*8bcb0991SDimitry Andric
324*8bcb0991SDimitry Andricdef FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "4",
325*8bcb0991SDimitry Andric                        "Model MVE instructions as a 4 beats per tick architecture">;
326*8bcb0991SDimitry Andric
3270b57cec5SDimitry Andric/// Some instructions update CPSR partially, which can add false dependency for
3280b57cec5SDimitry Andric/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is
3290b57cec5SDimitry Andric/// mapped to a separate physical register. Avoid partial CPSR update for these
3300b57cec5SDimitry Andric/// processors.
3310b57cec5SDimitry Andricdef FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr",
3320b57cec5SDimitry Andric                                               "AvoidCPSRPartialUpdate", "true",
3330b57cec5SDimitry Andric                                 "Avoid CPSR partial update for OOO execution">;
3340b57cec5SDimitry Andric
3350b57cec5SDimitry Andric/// Disable +1 predication cost for instructions updating CPSR.
3360b57cec5SDimitry Andric/// Enabled for Cortex-A57.
3370b57cec5SDimitry Andricdef FeatureCheapPredicableCPSR : SubtargetFeature<"cheap-predicable-cpsr",
3380b57cec5SDimitry Andric                                                  "CheapPredicableCPSRDef",
3390b57cec5SDimitry Andric                                                  "true",
3400b57cec5SDimitry Andric                  "Disable +1 predication cost for instructions updating CPSR">;
3410b57cec5SDimitry Andric
3420b57cec5SDimitry Andricdef FeatureAvoidMOVsShOp  : SubtargetFeature<"avoid-movs-shop",
3430b57cec5SDimitry Andric                                             "AvoidMOVsShifterOperand", "true",
3440b57cec5SDimitry Andric                                             "Avoid movs instructions with "
3450b57cec5SDimitry Andric                                             "shifter operand">;
3460b57cec5SDimitry Andric
3470b57cec5SDimitry Andric// Some processors perform return stack prediction. CodeGen should avoid issue
3480b57cec5SDimitry Andric// "normal" call instructions to callees which do not return.
3490b57cec5SDimitry Andricdef FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack",
3500b57cec5SDimitry Andric                                              "HasRetAddrStack", "true",
3510b57cec5SDimitry Andric                                              "Has return address stack">;
3520b57cec5SDimitry Andric
3530b57cec5SDimitry Andric// Some processors have no branch predictor, which changes the expected cost of
3540b57cec5SDimitry Andric// taking a branch which affects the choice of whether to use predicated
3550b57cec5SDimitry Andric// instructions.
3560b57cec5SDimitry Andricdef FeatureHasNoBranchPredictor : SubtargetFeature<"no-branch-predictor",
3570b57cec5SDimitry Andric                                                   "HasBranchPredictor", "false",
3580b57cec5SDimitry Andric                                                   "Has no branch predictor">;
3590b57cec5SDimitry Andric
3600b57cec5SDimitry Andric/// DSP extension.
3610b57cec5SDimitry Andricdef FeatureDSP            : SubtargetFeature<"dsp", "HasDSP", "true",
3620b57cec5SDimitry Andric                                             "Supports DSP instructions in "
3630b57cec5SDimitry Andric                                             "ARM and/or Thumb2">;
3640b57cec5SDimitry Andric
3650b57cec5SDimitry Andric// Multiprocessing extension.
3660b57cec5SDimitry Andricdef FeatureMP             : SubtargetFeature<"mp", "HasMPExtension", "true",
3670b57cec5SDimitry Andric                                        "Supports Multiprocessing extension">;
3680b57cec5SDimitry Andric
3690b57cec5SDimitry Andric// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8).
3700b57cec5SDimitry Andricdef FeatureVirtualization : SubtargetFeature<"virtualization",
3710b57cec5SDimitry Andric                                             "HasVirtualization", "true",
3720b57cec5SDimitry Andric                                             "Supports Virtualization extension",
3730b57cec5SDimitry Andric                                             [FeatureHWDivThumb, FeatureHWDivARM]>;
3740b57cec5SDimitry Andric
3750b57cec5SDimitry Andric// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too.
3760b57cec5SDimitry Andric// See ARMInstrInfo.td for details.
3770b57cec5SDimitry Andricdef FeatureNaClTrap       : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true",
3780b57cec5SDimitry Andric                                             "NaCl trap">;
3790b57cec5SDimitry Andric
3800b57cec5SDimitry Andricdef FeatureStrictAlign    : SubtargetFeature<"strict-align",
3810b57cec5SDimitry Andric                                             "StrictAlign", "true",
3820b57cec5SDimitry Andric                                             "Disallow all unaligned memory "
3830b57cec5SDimitry Andric                                             "access">;
3840b57cec5SDimitry Andric
3850b57cec5SDimitry Andricdef FeatureLongCalls      : SubtargetFeature<"long-calls", "GenLongCalls", "true",
3860b57cec5SDimitry Andric                                             "Generate calls via indirect call "
3870b57cec5SDimitry Andric                                             "instructions">;
3880b57cec5SDimitry Andric
3890b57cec5SDimitry Andricdef FeatureExecuteOnly    : SubtargetFeature<"execute-only",
3900b57cec5SDimitry Andric                                             "GenExecuteOnly", "true",
3910b57cec5SDimitry Andric                                             "Enable the generation of "
3920b57cec5SDimitry Andric                                             "execute only code.">;
3930b57cec5SDimitry Andric
3940b57cec5SDimitry Andricdef FeatureReserveR9      : SubtargetFeature<"reserve-r9", "ReserveR9", "true",
3950b57cec5SDimitry Andric                                             "Reserve R9, making it unavailable"
3960b57cec5SDimitry Andric                                             " as GPR">;
3970b57cec5SDimitry Andric
3980b57cec5SDimitry Andricdef FeatureNoMovt         : SubtargetFeature<"no-movt", "NoMovt", "true",
3990b57cec5SDimitry Andric                                             "Don't use movt/movw pairs for "
4000b57cec5SDimitry Andric                                             "32-bit imms">;
4010b57cec5SDimitry Andric
4020b57cec5SDimitry Andricdef FeatureNoNegativeImmediates
4030b57cec5SDimitry Andric                          : SubtargetFeature<"no-neg-immediates",
4040b57cec5SDimitry Andric                                             "NegativeImmediates", "false",
4050b57cec5SDimitry Andric                                             "Convert immediates and instructions "
4060b57cec5SDimitry Andric                                             "to their negated or complemented "
4070b57cec5SDimitry Andric                                             "equivalent when the immediate does "
4080b57cec5SDimitry Andric                                             "not fit in the encoding.">;
4090b57cec5SDimitry Andric
4100b57cec5SDimitry Andric// Use the MachineScheduler for instruction scheduling for the subtarget.
4110b57cec5SDimitry Andricdef FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true",
4120b57cec5SDimitry Andric                                        "Use the MachineScheduler">;
4130b57cec5SDimitry Andric
4140b57cec5SDimitry Andricdef FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler",
4150b57cec5SDimitry Andric    "DisablePostRAScheduler", "true",
4160b57cec5SDimitry Andric    "Don't schedule again after register allocation">;
4170b57cec5SDimitry Andric
4180b57cec5SDimitry Andric// Enable use of alias analysis during code generation
4190b57cec5SDimitry Andricdef FeatureUseAA : SubtargetFeature<"use-aa", "UseAA", "true",
4200b57cec5SDimitry Andric                                    "Use alias analysis during codegen">;
4210b57cec5SDimitry Andric
4220b57cec5SDimitry Andric// Armv8.5-A extensions
4230b57cec5SDimitry Andric
4240b57cec5SDimitry Andricdef FeatureSB       : SubtargetFeature<"sb", "HasSB", "true",
4250b57cec5SDimitry Andric  "Enable v8.5a Speculation Barrier" >;
4260b57cec5SDimitry Andric
4270b57cec5SDimitry Andric// Armv8.1-M extensions
4280b57cec5SDimitry Andric
4290b57cec5SDimitry Andricdef FeatureLOB            : SubtargetFeature<"lob", "HasLOB", "true",
4300b57cec5SDimitry Andric                                             "Enable Low Overhead Branch "
4310b57cec5SDimitry Andric                                             "extensions">;
4320b57cec5SDimitry Andric
4330b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
4340b57cec5SDimitry Andric// ARM architecture class
4350b57cec5SDimitry Andric//
4360b57cec5SDimitry Andric
4370b57cec5SDimitry Andric// A-series ISA
4380b57cec5SDimitry Andricdef FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass",
4390b57cec5SDimitry Andric                                     "Is application profile ('A' series)">;
4400b57cec5SDimitry Andric
4410b57cec5SDimitry Andric// R-series ISA
4420b57cec5SDimitry Andricdef FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass",
4430b57cec5SDimitry Andric                                     "Is realtime profile ('R' series)">;
4440b57cec5SDimitry Andric
4450b57cec5SDimitry Andric// M-series ISA
4460b57cec5SDimitry Andricdef FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass",
4470b57cec5SDimitry Andric                                     "Is microcontroller profile ('M' series)">;
4480b57cec5SDimitry Andric
4490b57cec5SDimitry Andric
4500b57cec5SDimitry Andricdef FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true",
4510b57cec5SDimitry Andric                                     "Enable Thumb2 instructions">;
4520b57cec5SDimitry Andric
4530b57cec5SDimitry Andricdef FeatureNoARM  : SubtargetFeature<"noarm", "NoARM", "true",
4540b57cec5SDimitry Andric                                     "Does not support ARM mode execution">;
4550b57cec5SDimitry Andric
4560b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
4570b57cec5SDimitry Andric// ARM ISAa.
4580b57cec5SDimitry Andric//
4590b57cec5SDimitry Andric
4600b57cec5SDimitry Andricdef HasV4TOps   : SubtargetFeature<"v4t", "HasV4TOps", "true",
4610b57cec5SDimitry Andric                                   "Support ARM v4T instructions">;
4620b57cec5SDimitry Andric
4630b57cec5SDimitry Andricdef HasV5TOps   : SubtargetFeature<"v5t", "HasV5TOps", "true",
4640b57cec5SDimitry Andric                                   "Support ARM v5T instructions",
4650b57cec5SDimitry Andric                                   [HasV4TOps]>;
4660b57cec5SDimitry Andric
4670b57cec5SDimitry Andricdef HasV5TEOps  : SubtargetFeature<"v5te", "HasV5TEOps", "true",
4680b57cec5SDimitry Andric                                   "Support ARM v5TE, v5TEj, and "
4690b57cec5SDimitry Andric                                   "v5TExp instructions",
4700b57cec5SDimitry Andric                                   [HasV5TOps]>;
4710b57cec5SDimitry Andric
4720b57cec5SDimitry Andricdef HasV6Ops    : SubtargetFeature<"v6", "HasV6Ops", "true",
4730b57cec5SDimitry Andric                                   "Support ARM v6 instructions",
4740b57cec5SDimitry Andric                                   [HasV5TEOps]>;
4750b57cec5SDimitry Andric
4760b57cec5SDimitry Andricdef HasV6MOps   : SubtargetFeature<"v6m", "HasV6MOps", "true",
4770b57cec5SDimitry Andric                                   "Support ARM v6M instructions",
4780b57cec5SDimitry Andric                                   [HasV6Ops]>;
4790b57cec5SDimitry Andric
4800b57cec5SDimitry Andricdef HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true",
4810b57cec5SDimitry Andric                                         "Support ARM v8M Baseline instructions",
4820b57cec5SDimitry Andric                                         [HasV6MOps]>;
4830b57cec5SDimitry Andric
4840b57cec5SDimitry Andricdef HasV6KOps   : SubtargetFeature<"v6k", "HasV6KOps", "true",
4850b57cec5SDimitry Andric                                   "Support ARM v6k instructions",
4860b57cec5SDimitry Andric                                   [HasV6Ops]>;
4870b57cec5SDimitry Andric
4880b57cec5SDimitry Andricdef HasV6T2Ops  : SubtargetFeature<"v6t2", "HasV6T2Ops", "true",
4890b57cec5SDimitry Andric                                   "Support ARM v6t2 instructions",
4900b57cec5SDimitry Andric                                   [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>;
4910b57cec5SDimitry Andric
4920b57cec5SDimitry Andricdef HasV7Ops    : SubtargetFeature<"v7", "HasV7Ops", "true",
4930b57cec5SDimitry Andric                                   "Support ARM v7 instructions",
4940b57cec5SDimitry Andric                                   [HasV6T2Ops, FeaturePerfMon,
4950b57cec5SDimitry Andric                                    FeatureV7Clrex]>;
4960b57cec5SDimitry Andric
4970b57cec5SDimitry Andricdef HasV8MMainlineOps :
4980b57cec5SDimitry Andric                  SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true",
4990b57cec5SDimitry Andric                                   "Support ARM v8M Mainline instructions",
5000b57cec5SDimitry Andric                                   [HasV7Ops]>;
5010b57cec5SDimitry Andric
5020b57cec5SDimitry Andricdef HasV8Ops    : SubtargetFeature<"v8", "HasV8Ops", "true",
5030b57cec5SDimitry Andric                                   "Support ARM v8 instructions",
5040b57cec5SDimitry Andric                                   [HasV7Ops, FeatureAcquireRelease]>;
5050b57cec5SDimitry Andric
5060b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
5070b57cec5SDimitry Andric                                   "Support ARM v8.1a instructions",
5080b57cec5SDimitry Andric                                   [HasV8Ops]>;
5090b57cec5SDimitry Andric
5100b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
5110b57cec5SDimitry Andric                                   "Support ARM v8.2a instructions",
5120b57cec5SDimitry Andric                                   [HasV8_1aOps]>;
5130b57cec5SDimitry Andric
5140b57cec5SDimitry Andricdef HasV8_3aOps   : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true",
5150b57cec5SDimitry Andric                                   "Support ARM v8.3a instructions",
5160b57cec5SDimitry Andric                                   [HasV8_2aOps]>;
5170b57cec5SDimitry Andric
5180b57cec5SDimitry Andricdef HasV8_4aOps   : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true",
5190b57cec5SDimitry Andric                                   "Support ARM v8.4a instructions",
5200b57cec5SDimitry Andric                                   [HasV8_3aOps, FeatureDotProd]>;
5210b57cec5SDimitry Andric
5220b57cec5SDimitry Andricdef HasV8_5aOps   : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true",
5230b57cec5SDimitry Andric                                   "Support ARM v8.5a instructions",
5240b57cec5SDimitry Andric                                   [HasV8_4aOps, FeatureSB]>;
5250b57cec5SDimitry Andric
5260b57cec5SDimitry Andricdef HasV8_1MMainlineOps : SubtargetFeature<
5270b57cec5SDimitry Andric               "v8.1m.main", "HasV8_1MMainlineOps", "true",
5280b57cec5SDimitry Andric               "Support ARM v8-1M Mainline instructions",
5290b57cec5SDimitry Andric               [HasV8MMainlineOps]>;
5300b57cec5SDimitry Andricdef HasMVEIntegerOps : SubtargetFeature<
5310b57cec5SDimitry Andric               "mve", "HasMVEIntegerOps", "true",
5320b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer ops",
5330b57cec5SDimitry Andric               [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>;
5340b57cec5SDimitry Andricdef HasMVEFloatOps : SubtargetFeature<
5350b57cec5SDimitry Andric               "mve.fp", "HasMVEFloatOps", "true",
5360b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer and floating ops",
5370b57cec5SDimitry Andric               [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>;
5380b57cec5SDimitry Andric
5390b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5400b57cec5SDimitry Andric// ARM Processor subtarget features.
5410b57cec5SDimitry Andric//
5420b57cec5SDimitry Andric
5430b57cec5SDimitry Andricdef ProcA5      : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5",
5440b57cec5SDimitry Andric                                   "Cortex-A5 ARM processors", []>;
5450b57cec5SDimitry Andricdef ProcA7      : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7",
5460b57cec5SDimitry Andric                                   "Cortex-A7 ARM processors", []>;
5470b57cec5SDimitry Andricdef ProcA8      : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8",
5480b57cec5SDimitry Andric                                   "Cortex-A8 ARM processors", []>;
5490b57cec5SDimitry Andricdef ProcA9      : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9",
5500b57cec5SDimitry Andric                                   "Cortex-A9 ARM processors", []>;
5510b57cec5SDimitry Andricdef ProcA12     : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12",
5520b57cec5SDimitry Andric                                   "Cortex-A12 ARM processors", []>;
5530b57cec5SDimitry Andricdef ProcA15     : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
5540b57cec5SDimitry Andric                                   "Cortex-A15 ARM processors", []>;
5550b57cec5SDimitry Andricdef ProcA17     : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17",
5560b57cec5SDimitry Andric                                   "Cortex-A17 ARM processors", []>;
5570b57cec5SDimitry Andricdef ProcA32     : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32",
5580b57cec5SDimitry Andric                                   "Cortex-A32 ARM processors", []>;
5590b57cec5SDimitry Andricdef ProcA35     : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
5600b57cec5SDimitry Andric                                   "Cortex-A35 ARM processors", []>;
5610b57cec5SDimitry Andricdef ProcA53     : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
5620b57cec5SDimitry Andric                                   "Cortex-A53 ARM processors", []>;
5630b57cec5SDimitry Andricdef ProcA55     : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
5640b57cec5SDimitry Andric                                   "Cortex-A55 ARM processors", []>;
5650b57cec5SDimitry Andricdef ProcA57     : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
5660b57cec5SDimitry Andric                                   "Cortex-A57 ARM processors", []>;
5670b57cec5SDimitry Andricdef ProcA72     : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
5680b57cec5SDimitry Andric                                   "Cortex-A72 ARM processors", []>;
5690b57cec5SDimitry Andricdef ProcA73     : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
5700b57cec5SDimitry Andric                                   "Cortex-A73 ARM processors", []>;
5710b57cec5SDimitry Andricdef ProcA75     : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
5720b57cec5SDimitry Andric                                   "Cortex-A75 ARM processors", []>;
5730b57cec5SDimitry Andricdef ProcA76     : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
5740b57cec5SDimitry Andric                                   "Cortex-A76 ARM processors", []>;
5750b57cec5SDimitry Andric
5760b57cec5SDimitry Andricdef ProcKrait   : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
5770b57cec5SDimitry Andric                                   "Qualcomm Krait processors", []>;
5780b57cec5SDimitry Andricdef ProcKryo    : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
5790b57cec5SDimitry Andric                                   "Qualcomm Kryo processors", []>;
5800b57cec5SDimitry Andricdef ProcSwift   : SubtargetFeature<"swift", "ARMProcFamily", "Swift",
5810b57cec5SDimitry Andric                                   "Swift ARM processors", []>;
5820b57cec5SDimitry Andric
5830b57cec5SDimitry Andricdef ProcExynos  : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos",
5840b57cec5SDimitry Andric                                   "Samsung Exynos processors",
5850b57cec5SDimitry Andric                                   [FeatureZCZeroing,
5860b57cec5SDimitry Andric                                    FeatureUseWideStrideVFP,
5870b57cec5SDimitry Andric                                    FeatureUseAA,
5880b57cec5SDimitry Andric                                    FeatureSplatVFPToNeon,
5890b57cec5SDimitry Andric                                    FeatureSlowVGETLNi32,
5900b57cec5SDimitry Andric                                    FeatureSlowVDUP32,
5910b57cec5SDimitry Andric                                    FeatureSlowFPBrcc,
5920b57cec5SDimitry Andric                                    FeatureProfUnpredicate,
5930b57cec5SDimitry Andric                                    FeatureHWDivThumb,
5940b57cec5SDimitry Andric                                    FeatureHWDivARM,
5950b57cec5SDimitry Andric                                    FeatureHasSlowFPVMLx,
5960b57cec5SDimitry Andric                                    FeatureHasRetAddrStack,
5970b57cec5SDimitry Andric                                    FeatureFuseLiterals,
5980b57cec5SDimitry Andric                                    FeatureFuseAES,
5990b57cec5SDimitry Andric                                    FeatureExpandMLx,
6000b57cec5SDimitry Andric                                    FeatureCrypto,
6010b57cec5SDimitry Andric                                    FeatureCRC]>;
6020b57cec5SDimitry Andric
6030b57cec5SDimitry Andricdef ProcR4      : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4",
6040b57cec5SDimitry Andric                                   "Cortex-R4 ARM processors", []>;
6050b57cec5SDimitry Andricdef ProcR5      : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
6060b57cec5SDimitry Andric                                   "Cortex-R5 ARM processors", []>;
6070b57cec5SDimitry Andricdef ProcR7      : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7",
6080b57cec5SDimitry Andric                                   "Cortex-R7 ARM processors", []>;
6090b57cec5SDimitry Andricdef ProcR52     : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52",
6100b57cec5SDimitry Andric                                   "Cortex-R52 ARM processors", []>;
6110b57cec5SDimitry Andric
6120b57cec5SDimitry Andricdef ProcM3      : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3",
6130b57cec5SDimitry Andric                                   "Cortex-M3 ARM processors", []>;
6140b57cec5SDimitry Andric
6150b57cec5SDimitry Andric
6160b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
6170b57cec5SDimitry Andric// ARM Helper classes.
6180b57cec5SDimitry Andric//
6190b57cec5SDimitry Andric
6200b57cec5SDimitry Andricclass Architecture<string fname, string aname, list<SubtargetFeature> features>
6210b57cec5SDimitry Andric  : SubtargetFeature<fname, "ARMArch", aname,
6220b57cec5SDimitry Andric                     !strconcat(aname, " architecture"), features>;
6230b57cec5SDimitry Andric
6240b57cec5SDimitry Andricclass ProcNoItin<string Name, list<SubtargetFeature> Features>
6250b57cec5SDimitry Andric  : Processor<Name, NoItineraries, Features>;
6260b57cec5SDimitry Andric
6270b57cec5SDimitry Andric
6280b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
6290b57cec5SDimitry Andric// ARM architectures
6300b57cec5SDimitry Andric//
6310b57cec5SDimitry Andric
6320b57cec5SDimitry Andricdef ARMv2     : Architecture<"armv2",     "ARMv2",    []>;
6330b57cec5SDimitry Andric
6340b57cec5SDimitry Andricdef ARMv2a    : Architecture<"armv2a",    "ARMv2a",   []>;
6350b57cec5SDimitry Andric
6360b57cec5SDimitry Andricdef ARMv3     : Architecture<"armv3",     "ARMv3",    []>;
6370b57cec5SDimitry Andric
6380b57cec5SDimitry Andricdef ARMv3m    : Architecture<"armv3m",    "ARMv3m",   []>;
6390b57cec5SDimitry Andric
6400b57cec5SDimitry Andricdef ARMv4     : Architecture<"armv4",     "ARMv4",    []>;
6410b57cec5SDimitry Andric
6420b57cec5SDimitry Andricdef ARMv4t    : Architecture<"armv4t",    "ARMv4t",   [HasV4TOps]>;
6430b57cec5SDimitry Andric
6440b57cec5SDimitry Andricdef ARMv5t    : Architecture<"armv5t",    "ARMv5t",   [HasV5TOps]>;
6450b57cec5SDimitry Andric
6460b57cec5SDimitry Andricdef ARMv5te   : Architecture<"armv5te",   "ARMv5te",  [HasV5TEOps]>;
6470b57cec5SDimitry Andric
6480b57cec5SDimitry Andricdef ARMv5tej  : Architecture<"armv5tej",  "ARMv5tej", [HasV5TEOps]>;
6490b57cec5SDimitry Andric
6500b57cec5SDimitry Andricdef ARMv6     : Architecture<"armv6",     "ARMv6",    [HasV6Ops,
6510b57cec5SDimitry Andric                                                       FeatureDSP]>;
6520b57cec5SDimitry Andric
6530b57cec5SDimitry Andricdef ARMv6t2   : Architecture<"armv6t2",   "ARMv6t2",  [HasV6T2Ops,
6540b57cec5SDimitry Andric                                                       FeatureDSP]>;
6550b57cec5SDimitry Andric
6560b57cec5SDimitry Andricdef ARMv6k    : Architecture<"armv6k",    "ARMv6k",   [HasV6KOps]>;
6570b57cec5SDimitry Andric
6580b57cec5SDimitry Andricdef ARMv6kz   : Architecture<"armv6kz",   "ARMv6kz",  [HasV6KOps,
6590b57cec5SDimitry Andric                                                       FeatureTrustZone]>;
6600b57cec5SDimitry Andric
6610b57cec5SDimitry Andricdef ARMv6m    : Architecture<"armv6-m",   "ARMv6m",   [HasV6MOps,
6620b57cec5SDimitry Andric                                                       FeatureNoARM,
6630b57cec5SDimitry Andric                                                       ModeThumb,
6640b57cec5SDimitry Andric                                                       FeatureDB,
6650b57cec5SDimitry Andric                                                       FeatureMClass,
6660b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
6670b57cec5SDimitry Andric
6680b57cec5SDimitry Andricdef ARMv6sm   : Architecture<"armv6s-m",  "ARMv6sm",  [HasV6MOps,
6690b57cec5SDimitry Andric                                                       FeatureNoARM,
6700b57cec5SDimitry Andric                                                       ModeThumb,
6710b57cec5SDimitry Andric                                                       FeatureDB,
6720b57cec5SDimitry Andric                                                       FeatureMClass,
6730b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
6740b57cec5SDimitry Andric
6750b57cec5SDimitry Andricdef ARMv7a    : Architecture<"armv7-a",   "ARMv7a",   [HasV7Ops,
6760b57cec5SDimitry Andric                                                       FeatureNEON,
6770b57cec5SDimitry Andric                                                       FeatureDB,
6780b57cec5SDimitry Andric                                                       FeatureDSP,
6790b57cec5SDimitry Andric                                                       FeatureAClass]>;
6800b57cec5SDimitry Andric
6810b57cec5SDimitry Andricdef ARMv7ve   : Architecture<"armv7ve",   "ARMv7ve",  [HasV7Ops,
6820b57cec5SDimitry Andric                                                       FeatureNEON,
6830b57cec5SDimitry Andric                                                       FeatureDB,
6840b57cec5SDimitry Andric                                                       FeatureDSP,
6850b57cec5SDimitry Andric                                                       FeatureTrustZone,
6860b57cec5SDimitry Andric                                                       FeatureMP,
6870b57cec5SDimitry Andric                                                       FeatureVirtualization,
6880b57cec5SDimitry Andric                                                       FeatureAClass]>;
6890b57cec5SDimitry Andric
6900b57cec5SDimitry Andricdef ARMv7r    : Architecture<"armv7-r",   "ARMv7r",   [HasV7Ops,
6910b57cec5SDimitry Andric                                                       FeatureDB,
6920b57cec5SDimitry Andric                                                       FeatureDSP,
6930b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
6940b57cec5SDimitry Andric                                                       FeatureRClass]>;
6950b57cec5SDimitry Andric
6960b57cec5SDimitry Andricdef ARMv7m    : Architecture<"armv7-m",   "ARMv7m",   [HasV7Ops,
6970b57cec5SDimitry Andric                                                       FeatureThumb2,
6980b57cec5SDimitry Andric                                                       FeatureNoARM,
6990b57cec5SDimitry Andric                                                       ModeThumb,
7000b57cec5SDimitry Andric                                                       FeatureDB,
7010b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
7020b57cec5SDimitry Andric                                                       FeatureMClass]>;
7030b57cec5SDimitry Andric
7040b57cec5SDimitry Andricdef ARMv7em   : Architecture<"armv7e-m",  "ARMv7em",  [HasV7Ops,
7050b57cec5SDimitry Andric                                                       FeatureThumb2,
7060b57cec5SDimitry Andric                                                       FeatureNoARM,
7070b57cec5SDimitry Andric                                                       ModeThumb,
7080b57cec5SDimitry Andric                                                       FeatureDB,
7090b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
7100b57cec5SDimitry Andric                                                       FeatureMClass,
7110b57cec5SDimitry Andric                                                       FeatureDSP]>;
7120b57cec5SDimitry Andric
7130b57cec5SDimitry Andricdef ARMv8a    : Architecture<"armv8-a",   "ARMv8a",   [HasV8Ops,
7140b57cec5SDimitry Andric                                                       FeatureAClass,
7150b57cec5SDimitry Andric                                                       FeatureDB,
7160b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7170b57cec5SDimitry Andric                                                       FeatureNEON,
7180b57cec5SDimitry Andric                                                       FeatureDSP,
7190b57cec5SDimitry Andric                                                       FeatureTrustZone,
7200b57cec5SDimitry Andric                                                       FeatureMP,
7210b57cec5SDimitry Andric                                                       FeatureVirtualization,
7220b57cec5SDimitry Andric                                                       FeatureCrypto,
7230b57cec5SDimitry Andric                                                       FeatureCRC]>;
7240b57cec5SDimitry Andric
7250b57cec5SDimitry Andricdef ARMv81a   : Architecture<"armv8.1-a", "ARMv81a",  [HasV8_1aOps,
7260b57cec5SDimitry Andric                                                       FeatureAClass,
7270b57cec5SDimitry Andric                                                       FeatureDB,
7280b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7290b57cec5SDimitry Andric                                                       FeatureNEON,
7300b57cec5SDimitry Andric                                                       FeatureDSP,
7310b57cec5SDimitry Andric                                                       FeatureTrustZone,
7320b57cec5SDimitry Andric                                                       FeatureMP,
7330b57cec5SDimitry Andric                                                       FeatureVirtualization,
7340b57cec5SDimitry Andric                                                       FeatureCrypto,
7350b57cec5SDimitry Andric                                                       FeatureCRC]>;
7360b57cec5SDimitry Andric
7370b57cec5SDimitry Andricdef ARMv82a   : Architecture<"armv8.2-a", "ARMv82a",  [HasV8_2aOps,
7380b57cec5SDimitry Andric                                                       FeatureAClass,
7390b57cec5SDimitry Andric                                                       FeatureDB,
7400b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7410b57cec5SDimitry Andric                                                       FeatureNEON,
7420b57cec5SDimitry Andric                                                       FeatureDSP,
7430b57cec5SDimitry Andric                                                       FeatureTrustZone,
7440b57cec5SDimitry Andric                                                       FeatureMP,
7450b57cec5SDimitry Andric                                                       FeatureVirtualization,
7460b57cec5SDimitry Andric                                                       FeatureCrypto,
7470b57cec5SDimitry Andric                                                       FeatureCRC,
7480b57cec5SDimitry Andric                                                       FeatureRAS]>;
7490b57cec5SDimitry Andric
7500b57cec5SDimitry Andricdef ARMv83a   : Architecture<"armv8.3-a", "ARMv83a",  [HasV8_3aOps,
7510b57cec5SDimitry Andric                                                       FeatureAClass,
7520b57cec5SDimitry Andric                                                       FeatureDB,
7530b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7540b57cec5SDimitry Andric                                                       FeatureNEON,
7550b57cec5SDimitry Andric                                                       FeatureDSP,
7560b57cec5SDimitry Andric                                                       FeatureTrustZone,
7570b57cec5SDimitry Andric                                                       FeatureMP,
7580b57cec5SDimitry Andric                                                       FeatureVirtualization,
7590b57cec5SDimitry Andric                                                       FeatureCrypto,
7600b57cec5SDimitry Andric                                                       FeatureCRC,
7610b57cec5SDimitry Andric                                                       FeatureRAS]>;
7620b57cec5SDimitry Andric
7630b57cec5SDimitry Andricdef ARMv84a   : Architecture<"armv8.4-a", "ARMv84a",  [HasV8_4aOps,
7640b57cec5SDimitry Andric                                                       FeatureAClass,
7650b57cec5SDimitry Andric                                                       FeatureDB,
7660b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7670b57cec5SDimitry Andric                                                       FeatureNEON,
7680b57cec5SDimitry Andric                                                       FeatureDSP,
7690b57cec5SDimitry Andric                                                       FeatureTrustZone,
7700b57cec5SDimitry Andric                                                       FeatureMP,
7710b57cec5SDimitry Andric                                                       FeatureVirtualization,
7720b57cec5SDimitry Andric                                                       FeatureCrypto,
7730b57cec5SDimitry Andric                                                       FeatureCRC,
7740b57cec5SDimitry Andric                                                       FeatureRAS,
7750b57cec5SDimitry Andric                                                       FeatureDotProd]>;
7760b57cec5SDimitry Andric
7770b57cec5SDimitry Andricdef ARMv85a   : Architecture<"armv8.5-a", "ARMv85a",  [HasV8_5aOps,
7780b57cec5SDimitry Andric                                                       FeatureAClass,
7790b57cec5SDimitry Andric                                                       FeatureDB,
7800b57cec5SDimitry Andric                                                       FeatureFPARMv8,
7810b57cec5SDimitry Andric                                                       FeatureNEON,
7820b57cec5SDimitry Andric                                                       FeatureDSP,
7830b57cec5SDimitry Andric                                                       FeatureTrustZone,
7840b57cec5SDimitry Andric                                                       FeatureMP,
7850b57cec5SDimitry Andric                                                       FeatureVirtualization,
7860b57cec5SDimitry Andric                                                       FeatureCrypto,
7870b57cec5SDimitry Andric                                                       FeatureCRC,
7880b57cec5SDimitry Andric                                                       FeatureRAS,
7890b57cec5SDimitry Andric                                                       FeatureDotProd]>;
7900b57cec5SDimitry Andric
7910b57cec5SDimitry Andricdef ARMv8r    : Architecture<"armv8-r",   "ARMv8r",   [HasV8Ops,
7920b57cec5SDimitry Andric                                                       FeatureRClass,
7930b57cec5SDimitry Andric                                                       FeatureDB,
7940b57cec5SDimitry Andric                                                       FeatureDFB,
7950b57cec5SDimitry Andric                                                       FeatureDSP,
7960b57cec5SDimitry Andric                                                       FeatureCRC,
7970b57cec5SDimitry Andric                                                       FeatureMP,
7980b57cec5SDimitry Andric                                                       FeatureVirtualization,
7990b57cec5SDimitry Andric                                                       FeatureFPARMv8,
8000b57cec5SDimitry Andric                                                       FeatureNEON]>;
8010b57cec5SDimitry Andric
8020b57cec5SDimitry Andricdef ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline",
8030b57cec5SDimitry Andric                                                      [HasV8MBaselineOps,
8040b57cec5SDimitry Andric                                                       FeatureNoARM,
8050b57cec5SDimitry Andric                                                       ModeThumb,
8060b57cec5SDimitry Andric                                                       FeatureDB,
8070b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
8080b57cec5SDimitry Andric                                                       FeatureV7Clrex,
8090b57cec5SDimitry Andric                                                       Feature8MSecExt,
8100b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
8110b57cec5SDimitry Andric                                                       FeatureMClass,
8120b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
8130b57cec5SDimitry Andric
8140b57cec5SDimitry Andricdef ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline",
8150b57cec5SDimitry Andric                                                      [HasV8MMainlineOps,
8160b57cec5SDimitry Andric                                                       FeatureNoARM,
8170b57cec5SDimitry Andric                                                       ModeThumb,
8180b57cec5SDimitry Andric                                                       FeatureDB,
8190b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
8200b57cec5SDimitry Andric                                                       Feature8MSecExt,
8210b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
8220b57cec5SDimitry Andric                                                       FeatureMClass]>;
8230b57cec5SDimitry Andric
8240b57cec5SDimitry Andricdef ARMv81mMainline : Architecture<"armv8.1-m.main", "ARMv81mMainline",
8250b57cec5SDimitry Andric                                                      [HasV8_1MMainlineOps,
8260b57cec5SDimitry Andric                                                       FeatureNoARM,
8270b57cec5SDimitry Andric                                                       ModeThumb,
8280b57cec5SDimitry Andric                                                       FeatureDB,
8290b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
8300b57cec5SDimitry Andric                                                       Feature8MSecExt,
8310b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
8320b57cec5SDimitry Andric                                                       FeatureMClass,
8330b57cec5SDimitry Andric                                                       FeatureRAS,
8340b57cec5SDimitry Andric                                                       FeatureLOB]>;
8350b57cec5SDimitry Andric
8360b57cec5SDimitry Andric// Aliases
8370b57cec5SDimitry Andricdef IWMMXT   : Architecture<"iwmmxt",      "ARMv5te",  [ARMv5te]>;
8380b57cec5SDimitry Andricdef IWMMXT2  : Architecture<"iwmmxt2",     "ARMv5te",  [ARMv5te]>;
8390b57cec5SDimitry Andricdef XScale   : Architecture<"xscale",      "ARMv5te",  [ARMv5te]>;
8400b57cec5SDimitry Andricdef ARMv6j   : Architecture<"armv6j",      "ARMv7a",   [ARMv6]>;
8410b57cec5SDimitry Andricdef ARMv7k   : Architecture<"armv7k",      "ARMv7a",   [ARMv7a]>;
8420b57cec5SDimitry Andricdef ARMv7s   : Architecture<"armv7s",      "ARMv7a",   [ARMv7a]>;
8430b57cec5SDimitry Andric
8440b57cec5SDimitry Andric
8450b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8460b57cec5SDimitry Andric// ARM schedules.
8470b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8480b57cec5SDimitry Andric//
8490b57cec5SDimitry Andricinclude "ARMPredicates.td"
8500b57cec5SDimitry Andricinclude "ARMSchedule.td"
8510b57cec5SDimitry Andric
8520b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8530b57cec5SDimitry Andric// ARM processors
8540b57cec5SDimitry Andric//
8550b57cec5SDimitry Andric
8560b57cec5SDimitry Andric// Dummy CPU, used to target architectures
8570b57cec5SDimitry Andricdef : ProcessorModel<"generic",     CortexA8Model,      []>;
8580b57cec5SDimitry Andric
8590b57cec5SDimitry Andric// FIXME: Several processors below are not using their own scheduler
8600b57cec5SDimitry Andric// model, but one of similar/previous processor. These should be fixed.
8610b57cec5SDimitry Andric
8620b57cec5SDimitry Andricdef : ProcNoItin<"arm8",                                [ARMv4]>;
8630b57cec5SDimitry Andricdef : ProcNoItin<"arm810",                              [ARMv4]>;
8640b57cec5SDimitry Andricdef : ProcNoItin<"strongarm",                           [ARMv4]>;
8650b57cec5SDimitry Andricdef : ProcNoItin<"strongarm110",                        [ARMv4]>;
8660b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1100",                       [ARMv4]>;
8670b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1110",                       [ARMv4]>;
8680b57cec5SDimitry Andric
8690b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi",                            [ARMv4t]>;
8700b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi-s",                          [ARMv4t]>;
8710b57cec5SDimitry Andricdef : ProcNoItin<"arm710t",                             [ARMv4t]>;
8720b57cec5SDimitry Andricdef : ProcNoItin<"arm720t",                             [ARMv4t]>;
8730b57cec5SDimitry Andricdef : ProcNoItin<"arm9",                                [ARMv4t]>;
8740b57cec5SDimitry Andricdef : ProcNoItin<"arm9tdmi",                            [ARMv4t]>;
8750b57cec5SDimitry Andricdef : ProcNoItin<"arm920",                              [ARMv4t]>;
8760b57cec5SDimitry Andricdef : ProcNoItin<"arm920t",                             [ARMv4t]>;
8770b57cec5SDimitry Andricdef : ProcNoItin<"arm922t",                             [ARMv4t]>;
8780b57cec5SDimitry Andricdef : ProcNoItin<"arm940t",                             [ARMv4t]>;
8790b57cec5SDimitry Andricdef : ProcNoItin<"ep9312",                              [ARMv4t]>;
8800b57cec5SDimitry Andric
8810b57cec5SDimitry Andricdef : ProcNoItin<"arm10tdmi",                           [ARMv5t]>;
8820b57cec5SDimitry Andricdef : ProcNoItin<"arm1020t",                            [ARMv5t]>;
8830b57cec5SDimitry Andric
8840b57cec5SDimitry Andricdef : ProcNoItin<"arm9e",                               [ARMv5te]>;
8850b57cec5SDimitry Andricdef : ProcNoItin<"arm926ej-s",                          [ARMv5te]>;
8860b57cec5SDimitry Andricdef : ProcNoItin<"arm946e-s",                           [ARMv5te]>;
8870b57cec5SDimitry Andricdef : ProcNoItin<"arm966e-s",                           [ARMv5te]>;
8880b57cec5SDimitry Andricdef : ProcNoItin<"arm968e-s",                           [ARMv5te]>;
8890b57cec5SDimitry Andricdef : ProcNoItin<"arm10e",                              [ARMv5te]>;
8900b57cec5SDimitry Andricdef : ProcNoItin<"arm1020e",                            [ARMv5te]>;
8910b57cec5SDimitry Andricdef : ProcNoItin<"arm1022e",                            [ARMv5te]>;
8920b57cec5SDimitry Andricdef : ProcNoItin<"xscale",                              [ARMv5te]>;
8930b57cec5SDimitry Andricdef : ProcNoItin<"iwmmxt",                              [ARMv5te]>;
8940b57cec5SDimitry Andric
8950b57cec5SDimitry Andricdef : Processor<"arm1136j-s",       ARMV6Itineraries,   [ARMv6]>;
8960b57cec5SDimitry Andricdef : Processor<"arm1136jf-s",      ARMV6Itineraries,   [ARMv6,
8970b57cec5SDimitry Andric                                                         FeatureVFP2,
8980b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
8990b57cec5SDimitry Andric
9000b57cec5SDimitry Andricdef : Processor<"cortex-m0",        ARMV6Itineraries,   [ARMv6m]>;
9010b57cec5SDimitry Andricdef : Processor<"cortex-m0plus",    ARMV6Itineraries,   [ARMv6m]>;
9020b57cec5SDimitry Andricdef : Processor<"cortex-m1",        ARMV6Itineraries,   [ARMv6m]>;
9030b57cec5SDimitry Andricdef : Processor<"sc000",            ARMV6Itineraries,   [ARMv6m]>;
9040b57cec5SDimitry Andric
9050b57cec5SDimitry Andricdef : Processor<"arm1176j-s",       ARMV6Itineraries,   [ARMv6kz]>;
9060b57cec5SDimitry Andricdef : Processor<"arm1176jz-s",      ARMV6Itineraries,   [ARMv6kz]>;
9070b57cec5SDimitry Andricdef : Processor<"arm1176jzf-s",     ARMV6Itineraries,   [ARMv6kz,
9080b57cec5SDimitry Andric                                                         FeatureVFP2,
9090b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
9100b57cec5SDimitry Andric
9110b57cec5SDimitry Andricdef : Processor<"mpcorenovfp",      ARMV6Itineraries,   [ARMv6k]>;
9120b57cec5SDimitry Andricdef : Processor<"mpcore",           ARMV6Itineraries,   [ARMv6k,
9130b57cec5SDimitry Andric                                                         FeatureVFP2,
9140b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
9150b57cec5SDimitry Andric
9160b57cec5SDimitry Andricdef : Processor<"arm1156t2-s",      ARMV6Itineraries,   [ARMv6t2]>;
9170b57cec5SDimitry Andricdef : Processor<"arm1156t2f-s",     ARMV6Itineraries,   [ARMv6t2,
9180b57cec5SDimitry Andric                                                         FeatureVFP2,
9190b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
9200b57cec5SDimitry Andric
9210b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a5",   CortexA8Model,      [ARMv7a, ProcA5,
9220b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9230b57cec5SDimitry Andric                                                         FeatureTrustZone,
9240b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
9250b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
9260b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
9270b57cec5SDimitry Andric                                                         FeatureMP,
9280b57cec5SDimitry Andric                                                         FeatureVFP4]>;
9290b57cec5SDimitry Andric
9300b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a7",   CortexA8Model,      [ARMv7a, ProcA7,
9310b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9320b57cec5SDimitry Andric                                                         FeatureTrustZone,
9330b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
9340b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
9350b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
9360b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
9370b57cec5SDimitry Andric                                                         FeatureMP,
9380b57cec5SDimitry Andric                                                         FeatureVFP4,
9390b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
9400b57cec5SDimitry Andric
9410b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a8",   CortexA8Model,      [ARMv7a, ProcA8,
9420b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9430b57cec5SDimitry Andric                                                         FeatureNonpipelinedVFP,
9440b57cec5SDimitry Andric                                                         FeatureTrustZone,
9450b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
9460b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
9470b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
9480b57cec5SDimitry Andric                                                         FeatureVMLxForwarding]>;
9490b57cec5SDimitry Andric
9500b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a9",   CortexA9Model,      [ARMv7a, ProcA9,
9510b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9520b57cec5SDimitry Andric                                                         FeatureTrustZone,
9530b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
9540b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
9550b57cec5SDimitry Andric                                                         FeatureFP16,
9560b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
9570b57cec5SDimitry Andric                                                         FeatureExpandMLx,
9580b57cec5SDimitry Andric                                                         FeaturePreferVMOVSR,
9590b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
9600b57cec5SDimitry Andric                                                         FeatureNEONForFPMovs,
9610b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
9620b57cec5SDimitry Andric                                                         FeatureMP]>;
9630b57cec5SDimitry Andric
9640b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a12",  CortexA9Model,      [ARMv7a, ProcA12,
9650b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9660b57cec5SDimitry Andric                                                         FeatureTrustZone,
9670b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
9680b57cec5SDimitry Andric                                                         FeatureVFP4,
9690b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
9700b57cec5SDimitry Andric                                                         FeatureVirtualization,
9710b57cec5SDimitry Andric                                                         FeatureMP]>;
9720b57cec5SDimitry Andric
9730b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a15",  CortexA9Model,      [ARMv7a, ProcA15,
9740b57cec5SDimitry Andric                                                         FeatureDontWidenVMOVS,
9750b57cec5SDimitry Andric                                                         FeatureSplatVFPToNeon,
9760b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9770b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
9780b57cec5SDimitry Andric                                                         FeatureTrustZone,
9790b57cec5SDimitry Andric                                                         FeatureVFP4,
9800b57cec5SDimitry Andric                                                         FeatureMP,
9810b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
9820b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
9830b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
9840b57cec5SDimitry Andric
9850b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a17",  CortexA9Model,      [ARMv7a, ProcA17,
9860b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9870b57cec5SDimitry Andric                                                         FeatureTrustZone,
9880b57cec5SDimitry Andric                                                         FeatureMP,
9890b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
9900b57cec5SDimitry Andric                                                         FeatureVFP4,
9910b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
9920b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
9930b57cec5SDimitry Andric
9940b57cec5SDimitry Andric// FIXME: krait has currently the same features as A9 plus VFP4 and  HWDiv
9950b57cec5SDimitry Andricdef : ProcessorModel<"krait",       CortexA9Model,      [ARMv7a, ProcKrait,
9960b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
9970b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
9980b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
9990b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
10000b57cec5SDimitry Andric                                                         FeatureFP16,
10010b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
10020b57cec5SDimitry Andric                                                         FeatureVFP4,
10030b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
10040b57cec5SDimitry Andric                                                         FeatureHWDivARM]>;
10050b57cec5SDimitry Andric
10060b57cec5SDimitry Andricdef : ProcessorModel<"swift",       SwiftModel,         [ARMv7a, ProcSwift,
10070b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10080b57cec5SDimitry Andric                                                         FeatureNEONForFP,
10090b57cec5SDimitry Andric                                                         FeatureVFP4,
10100b57cec5SDimitry Andric                                                         FeatureUseWideStrideVFP,
10110b57cec5SDimitry Andric                                                         FeatureMP,
10120b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
10130b57cec5SDimitry Andric                                                         FeatureHWDivARM,
10140b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
10150b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
10160b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10170b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
10180b57cec5SDimitry Andric                                                         FeatureProfUnpredicate,
10190b57cec5SDimitry Andric                                                         FeaturePrefISHSTBarrier,
10200b57cec5SDimitry Andric                                                         FeatureSlowOddRegister,
10210b57cec5SDimitry Andric                                                         FeatureSlowLoadDSubreg,
10220b57cec5SDimitry Andric                                                         FeatureSlowVGETLNi32,
10230b57cec5SDimitry Andric                                                         FeatureSlowVDUP32,
10240b57cec5SDimitry Andric                                                         FeatureUseMISched,
10250b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
10260b57cec5SDimitry Andric
10270b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4",   CortexA8Model,      [ARMv7r, ProcR4,
10280b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10290b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
10300b57cec5SDimitry Andric
10310b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4f",  CortexA8Model,      [ARMv7r, ProcR4,
10320b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10330b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
10340b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10350b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
10360b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
10370b57cec5SDimitry Andric
10380b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r5",   CortexA8Model,      [ARMv7r, ProcR5,
10390b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10400b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
10410b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
10420b57cec5SDimitry Andric                                                         FeatureHWDivARM,
10430b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10440b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
10450b57cec5SDimitry Andric
10460b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r7",   CortexA8Model,      [ARMv7r, ProcR7,
10470b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10480b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
10490b57cec5SDimitry Andric                                                         FeatureFP16,
10500b57cec5SDimitry Andric                                                         FeatureMP,
10510b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
10520b57cec5SDimitry Andric                                                         FeatureHWDivARM,
10530b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10540b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
10550b57cec5SDimitry Andric
10560b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r8",   CortexA8Model,      [ARMv7r,
10570b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
10580b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
10590b57cec5SDimitry Andric                                                         FeatureFP16,
10600b57cec5SDimitry Andric                                                         FeatureMP,
10610b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
10620b57cec5SDimitry Andric                                                         FeatureHWDivARM,
10630b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10640b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
10650b57cec5SDimitry Andric
10660b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m3",   CortexM4Model,      [ARMv7m,
10670b57cec5SDimitry Andric                                                         ProcM3,
10680b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
10690b57cec5SDimitry Andric                                                         FeatureUseMISched,
10700b57cec5SDimitry Andric                                                         FeatureUseAA,
10710b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
10720b57cec5SDimitry Andric
10730b57cec5SDimitry Andricdef : ProcessorModel<"sc300",       CortexM4Model,      [ARMv7m,
10740b57cec5SDimitry Andric                                                         ProcM3,
10750b57cec5SDimitry Andric                                                         FeatureUseMISched,
10760b57cec5SDimitry Andric                                                         FeatureUseAA,
10770b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
10780b57cec5SDimitry Andric
10790b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m4", CortexM4Model,        [ARMv7em,
10800b57cec5SDimitry Andric                                                         FeatureVFP4_D16_SP,
10810b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
10820b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10830b57cec5SDimitry Andric                                                         FeatureUseMISched,
10840b57cec5SDimitry Andric                                                         FeatureUseAA,
10850b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
10860b57cec5SDimitry Andric
10870b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m7",                           [ARMv7em,
10880b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16]>;
10890b57cec5SDimitry Andric
10900b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m23",                          [ARMv8mBaseline,
10910b57cec5SDimitry Andric                                                         FeatureNoMovt]>;
10920b57cec5SDimitry Andric
10930b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m33", CortexM4Model,       [ARMv8mMainline,
10940b57cec5SDimitry Andric                                                         FeatureDSP,
10950b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
10960b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
10970b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
10980b57cec5SDimitry Andric                                                         FeatureUseMISched,
10990b57cec5SDimitry Andric                                                         FeatureUseAA,
11000b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
11010b57cec5SDimitry Andric
11020b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m35p", CortexM4Model,      [ARMv8mMainline,
11030b57cec5SDimitry Andric                                                         FeatureDSP,
11040b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
11050b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
11060b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
11070b57cec5SDimitry Andric                                                         FeatureUseMISched,
11080b57cec5SDimitry Andric                                                         FeatureUseAA,
11090b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
11100b57cec5SDimitry Andric
11110b57cec5SDimitry Andric
11120b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a32",                           [ARMv8a,
11130b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11140b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11150b57cec5SDimitry Andric                                                         FeatureCrypto,
11160b57cec5SDimitry Andric                                                         FeatureCRC]>;
11170b57cec5SDimitry Andric
11180b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a35",                          [ARMv8a, ProcA35,
11190b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11200b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11210b57cec5SDimitry Andric                                                         FeatureCrypto,
11220b57cec5SDimitry Andric                                                         FeatureCRC]>;
11230b57cec5SDimitry Andric
11240b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a53",                          [ARMv8a, ProcA53,
11250b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11260b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11270b57cec5SDimitry Andric                                                         FeatureCrypto,
11280b57cec5SDimitry Andric                                                         FeatureCRC,
11290b57cec5SDimitry Andric                                                         FeatureFPAO]>;
11300b57cec5SDimitry Andric
11310b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a55",                          [ARMv82a, ProcA55,
11320b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11330b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11340b57cec5SDimitry Andric                                                         FeatureDotProd]>;
11350b57cec5SDimitry Andric
11360b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a57",  CortexA57Model,     [ARMv8a, ProcA57,
11370b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11380b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11390b57cec5SDimitry Andric                                                         FeatureCrypto,
11400b57cec5SDimitry Andric                                                         FeatureCRC,
11410b57cec5SDimitry Andric                                                         FeatureFPAO,
11420b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
11430b57cec5SDimitry Andric                                                         FeatureCheapPredicableCPSR]>;
11440b57cec5SDimitry Andric
11450b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a72",  CortexA57Model,     [ARMv8a, ProcA72,
11460b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11470b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11480b57cec5SDimitry Andric                                                         FeatureCrypto,
11490b57cec5SDimitry Andric                                                         FeatureCRC]>;
11500b57cec5SDimitry Andric
11510b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a73",                          [ARMv8a, ProcA73,
11520b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11530b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11540b57cec5SDimitry Andric                                                         FeatureCrypto,
11550b57cec5SDimitry Andric                                                         FeatureCRC]>;
11560b57cec5SDimitry Andric
11570b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a75",                          [ARMv82a, ProcA75,
11580b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11590b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11600b57cec5SDimitry Andric                                                         FeatureDotProd]>;
11610b57cec5SDimitry Andric
11620b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76",                          [ARMv82a, ProcA76,
11630b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11640b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11650b57cec5SDimitry Andric                                                         FeatureCrypto,
11660b57cec5SDimitry Andric                                                         FeatureCRC,
11670b57cec5SDimitry Andric                                                         FeatureFullFP16,
11680b57cec5SDimitry Andric                                                         FeatureDotProd]>;
11690b57cec5SDimitry Andric
11700b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76ae",                        [ARMv82a, ProcA76,
11710b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11720b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11730b57cec5SDimitry Andric                                                         FeatureCrypto,
11740b57cec5SDimitry Andric                                                         FeatureCRC,
11750b57cec5SDimitry Andric                                                         FeatureFullFP16,
11760b57cec5SDimitry Andric                                                         FeatureDotProd]>;
11770b57cec5SDimitry Andric
1178*8bcb0991SDimitry Andricdef : ProcNoItin<"neoverse-n1",                         [ARMv82a,
1179*8bcb0991SDimitry Andric                                                         FeatureHWDivThumb,
1180*8bcb0991SDimitry Andric                                                         FeatureHWDivARM,
1181*8bcb0991SDimitry Andric                                                         FeatureCrypto,
1182*8bcb0991SDimitry Andric                                                         FeatureCRC,
1183*8bcb0991SDimitry Andric                                                         FeatureDotProd]>;
1184*8bcb0991SDimitry Andric
11850b57cec5SDimitry Andricdef : ProcessorModel<"cyclone",     SwiftModel,         [ARMv8a, ProcSwift,
11860b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
11870b57cec5SDimitry Andric                                                         FeatureNEONForFP,
11880b57cec5SDimitry Andric                                                         FeatureVFP4,
11890b57cec5SDimitry Andric                                                         FeatureMP,
11900b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
11910b57cec5SDimitry Andric                                                         FeatureHWDivARM,
11920b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
11930b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
11940b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
11950b57cec5SDimitry Andric                                                         FeatureCrypto,
11960b57cec5SDimitry Andric                                                         FeatureUseMISched,
11970b57cec5SDimitry Andric                                                         FeatureZCZeroing,
11980b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
11990b57cec5SDimitry Andric
12000b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m1",                           [ARMv8a, ProcExynos]>;
12010b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m2",                           [ARMv8a, ProcExynos]>;
12020b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m3",                           [ARMv8a, ProcExynos]>;
12030b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m4",                           [ARMv82a, ProcExynos,
12040b57cec5SDimitry Andric                                                         FeatureFullFP16,
12050b57cec5SDimitry Andric                                                         FeatureDotProd]>;
12060b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m5",                           [ARMv82a, ProcExynos,
12070b57cec5SDimitry Andric                                                         FeatureFullFP16,
12080b57cec5SDimitry Andric                                                         FeatureDotProd]>;
12090b57cec5SDimitry Andric
12100b57cec5SDimitry Andricdef : ProcNoItin<"kryo",                                [ARMv8a, ProcKryo,
12110b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
12120b57cec5SDimitry Andric                                                         FeatureHWDivARM,
12130b57cec5SDimitry Andric                                                         FeatureCrypto,
12140b57cec5SDimitry Andric                                                         FeatureCRC]>;
12150b57cec5SDimitry Andric
12160b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r52", CortexR52Model,      [ARMv8r, ProcR52,
12170b57cec5SDimitry Andric                                                         FeatureUseMISched,
12180b57cec5SDimitry Andric                                                         FeatureFPAO,
12190b57cec5SDimitry Andric                                                         FeatureUseAA]>;
12200b57cec5SDimitry Andric
12210b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12220b57cec5SDimitry Andric// Register File Description
12230b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12240b57cec5SDimitry Andric
12250b57cec5SDimitry Andricinclude "ARMRegisterInfo.td"
12260b57cec5SDimitry Andricinclude "ARMRegisterBanks.td"
12270b57cec5SDimitry Andricinclude "ARMCallingConv.td"
12280b57cec5SDimitry Andric
12290b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12300b57cec5SDimitry Andric// Instruction Descriptions
12310b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12320b57cec5SDimitry Andric
12330b57cec5SDimitry Andricinclude "ARMInstrInfo.td"
12340b57cec5SDimitry Andricdef ARMInstrInfo : InstrInfo;
12350b57cec5SDimitry Andric
12360b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12370b57cec5SDimitry Andric// Declare the target which we are implementing
12380b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12390b57cec5SDimitry Andric
12400b57cec5SDimitry Andricdef ARMAsmWriter : AsmWriter {
12410b57cec5SDimitry Andric  string AsmWriterClassName  = "InstPrinter";
12420b57cec5SDimitry Andric  int PassSubtarget = 1;
12430b57cec5SDimitry Andric  int Variant = 0;
12440b57cec5SDimitry Andric  bit isMCAsmWriter = 1;
12450b57cec5SDimitry Andric}
12460b57cec5SDimitry Andric
12470b57cec5SDimitry Andricdef ARMAsmParser : AsmParser {
12480b57cec5SDimitry Andric  bit ReportMultipleNearMisses = 1;
12490b57cec5SDimitry Andric}
12500b57cec5SDimitry Andric
12510b57cec5SDimitry Andricdef ARMAsmParserVariant : AsmParserVariant {
12520b57cec5SDimitry Andric  int Variant = 0;
12530b57cec5SDimitry Andric  string Name = "ARM";
12540b57cec5SDimitry Andric  string BreakCharacters = ".";
12550b57cec5SDimitry Andric}
12560b57cec5SDimitry Andric
12570b57cec5SDimitry Andricdef ARM : Target {
12580b57cec5SDimitry Andric  // Pull in Instruction Info.
12590b57cec5SDimitry Andric  let InstructionSet = ARMInstrInfo;
12600b57cec5SDimitry Andric  let AssemblyWriters = [ARMAsmWriter];
12610b57cec5SDimitry Andric  let AssemblyParsers = [ARMAsmParser];
12620b57cec5SDimitry Andric  let AssemblyParserVariants = [ARMAsmParserVariant];
12630b57cec5SDimitry Andric  let AllowRegisterRenaming = 1;
12640b57cec5SDimitry Andric}
1265