xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ARM.td (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
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
2281ad6265SDimitry Andric// True if compiling for Thumb, false for ARM.
2381ad6265SDimitry Andricdef ModeThumb             : SubtargetFeature<"thumb-mode", "IsThumb",
240b57cec5SDimitry Andric                                             "true", "Thumb mode">;
250b57cec5SDimitry Andric
2681ad6265SDimitry Andric// True if we're using software floating point features.
270b57cec5SDimitry Andricdef ModeSoftFloat         : SubtargetFeature<"soft-float","UseSoftFloat",
280b57cec5SDimitry Andric                                             "true", "Use software floating "
290b57cec5SDimitry Andric                                             "point features.">;
300b57cec5SDimitry Andric
310b57cec5SDimitry Andric
320b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
330b57cec5SDimitry Andric// ARM Subtarget features.
340b57cec5SDimitry Andric//
350b57cec5SDimitry Andric
360b57cec5SDimitry Andric// Floating Point, HW Division and Neon Support
370b57cec5SDimitry Andric
380b57cec5SDimitry Andric// FP loads/stores/moves, shared between VFP and MVE (even in the integer-only
390b57cec5SDimitry Andric// version).
400b57cec5SDimitry Andricdef FeatureFPRegs         : SubtargetFeature<"fpregs", "HasFPRegs", "true",
410b57cec5SDimitry Andric                                             "Enable FP registers">;
420b57cec5SDimitry Andric
430b57cec5SDimitry Andric// 16-bit FP loads/stores/moves, shared between VFP (with the v8.2A FP16
440b57cec5SDimitry Andric// extension) and MVE (even in the integer-only version).
450b57cec5SDimitry Andricdef FeatureFPRegs16       : SubtargetFeature<"fpregs16", "HasFPRegs16", "true",
460b57cec5SDimitry Andric                                             "Enable 16-bit FP registers",
470b57cec5SDimitry Andric                                             [FeatureFPRegs]>;
480b57cec5SDimitry Andric
490b57cec5SDimitry Andricdef FeatureFPRegs64       : SubtargetFeature<"fpregs64", "HasFPRegs64", "true",
500b57cec5SDimitry Andric                                             "Enable 64-bit FP registers",
510b57cec5SDimitry Andric                                             [FeatureFPRegs]>;
520b57cec5SDimitry Andric
5381ad6265SDimitry Andric// True if the floating point unit supports double precision.
540b57cec5SDimitry Andricdef FeatureFP64           : SubtargetFeature<"fp64", "HasFP64", "true",
550b57cec5SDimitry Andric                                             "Floating point unit supports "
560b57cec5SDimitry Andric                                             "double precision",
570b57cec5SDimitry Andric                                             [FeatureFPRegs64]>;
580b57cec5SDimitry Andric
5981ad6265SDimitry Andric// True if subtarget has the full 32 double precision FP registers for VFPv3.
600b57cec5SDimitry Andricdef FeatureD32            : SubtargetFeature<"d32", "HasD32", "true",
610b57cec5SDimitry Andric                                             "Extend FP to 32 double registers">;
620b57cec5SDimitry Andric
6381ad6265SDimitry Andric/// Versions of the VFP flags restricted to single precision, or to
6481ad6265SDimitry Andric/// 16 d-registers, or both.
650b57cec5SDimitry Andricmulticlass VFPver<string name, string query, string description,
660b57cec5SDimitry Andric                  list<SubtargetFeature> prev,
670b57cec5SDimitry Andric                  list<SubtargetFeature> otherimplies,
680b57cec5SDimitry Andric                  list<SubtargetFeature> vfp2prev = []> {
690b57cec5SDimitry Andric  def _D16_SP: SubtargetFeature<
700b57cec5SDimitry Andric    name#"d16sp", query#"D16SP", "true",
710b57cec5SDimitry Andric    description#" with only 16 d-registers and no double precision",
720b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16_SP")) #
730b57cec5SDimitry Andric      !foreach(v, vfp2prev, !cast<SubtargetFeature>(v # "_SP")) #
740b57cec5SDimitry Andric      otherimplies>;
750b57cec5SDimitry Andric  def _SP: SubtargetFeature<
760b57cec5SDimitry Andric    name#"sp", query#"SP", "true",
770b57cec5SDimitry Andric    description#" with no double precision",
780b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_SP")) #
790b57cec5SDimitry Andric      otherimplies # [FeatureD32, !cast<SubtargetFeature>(NAME # "_D16_SP")]>;
800b57cec5SDimitry Andric  def _D16: SubtargetFeature<
810b57cec5SDimitry Andric    name#"d16", query#"D16", "true",
820b57cec5SDimitry Andric    description#" with only 16 d-registers",
830b57cec5SDimitry Andric    !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16")) #
840b57cec5SDimitry Andric      vfp2prev #
850b57cec5SDimitry Andric      otherimplies # [FeatureFP64, !cast<SubtargetFeature>(NAME # "_D16_SP")]>;
860b57cec5SDimitry Andric  def "": SubtargetFeature<
870b57cec5SDimitry Andric    name, query, "true", description,
880b57cec5SDimitry Andric    prev # otherimplies # [
890b57cec5SDimitry Andric        !cast<SubtargetFeature>(NAME # "_D16"),
900b57cec5SDimitry Andric        !cast<SubtargetFeature>(NAME # "_SP")]>;
910b57cec5SDimitry Andric}
920b57cec5SDimitry Andric
93c14a5a88SDimitry Andricdef FeatureVFP2_SP        : SubtargetFeature<"vfp2sp", "HasVFPv2SP", "true",
94c14a5a88SDimitry Andric                                             "Enable VFP2 instructions with "
95c14a5a88SDimitry Andric                                             "no double precision",
968bcb0991SDimitry Andric                                             [FeatureFPRegs]>;
978bcb0991SDimitry Andric
980b57cec5SDimitry Andricdef FeatureVFP2           : SubtargetFeature<"vfp2", "HasVFPv2", "true",
990b57cec5SDimitry Andric                                             "Enable VFP2 instructions",
1008bcb0991SDimitry Andric                                             [FeatureFP64, FeatureVFP2_SP]>;
1010b57cec5SDimitry Andric
1020b57cec5SDimitry Andricdefm FeatureVFP3: VFPver<"vfp3", "HasVFPv3", "Enable VFP3 instructions",
1030b57cec5SDimitry Andric                         [], [], [FeatureVFP2]>;
1040b57cec5SDimitry Andric
1050b57cec5SDimitry Andricdef FeatureNEON           : SubtargetFeature<"neon", "HasNEON", "true",
1060b57cec5SDimitry Andric                                             "Enable NEON instructions",
1070b57cec5SDimitry Andric                                             [FeatureVFP3]>;
1080b57cec5SDimitry Andric
10981ad6265SDimitry Andric// True if subtarget supports half-precision FP conversions.
1100b57cec5SDimitry Andricdef FeatureFP16           : SubtargetFeature<"fp16", "HasFP16", "true",
1110b57cec5SDimitry Andric                                             "Enable half-precision "
1120b57cec5SDimitry Andric                                             "floating point">;
1130b57cec5SDimitry Andric
1140b57cec5SDimitry Andricdefm FeatureVFP4: VFPver<"vfp4", "HasVFPv4", "Enable VFP4 instructions",
1150b57cec5SDimitry Andric                         [FeatureVFP3], [FeatureFP16]>;
1160b57cec5SDimitry Andric
1170b57cec5SDimitry Andricdefm FeatureFPARMv8: VFPver<"fp-armv8", "HasFPARMv8", "Enable ARMv8 FP",
1180b57cec5SDimitry Andric                         [FeatureVFP4], []>;
1190b57cec5SDimitry Andric
12081ad6265SDimitry Andric// True if subtarget supports half-precision FP operations.
1210b57cec5SDimitry Andricdef FeatureFullFP16       : SubtargetFeature<"fullfp16", "HasFullFP16", "true",
1220b57cec5SDimitry Andric                                             "Enable full half-precision "
1230b57cec5SDimitry Andric                                             "floating point",
1240b57cec5SDimitry Andric                                             [FeatureFPARMv8_D16_SP, FeatureFPRegs16]>;
1250b57cec5SDimitry Andric
12681ad6265SDimitry Andric// True if subtarget supports half-precision FP fml operations.
1270b57cec5SDimitry Andricdef FeatureFP16FML        : SubtargetFeature<"fp16fml", "HasFP16FML", "true",
1280b57cec5SDimitry Andric                                             "Enable full half-precision "
1290b57cec5SDimitry Andric                                             "floating point fml instructions",
1300b57cec5SDimitry Andric                                             [FeatureFullFP16]>;
1310b57cec5SDimitry Andric
13281ad6265SDimitry Andric// True if subtarget supports [su]div in Thumb mode.
1330b57cec5SDimitry Andricdef FeatureHWDivThumb     : SubtargetFeature<"hwdiv",
13481ad6265SDimitry Andric                                             "HasDivideInThumbMode", "true",
1350b57cec5SDimitry Andric                                             "Enable divide instructions in Thumb">;
1360b57cec5SDimitry Andric
13781ad6265SDimitry Andric// True if subtarget supports [su]div in ARM mode.
1380b57cec5SDimitry Andricdef FeatureHWDivARM       : SubtargetFeature<"hwdiv-arm",
13981ad6265SDimitry Andric                                             "HasDivideInARMMode", "true",
1400b57cec5SDimitry Andric                                             "Enable divide instructions in ARM mode">;
1410b57cec5SDimitry Andric
1420b57cec5SDimitry Andric// Atomic Support
14381ad6265SDimitry Andric
14481ad6265SDimitry Andric// True if the subtarget supports DMB / DSB data barrier instructions.
1450b57cec5SDimitry Andricdef FeatureDB             : SubtargetFeature<"db", "HasDataBarrier", "true",
1460b57cec5SDimitry Andric                                             "Has data barrier (dmb/dsb) instructions">;
1470b57cec5SDimitry Andric
14881ad6265SDimitry Andric// True if the subtarget supports CLREX instructions.
1490b57cec5SDimitry Andricdef FeatureV7Clrex        : SubtargetFeature<"v7clrex", "HasV7Clrex", "true",
1500b57cec5SDimitry Andric                                             "Has v7 clrex instruction">;
1510b57cec5SDimitry Andric
15281ad6265SDimitry Andric// True if the subtarget supports DFB data barrier instruction.
1530b57cec5SDimitry Andricdef FeatureDFB  : SubtargetFeature<"dfb", "HasFullDataBarrier", "true",
1540b57cec5SDimitry Andric                                   "Has full data barrier (dfb) instruction">;
1550b57cec5SDimitry Andric
15681ad6265SDimitry Andric// True if the subtarget supports v8 atomics (LDA/LDAEX etc) instructions.
1570b57cec5SDimitry Andricdef FeatureAcquireRelease : SubtargetFeature<"acquire-release",
1580b57cec5SDimitry Andric                                             "HasAcquireRelease", "true",
1590b57cec5SDimitry Andric                                             "Has v8 acquire/release (lda/ldaex "
1600b57cec5SDimitry Andric                                             " etc) instructions">;
1610b57cec5SDimitry Andric
1620b57cec5SDimitry Andric
16381ad6265SDimitry Andric// True if floating point compare + branch is slow.
16481ad6265SDimitry Andricdef FeatureSlowFPBrcc     : SubtargetFeature<"slow-fp-brcc", "IsFPBrccSlow", "true",
1650b57cec5SDimitry Andric                                             "FP compare + branch is slow">;
1660b57cec5SDimitry Andric
16781ad6265SDimitry Andric// True if the processor supports the Performance Monitor Extensions. These
16881ad6265SDimitry Andric// include a generic cycle-counter as well as more fine-grained (often
16981ad6265SDimitry Andric// implementation-specific) events.
1700b57cec5SDimitry Andricdef FeaturePerfMon        : SubtargetFeature<"perfmon", "HasPerfMon", "true",
1710b57cec5SDimitry Andric                                             "Enable support for Performance "
1720b57cec5SDimitry Andric                                             "Monitor extensions">;
1730b57cec5SDimitry Andric
1740b57cec5SDimitry Andric
1750b57cec5SDimitry Andric// TrustZone Security Extensions
17681ad6265SDimitry Andric
17781ad6265SDimitry Andric// True if processor supports TrustZone security extensions.
1780b57cec5SDimitry Andricdef FeatureTrustZone      : SubtargetFeature<"trustzone", "HasTrustZone", "true",
1790b57cec5SDimitry Andric                                             "Enable support for TrustZone "
1800b57cec5SDimitry Andric                                             "security extensions">;
1810b57cec5SDimitry Andric
18281ad6265SDimitry Andric// True if processor supports ARMv8-M Security Extensions.
1830b57cec5SDimitry Andricdef Feature8MSecExt       : SubtargetFeature<"8msecext", "Has8MSecExt", "true",
1840b57cec5SDimitry Andric                                             "Enable support for ARMv8-M "
1850b57cec5SDimitry Andric                                             "Security Extensions">;
1860b57cec5SDimitry Andric
18781ad6265SDimitry Andric// True if processor supports SHA1 and SHA256.
1880b57cec5SDimitry Andricdef FeatureSHA2           : SubtargetFeature<"sha2", "HasSHA2", "true",
1890b57cec5SDimitry Andric                                             "Enable SHA1 and SHA256 support", [FeatureNEON]>;
1900b57cec5SDimitry Andric
1910b57cec5SDimitry Andricdef FeatureAES            : SubtargetFeature<"aes", "HasAES", "true",
1920b57cec5SDimitry Andric                                             "Enable AES support", [FeatureNEON]>;
1930b57cec5SDimitry Andric
19481ad6265SDimitry Andric// True if processor supports Cryptography extensions.
1950b57cec5SDimitry Andricdef FeatureCrypto         : SubtargetFeature<"crypto", "HasCrypto", "true",
1960b57cec5SDimitry Andric                                             "Enable support for "
1970b57cec5SDimitry Andric                                             "Cryptography extensions",
1980b57cec5SDimitry Andric                                             [FeatureNEON, FeatureSHA2, FeatureAES]>;
1990b57cec5SDimitry Andric
20081ad6265SDimitry Andric// True if processor supports CRC instructions.
2010b57cec5SDimitry Andricdef FeatureCRC            : SubtargetFeature<"crc", "HasCRC", "true",
2020b57cec5SDimitry Andric                                             "Enable support for CRC instructions">;
2030b57cec5SDimitry Andric
20481ad6265SDimitry Andric// True if the ARMv8.2A dot product instructions are supported.
2050b57cec5SDimitry Andricdef FeatureDotProd        : SubtargetFeature<"dotprod", "HasDotProd", "true",
2060b57cec5SDimitry Andric                                             "Enable support for dot product instructions",
2070b57cec5SDimitry Andric                                             [FeatureNEON]>;
2080b57cec5SDimitry Andric
20981ad6265SDimitry Andric// True if the processor supports RAS extensions.
21081ad6265SDimitry Andric// Not to be confused with FeatureHasRetAddrStack (return address stack).
2110b57cec5SDimitry Andricdef FeatureRAS            : SubtargetFeature<"ras", "HasRAS", "true",
2120b57cec5SDimitry Andric                                             "Enable Reliability, Availability "
2130b57cec5SDimitry Andric                                             "and Serviceability extensions">;
2140b57cec5SDimitry Andric
21581ad6265SDimitry Andric// Fast computation of non-negative address offsets.
21681ad6265SDimitry Andric// True if processor does positive address offset computation faster.
2170b57cec5SDimitry Andricdef FeatureFPAO           : SubtargetFeature<"fpao", "HasFPAO", "true",
2180b57cec5SDimitry Andric                                             "Enable fast computation of "
2190b57cec5SDimitry Andric                                             "positive address offsets">;
2200b57cec5SDimitry Andric
22181ad6265SDimitry Andric// Fast execution of AES crypto operations.
22281ad6265SDimitry Andric// True if processor executes back to back AES instruction pairs faster.
2230b57cec5SDimitry Andricdef FeatureFuseAES        : SubtargetFeature<"fuse-aes", "HasFuseAES", "true",
2240b57cec5SDimitry Andric                                             "CPU fuses AES crypto operations">;
2250b57cec5SDimitry Andric
22681ad6265SDimitry Andric// Fast execution of bottom and top halves of literal generation.
22781ad6265SDimitry Andric// True if processor executes back to back bottom and top halves of literal generation faster.
2280b57cec5SDimitry Andricdef FeatureFuseLiterals   : SubtargetFeature<"fuse-literals", "HasFuseLiterals", "true",
2290b57cec5SDimitry Andric                                             "CPU fuses literal generation operations">;
2300b57cec5SDimitry Andric
23181ad6265SDimitry Andric// The way of reading thread pointer.
23281ad6265SDimitry Andric// True if read thread pointer from coprocessor register.
23381ad6265SDimitry Andricdef FeatureReadTp :  SubtargetFeature<"read-tp-hard", "IsReadTPHard", "true",
2340b57cec5SDimitry Andric                                      "Reading thread pointer from register">;
2350b57cec5SDimitry Andric
2360b57cec5SDimitry Andric// Cyclone can zero VFP registers in 0 cycles.
23781ad6265SDimitry Andric// True if the instructions "vmov.i32 d0, #0" and "vmov.i32 q0, #0" are
23881ad6265SDimitry Andric// particularly effective at zeroing a VFP register.
2390b57cec5SDimitry Andricdef FeatureZCZeroing      : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
2400b57cec5SDimitry Andric                                             "Has zero-cycle zeroing instructions">;
2410b57cec5SDimitry Andric
24281ad6265SDimitry Andric// Whether it is profitable to unpredicate certain instructions during if-conversion.
24381ad6265SDimitry Andric// True if if conversion may decide to leave some instructions unpredicated.
2440b57cec5SDimitry Andricdef FeatureProfUnpredicate : SubtargetFeature<"prof-unpr",
2450b57cec5SDimitry Andric                                              "IsProfitableToUnpredicate", "true",
2460b57cec5SDimitry Andric                                              "Is profitable to unpredicate">;
2470b57cec5SDimitry Andric
2480b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VGETLNi32.
24981ad6265SDimitry Andric// True if VMOV will be favored over VGETLNi32.
2500b57cec5SDimitry Andricdef FeatureSlowVGETLNi32  : SubtargetFeature<"slow-vgetlni32",
2510b57cec5SDimitry Andric                                             "HasSlowVGETLNi32", "true",
2520b57cec5SDimitry Andric                                             "Has slow VGETLNi32 - prefer VMOV">;
2530b57cec5SDimitry Andric
2540b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VDUP32.
25581ad6265SDimitry Andric// True if VMOV will be favored over VDUP.
2560b57cec5SDimitry Andricdef FeatureSlowVDUP32     : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32",
2570b57cec5SDimitry Andric                                             "true",
2580b57cec5SDimitry Andric                                             "Has slow VDUP32 - prefer VMOV">;
2590b57cec5SDimitry Andric
2600b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON
2610b57cec5SDimitry Andric// for scalar FP, as this allows more effective execution domain optimization.
26281ad6265SDimitry Andric// True if VMOVSR will be favored over VMOVDRR.
2630b57cec5SDimitry Andricdef FeaturePreferVMOVSR   : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR",
2640b57cec5SDimitry Andric                                             "true", "Prefer VMOVSR">;
2650b57cec5SDimitry Andric
2660b57cec5SDimitry Andric// Swift has ISHST barriers compatible with Atomic Release semantics but weaker
26781ad6265SDimitry Andric// than ISH.
26881ad6265SDimitry Andric// True if ISHST barriers will be used for Release semantics.
26981ad6265SDimitry Andricdef FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHSTBarriers",
2700b57cec5SDimitry Andric                                               "true", "Prefer ISHST barriers">;
2710b57cec5SDimitry Andric
2720b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU.
27381ad6265SDimitry Andric// True if the AGU and NEON/FPU units are multiplexed.
2740b57cec5SDimitry Andricdef FeatureMuxedUnits     : SubtargetFeature<"muxed-units", "HasMuxedUnits",
2750b57cec5SDimitry Andric                                             "true",
2760b57cec5SDimitry Andric                                             "Has muxed AGU and NEON/FPU">;
2770b57cec5SDimitry Andric
2780b57cec5SDimitry Andric// Whether VLDM/VSTM starting with odd register number need more microops
27981ad6265SDimitry Andric// than single VLDRS.
28081ad6265SDimitry Andric// True if a VLDM/VSTM starting with an odd register number is considered to
28181ad6265SDimitry Andric// take more microops than single VLDRS/VSTRS.
28281ad6265SDimitry Andricdef FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "HasSlowOddRegister",
2830b57cec5SDimitry Andric                                              "true", "VLDM/VSTM starting "
2840b57cec5SDimitry Andric                                              "with an odd register is slow">;
2850b57cec5SDimitry Andric
2860b57cec5SDimitry Andric// Some targets have a renaming dependency when loading into D subregisters.
28781ad6265SDimitry Andric// True if loading into a D subregister will be penalized.
2880b57cec5SDimitry Andricdef FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg",
28981ad6265SDimitry Andric                                              "HasSlowLoadDSubregister", "true",
2900b57cec5SDimitry Andric                                              "Loading into D subregs is slow">;
2910b57cec5SDimitry Andric
29281ad6265SDimitry Andric// True if use a wider stride when allocating VFP registers.
2930b57cec5SDimitry Andricdef FeatureUseWideStrideVFP : SubtargetFeature<"wide-stride-vfp",
2940b57cec5SDimitry Andric                                               "UseWideStrideVFP", "true",
2950b57cec5SDimitry Andric                                               "Use a wide stride when allocating VFP registers">;
2960b57cec5SDimitry Andric
2970b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD.
29881ad6265SDimitry Andric// True if VMOVS will never be widened to VMOVD.
2990b57cec5SDimitry Andricdef FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs",
3000b57cec5SDimitry Andric                                             "DontWidenVMOVS", "true",
3010b57cec5SDimitry Andric                                             "Don't widen VMOVS to VMOVD">;
3020b57cec5SDimitry Andric
3030b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) prefer to avoid mixing operations on different
3040b57cec5SDimitry Andric// VFP register widths.
30581ad6265SDimitry Andric// True if splat a register between VFP and NEON instructions.
3060b57cec5SDimitry Andricdef FeatureSplatVFPToNeon : SubtargetFeature<"splat-vfp-neon",
30781ad6265SDimitry Andric                                             "UseSplatVFPToNeon", "true",
3080b57cec5SDimitry Andric                                             "Splat register from VFP to NEON",
3090b57cec5SDimitry Andric                                             [FeatureDontWidenVMOVS]>;
3100b57cec5SDimitry Andric
3110b57cec5SDimitry Andric// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions.
31281ad6265SDimitry Andric// True if run the MLx expansion pass.
3130b57cec5SDimitry Andricdef FeatureExpandMLx      : SubtargetFeature<"expand-fp-mlx",
3140b57cec5SDimitry Andric                                             "ExpandMLx", "true",
3150b57cec5SDimitry Andric                                             "Expand VFP/NEON MLA/MLS instructions">;
3160b57cec5SDimitry Andric
3170b57cec5SDimitry Andric// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS.
31881ad6265SDimitry Andric// True if VFP/NEON VMLA/VMLS have special RAW hazards.
3190b57cec5SDimitry Andricdef FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards",
3200b57cec5SDimitry Andric                                             "true", "Has VMLx hazards">;
3210b57cec5SDimitry Andric
3220b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from
3230b57cec5SDimitry Andric// VFP to NEON, as an execution domain optimization.
32481ad6265SDimitry Andric// True if VMOVRS, VMOVSR and VMOVS will be converted from VFP to NEON.
3250b57cec5SDimitry Andricdef FeatureNEONForFPMovs  : SubtargetFeature<"neon-fpmovs",
3260b57cec5SDimitry Andric                                             "UseNEONForFPMovs", "true",
3270b57cec5SDimitry Andric                                             "Convert VMOVSR, VMOVRS, "
3280b57cec5SDimitry Andric                                             "VMOVS to NEON">;
3290b57cec5SDimitry Andric
3300b57cec5SDimitry Andric// Some processors benefit from using NEON instructions for scalar
3310b57cec5SDimitry Andric// single-precision FP operations. This affects instruction selection and should
3320b57cec5SDimitry Andric// only be enabled if the handling of denormals is not important.
33381ad6265SDimitry Andric// Use the method useNEONForSinglePrecisionFP() to determine if NEON should actually be used.
3340b57cec5SDimitry Andricdef FeatureNEONForFP      : SubtargetFeature<"neonfp",
33581ad6265SDimitry Andric                                             "HasNEONForFP",
3360b57cec5SDimitry Andric                                             "true",
3370b57cec5SDimitry Andric                                             "Use NEON for single precision FP">;
3380b57cec5SDimitry Andric
3390b57cec5SDimitry Andric// On some processors, VLDn instructions that access unaligned data take one
3400b57cec5SDimitry Andric// extra cycle. Take that into account when computing operand latencies.
34181ad6265SDimitry Andric// True if VLDn instructions take an extra cycle for unaligned accesses.
34281ad6265SDimitry Andricdef FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAccessAlignment",
3430b57cec5SDimitry Andric                                             "true",
3440b57cec5SDimitry Andric                                             "Check for VLDn unaligned access">;
3450b57cec5SDimitry Andric
3460b57cec5SDimitry Andric// Some processors have a nonpipelined VFP coprocessor.
34781ad6265SDimitry Andric// True if VFP instructions are not pipelined.
3480b57cec5SDimitry Andricdef FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp",
3490b57cec5SDimitry Andric                                              "NonpipelinedVFP", "true",
3500b57cec5SDimitry Andric                                              "VFP instructions are not pipelined">;
3510b57cec5SDimitry Andric
3520b57cec5SDimitry Andric// Some processors have FP multiply-accumulate instructions that don't
3530b57cec5SDimitry Andric// play nicely with other VFP / NEON instructions, and it's generally better
3540b57cec5SDimitry Andric// to just not use them.
35581ad6265SDimitry Andric// If the VFP2 / NEON instructions are available, indicates
35681ad6265SDimitry Andric// whether the FP VML[AS] instructions are slow (if so, don't use them).
3570b57cec5SDimitry Andricdef FeatureHasSlowFPVMLx  : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true",
3580b57cec5SDimitry Andric                                             "Disable VFP / NEON MAC instructions">;
3590b57cec5SDimitry Andric
36081ad6265SDimitry Andric// VFPv4 added VFMA instructions that can similarly be fast or slow.
36181ad6265SDimitry Andric// If the VFP4 / NEON instructions are available, indicates
36281ad6265SDimitry Andric// whether the FP VFM[AS] instructions are slow (if so, don't use them).
363480093f4SDimitry Andricdef FeatureHasSlowFPVFMx  : SubtargetFeature<"slowfpvfmx", "SlowFPVFMx", "true",
364480093f4SDimitry Andric                                             "Disable VFP / NEON FMA instructions">;
365480093f4SDimitry Andric
3660b57cec5SDimitry Andric// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding.
36781ad6265SDimitry Andric/// True if NEON has special multiplier accumulator
36881ad6265SDimitry Andric/// forwarding to allow mul + mla being issued back to back.
3690b57cec5SDimitry Andricdef FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding",
3700b57cec5SDimitry Andric                                             "HasVMLxForwarding", "true",
3710b57cec5SDimitry Andric                                             "Has multiplier accumulator forwarding">;
3720b57cec5SDimitry Andric
3730b57cec5SDimitry Andric// Disable 32-bit to 16-bit narrowing for experimentation.
37481ad6265SDimitry Andric// True if codegen would prefer 32-bit Thumb instructions over 16-bit ones.
37581ad6265SDimitry Andricdef FeaturePref32BitThumb : SubtargetFeature<"32bit", "Prefers32BitThumb", "true",
3760b57cec5SDimitry Andric                                             "Prefer 32-bit Thumb instrs">;
3770b57cec5SDimitry Andric
3788bcb0991SDimitry Andricdef FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopLogAlignment","2",
3790b57cec5SDimitry Andric                                              "Prefer 32-bit alignment for loops">;
3800b57cec5SDimitry Andric
381753f127fSDimitry Andricdef FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "4",
3828bcb0991SDimitry Andric                        "Model MVE instructions as a 1 beat per tick architecture">;
3838bcb0991SDimitry Andric
3848bcb0991SDimitry Andricdef FeatureMVEVectorCostFactor2 : SubtargetFeature<"mve2beat", "MVEVectorCostFactor", "2",
3858bcb0991SDimitry Andric                        "Model MVE instructions as a 2 beats per tick architecture">;
3868bcb0991SDimitry Andric
387753f127fSDimitry Andricdef FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "1",
3888bcb0991SDimitry Andric                        "Model MVE instructions as a 4 beats per tick architecture">;
3898bcb0991SDimitry Andric
3900b57cec5SDimitry Andric/// Some instructions update CPSR partially, which can add false dependency for
3910b57cec5SDimitry Andric/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is
3920b57cec5SDimitry Andric/// mapped to a separate physical register. Avoid partial CPSR update for these
3930b57cec5SDimitry Andric/// processors.
39481ad6265SDimitry Andric/// True if codegen would avoid using instructions
39581ad6265SDimitry Andric/// that partially update CPSR and add false dependency on the previous
39681ad6265SDimitry Andric/// CPSR setting instruction.
3970b57cec5SDimitry Andricdef FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr",
3980b57cec5SDimitry Andric                                               "AvoidCPSRPartialUpdate", "true",
3990b57cec5SDimitry Andric                                 "Avoid CPSR partial update for OOO execution">;
4000b57cec5SDimitry Andric
4010b57cec5SDimitry Andric/// Disable +1 predication cost for instructions updating CPSR.
4020b57cec5SDimitry Andric/// Enabled for Cortex-A57.
40381ad6265SDimitry Andric/// True if disable +1 predication cost for instructions updating CPSR. Enabled for Cortex-A57.
4040b57cec5SDimitry Andricdef FeatureCheapPredicableCPSR : SubtargetFeature<"cheap-predicable-cpsr",
4050b57cec5SDimitry Andric                                                  "CheapPredicableCPSRDef",
4060b57cec5SDimitry Andric                                                  "true",
4070b57cec5SDimitry Andric                  "Disable +1 predication cost for instructions updating CPSR">;
4080b57cec5SDimitry Andric
40981ad6265SDimitry Andric// True if codegen should avoid using flag setting movs with shifter operand (i.e. asr, lsl, lsr).
4100b57cec5SDimitry Andricdef FeatureAvoidMOVsShOp  : SubtargetFeature<"avoid-movs-shop",
4110b57cec5SDimitry Andric                                             "AvoidMOVsShifterOperand", "true",
4120b57cec5SDimitry Andric                                             "Avoid movs instructions with "
4130b57cec5SDimitry Andric                                             "shifter operand">;
4140b57cec5SDimitry Andric
4150b57cec5SDimitry Andric// Some processors perform return stack prediction. CodeGen should avoid issue
4160b57cec5SDimitry Andric// "normal" call instructions to callees which do not return.
4170b57cec5SDimitry Andricdef FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack",
4180b57cec5SDimitry Andric                                              "HasRetAddrStack", "true",
4190b57cec5SDimitry Andric                                              "Has return address stack">;
4200b57cec5SDimitry Andric
4210b57cec5SDimitry Andric// Some processors have no branch predictor, which changes the expected cost of
4220b57cec5SDimitry Andric// taking a branch which affects the choice of whether to use predicated
4230b57cec5SDimitry Andric// instructions.
42481ad6265SDimitry Andric// True if the subtarget has a branch predictor. Having
42581ad6265SDimitry Andric// a branch predictor or not changes the expected cost of taking a branch
42681ad6265SDimitry Andric// which affects the choice of whether to use predicated instructions.
4270b57cec5SDimitry Andricdef FeatureHasNoBranchPredictor : SubtargetFeature<"no-branch-predictor",
4280b57cec5SDimitry Andric                                                   "HasBranchPredictor", "false",
4290b57cec5SDimitry Andric                                                   "Has no branch predictor">;
4300b57cec5SDimitry Andric
4310b57cec5SDimitry Andric/// DSP extension.
43281ad6265SDimitry Andric/// True if the subtarget supports the DSP (saturating arith and such) instructions.
4330b57cec5SDimitry Andricdef FeatureDSP            : SubtargetFeature<"dsp", "HasDSP", "true",
4340b57cec5SDimitry Andric                                             "Supports DSP instructions in "
4350b57cec5SDimitry Andric                                             "ARM and/or Thumb2">;
4360b57cec5SDimitry Andric
43781ad6265SDimitry Andric// True if the subtarget supports Multiprocessing extension (ARMv7 only).
4380b57cec5SDimitry Andricdef FeatureMP             : SubtargetFeature<"mp", "HasMPExtension", "true",
4390b57cec5SDimitry Andric                                        "Supports Multiprocessing extension">;
4400b57cec5SDimitry Andric
4410b57cec5SDimitry Andric// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8).
4420b57cec5SDimitry Andricdef FeatureVirtualization : SubtargetFeature<"virtualization",
4430b57cec5SDimitry Andric                                             "HasVirtualization", "true",
4440b57cec5SDimitry Andric                                             "Supports Virtualization extension",
4450b57cec5SDimitry Andric                                             [FeatureHWDivThumb, FeatureHWDivARM]>;
4460b57cec5SDimitry Andric
4470b57cec5SDimitry Andric// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too.
4480b57cec5SDimitry Andric// See ARMInstrInfo.td for details.
44981ad6265SDimitry Andric// True if NaCl TRAP instruction is generated instead of the regular TRAP.
4500b57cec5SDimitry Andricdef FeatureNaClTrap       : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true",
4510b57cec5SDimitry Andric                                             "NaCl trap">;
4520b57cec5SDimitry Andric
45381ad6265SDimitry Andric// True if the subtarget disallows unaligned memory
45481ad6265SDimitry Andric// accesses for some types.  For details, see
45581ad6265SDimitry Andric// ARMTargetLowering::allowsMisalignedMemoryAccesses().
4560b57cec5SDimitry Andricdef FeatureStrictAlign    : SubtargetFeature<"strict-align",
4570b57cec5SDimitry Andric                                             "StrictAlign", "true",
4580b57cec5SDimitry Andric                                             "Disallow all unaligned memory "
4590b57cec5SDimitry Andric                                             "access">;
4600b57cec5SDimitry Andric
46181ad6265SDimitry Andric// Generate calls via indirect call instructions.
4620b57cec5SDimitry Andricdef FeatureLongCalls      : SubtargetFeature<"long-calls", "GenLongCalls", "true",
4630b57cec5SDimitry Andric                                             "Generate calls via indirect call "
4640b57cec5SDimitry Andric                                             "instructions">;
4650b57cec5SDimitry Andric
46681ad6265SDimitry Andric// Generate code that does not contain data access to code sections.
4670b57cec5SDimitry Andricdef FeatureExecuteOnly    : SubtargetFeature<"execute-only",
4680b57cec5SDimitry Andric                                             "GenExecuteOnly", "true",
4690b57cec5SDimitry Andric                                             "Enable the generation of "
4700b57cec5SDimitry Andric                                             "execute only code.">;
4710b57cec5SDimitry Andric
47281ad6265SDimitry Andric// True if R9 is not available as a general purpose register.
4730b57cec5SDimitry Andricdef FeatureReserveR9      : SubtargetFeature<"reserve-r9", "ReserveR9", "true",
4740b57cec5SDimitry Andric                                             "Reserve R9, making it unavailable"
4750b57cec5SDimitry Andric                                             " as GPR">;
4760b57cec5SDimitry Andric
47781ad6265SDimitry Andric// True if MOVT / MOVW pairs are not used for materialization of
47881ad6265SDimitry Andric// 32-bit imms (including global addresses).
4790b57cec5SDimitry Andricdef FeatureNoMovt         : SubtargetFeature<"no-movt", "NoMovt", "true",
4800b57cec5SDimitry Andric                                             "Don't use movt/movw pairs for "
4810b57cec5SDimitry Andric                                             "32-bit imms">;
4820b57cec5SDimitry Andric
48381ad6265SDimitry Andric/// Implicitly convert an instruction to a different one if its immediates
48481ad6265SDimitry Andric/// cannot be encoded. For example, ADD r0, r1, #FFFFFFFF -> SUB r0, r1, #1.
4850b57cec5SDimitry Andricdef FeatureNoNegativeImmediates
4860b57cec5SDimitry Andric                          : SubtargetFeature<"no-neg-immediates",
4870b57cec5SDimitry Andric                                             "NegativeImmediates", "false",
4880b57cec5SDimitry Andric                                             "Convert immediates and instructions "
4890b57cec5SDimitry Andric                                             "to their negated or complemented "
4900b57cec5SDimitry Andric                                             "equivalent when the immediate does "
4910b57cec5SDimitry Andric                                             "not fit in the encoding.">;
4920b57cec5SDimitry Andric
4930b57cec5SDimitry Andric// Use the MachineScheduler for instruction scheduling for the subtarget.
4940b57cec5SDimitry Andricdef FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true",
4950b57cec5SDimitry Andric                                        "Use the MachineScheduler">;
4960b57cec5SDimitry Andric
49781ad6265SDimitry Andric// Use the MachinePipeliner for instruction scheduling for the subtarget.
49881ad6265SDimitry Andricdef FeatureUseMIPipeliner: SubtargetFeature<"use-mipipeliner", "UseMIPipeliner", "true",
49981ad6265SDimitry Andric                                            "Use the MachinePipeliner">;
50081ad6265SDimitry Andric
50181ad6265SDimitry Andric// False if scheduling should happen again after register allocation.
5020b57cec5SDimitry Andricdef FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler",
5030b57cec5SDimitry Andric    "DisablePostRAScheduler", "true",
5040b57cec5SDimitry Andric    "Don't schedule again after register allocation">;
5050b57cec5SDimitry Andric
5060b57cec5SDimitry Andric// Armv8.5-A extensions
5070b57cec5SDimitry Andric
50881ad6265SDimitry Andric// Has speculation barrier.
5090b57cec5SDimitry Andricdef FeatureSB       : SubtargetFeature<"sb", "HasSB", "true",
5100b57cec5SDimitry Andric  "Enable v8.5a Speculation Barrier" >;
5110b57cec5SDimitry Andric
5125ffd83dbSDimitry Andric// Armv8.6-A extensions
51381ad6265SDimitry Andric
51481ad6265SDimitry Andric// True if subtarget supports BFloat16 floating point operations.
5155ffd83dbSDimitry Andricdef FeatureBF16     : SubtargetFeature<"bf16", "HasBF16", "true",
5165ffd83dbSDimitry Andric  "Enable support for BFloat16 instructions",  [FeatureNEON]>;
5175ffd83dbSDimitry Andric
51881ad6265SDimitry Andric// True if subtarget supports 8-bit integer matrix multiply.
5195ffd83dbSDimitry Andricdef FeatureMatMulInt8 : SubtargetFeature<"i8mm", "HasMatMulInt8",
5205ffd83dbSDimitry Andric    "true", "Enable Matrix Multiply Int8 Extension", [FeatureNEON]>;
5215ffd83dbSDimitry Andric
5220b57cec5SDimitry Andric// Armv8.1-M extensions
5230b57cec5SDimitry Andric
52481ad6265SDimitry Andric// True if the processor supports the Low Overhead Branch extension.
5250b57cec5SDimitry Andricdef FeatureLOB            : SubtargetFeature<"lob", "HasLOB", "true",
5260b57cec5SDimitry Andric                                             "Enable Low Overhead Branch "
5270b57cec5SDimitry Andric                                             "extensions">;
5280b57cec5SDimitry Andric
52981ad6265SDimitry Andric// Mitigate against the cve-2021-35465 security vulnurability.
530349cc55cSDimitry Andricdef FeatureFixCMSE_CVE_2021_35465 : SubtargetFeature<"fix-cmse-cve-2021-35465",
531349cc55cSDimitry Andric                                        "FixCMSE_CVE_2021_35465", "true",
532349cc55cSDimitry Andric                                        "Mitigate against the cve-2021-35465 "
533349cc55cSDimitry Andric                                        "security vulnurability">;
534349cc55cSDimitry Andric
5354824e7fdSDimitry Andricdef FeaturePACBTI         : SubtargetFeature<"pacbti", "HasPACBTI", "true",
5364824e7fdSDimitry Andric                                             "Enable Pointer Authentication and Branch "
5374824e7fdSDimitry Andric                                             "Target Identification">;
5384824e7fdSDimitry Andric
53981ad6265SDimitry Andric/// Don't place a BTI instruction after return-twice constructs (setjmp).
5400eae32dcSDimitry Andricdef FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice",
5410eae32dcSDimitry Andric                                                 "NoBTIAtReturnTwice", "true",
5420eae32dcSDimitry Andric                                                 "Don't place a BTI instruction "
5430eae32dcSDimitry Andric                                                 "after a return-twice">;
5440eae32dcSDimitry Andric
545*bdd1243dSDimitry Andric// Armv8.9-A/Armv9.4-A 2022 Architecture Extensions
546*bdd1243dSDimitry Andricdef FeatureCLRBHB : SubtargetFeature<"clrbhb", "HasCLRBHB", "true",
547*bdd1243dSDimitry Andric                                     "Enable Clear BHB instruction">;
548*bdd1243dSDimitry Andric
549*bdd1243dSDimitry Andric
55081ad6265SDimitry Andricdef FeatureFixCortexA57AES1742098 : SubtargetFeature<"fix-cortex-a57-aes-1742098",
55181ad6265SDimitry Andric  "FixCortexA57AES1742098", "true",
55281ad6265SDimitry Andric  "Work around Cortex-A57 Erratum 1742098 / Cortex-A72 Erratum 1655431 (AES)">;
55381ad6265SDimitry Andric
55481ad6265SDimitry Andricdef FeatureAAPCSFrameChain : SubtargetFeature<"aapcs-frame-chain",
55581ad6265SDimitry Andric                                              "CreateAAPCSFrameChain", "true",
55681ad6265SDimitry Andric                                              "Create an AAPCS compliant frame chain">;
55781ad6265SDimitry Andric
55881ad6265SDimitry Andricdef FeatureAAPCSFrameChainLeaf : SubtargetFeature<"aapcs-frame-chain-leaf",
55981ad6265SDimitry Andric                                                  "CreateAAPCSFrameChainLeaf", "true",
56081ad6265SDimitry Andric                                                  "Create an AAPCS compliant frame chain "
56181ad6265SDimitry Andric                                                  "for leaf functions",
56281ad6265SDimitry Andric                                                  [FeatureAAPCSFrameChain]>;
56381ad6265SDimitry Andric
56461cfbce3SDimitry Andric// Assume that lock-free 32-bit atomics are available, even if the target
56561cfbce3SDimitry Andric// and operating system combination would not usually provide them. The user
56661cfbce3SDimitry Andric// is responsible for providing any necessary __sync implementations. Code
56761cfbce3SDimitry Andric// built with this feature is not ABI-compatible with code built without this
56861cfbce3SDimitry Andric// feature, if atomic variables are exposed across the ABI boundary.
56961cfbce3SDimitry Andricdef FeatureAtomics32 : SubtargetFeature<
57061cfbce3SDimitry Andric    "atomics-32", "HasForced32BitAtomics", "true",
57161cfbce3SDimitry Andric    "Assume that lock-free 32-bit atomics are available">;
57261cfbce3SDimitry Andric
5730b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5740b57cec5SDimitry Andric// ARM architecture class
5750b57cec5SDimitry Andric//
5760b57cec5SDimitry Andric
5770b57cec5SDimitry Andric// A-series ISA
5780b57cec5SDimitry Andricdef FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass",
5790b57cec5SDimitry Andric                                     "Is application profile ('A' series)">;
5800b57cec5SDimitry Andric
5810b57cec5SDimitry Andric// R-series ISA
5820b57cec5SDimitry Andricdef FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass",
5830b57cec5SDimitry Andric                                     "Is realtime profile ('R' series)">;
5840b57cec5SDimitry Andric
5850b57cec5SDimitry Andric// M-series ISA
5860b57cec5SDimitry Andricdef FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass",
5870b57cec5SDimitry Andric                                     "Is microcontroller profile ('M' series)">;
5880b57cec5SDimitry Andric
58981ad6265SDimitry Andric// True if Thumb2 instructions are supported.
5900b57cec5SDimitry Andricdef FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true",
5910b57cec5SDimitry Andric                                     "Enable Thumb2 instructions">;
5920b57cec5SDimitry Andric
59381ad6265SDimitry Andric// True if subtarget does not support ARM mode execution.
5940b57cec5SDimitry Andricdef FeatureNoARM  : SubtargetFeature<"noarm", "NoARM", "true",
5950b57cec5SDimitry Andric                                     "Does not support ARM mode execution">;
5960b57cec5SDimitry Andric
5970b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5980b57cec5SDimitry Andric// ARM ISAa.
5990b57cec5SDimitry Andric//
60081ad6265SDimitry Andric// Specify whether target support specific ARM ISA variants.
6010b57cec5SDimitry Andric
6020b57cec5SDimitry Andricdef HasV4TOps   : SubtargetFeature<"v4t", "HasV4TOps", "true",
6030b57cec5SDimitry Andric                                   "Support ARM v4T instructions">;
6040b57cec5SDimitry Andric
6050b57cec5SDimitry Andricdef HasV5TOps   : SubtargetFeature<"v5t", "HasV5TOps", "true",
6060b57cec5SDimitry Andric                                   "Support ARM v5T instructions",
6070b57cec5SDimitry Andric                                   [HasV4TOps]>;
6080b57cec5SDimitry Andric
6090b57cec5SDimitry Andricdef HasV5TEOps  : SubtargetFeature<"v5te", "HasV5TEOps", "true",
6100b57cec5SDimitry Andric                                   "Support ARM v5TE, v5TEj, and "
6110b57cec5SDimitry Andric                                   "v5TExp instructions",
6120b57cec5SDimitry Andric                                   [HasV5TOps]>;
6130b57cec5SDimitry Andric
6140b57cec5SDimitry Andricdef HasV6Ops    : SubtargetFeature<"v6", "HasV6Ops", "true",
6150b57cec5SDimitry Andric                                   "Support ARM v6 instructions",
6160b57cec5SDimitry Andric                                   [HasV5TEOps]>;
6170b57cec5SDimitry Andric
6180b57cec5SDimitry Andricdef HasV6MOps   : SubtargetFeature<"v6m", "HasV6MOps", "true",
6190b57cec5SDimitry Andric                                   "Support ARM v6M instructions",
6200b57cec5SDimitry Andric                                   [HasV6Ops]>;
6210b57cec5SDimitry Andric
6220b57cec5SDimitry Andricdef HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true",
6230b57cec5SDimitry Andric                                         "Support ARM v8M Baseline instructions",
6240b57cec5SDimitry Andric                                         [HasV6MOps]>;
6250b57cec5SDimitry Andric
6260b57cec5SDimitry Andricdef HasV6KOps   : SubtargetFeature<"v6k", "HasV6KOps", "true",
6270b57cec5SDimitry Andric                                   "Support ARM v6k instructions",
6280b57cec5SDimitry Andric                                   [HasV6Ops]>;
6290b57cec5SDimitry Andric
6300b57cec5SDimitry Andricdef HasV6T2Ops  : SubtargetFeature<"v6t2", "HasV6T2Ops", "true",
6310b57cec5SDimitry Andric                                   "Support ARM v6t2 instructions",
6320b57cec5SDimitry Andric                                   [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>;
6330b57cec5SDimitry Andric
6340b57cec5SDimitry Andricdef HasV7Ops    : SubtargetFeature<"v7", "HasV7Ops", "true",
6350b57cec5SDimitry Andric                                   "Support ARM v7 instructions",
63604eeddc0SDimitry Andric                                   [HasV6T2Ops, FeatureV7Clrex]>;
6370b57cec5SDimitry Andric
6380b57cec5SDimitry Andricdef HasV8MMainlineOps :
6390b57cec5SDimitry Andric                  SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true",
6400b57cec5SDimitry Andric                                   "Support ARM v8M Mainline instructions",
6410b57cec5SDimitry Andric                                   [HasV7Ops]>;
6420b57cec5SDimitry Andric
6430b57cec5SDimitry Andricdef HasV8Ops    : SubtargetFeature<"v8", "HasV8Ops", "true",
6440b57cec5SDimitry Andric                                   "Support ARM v8 instructions",
64504eeddc0SDimitry Andric                                   [HasV7Ops, FeaturePerfMon, FeatureAcquireRelease]>;
6460b57cec5SDimitry Andric
6470b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
6480b57cec5SDimitry Andric                                   "Support ARM v8.1a instructions",
6490b57cec5SDimitry Andric                                   [HasV8Ops]>;
6500b57cec5SDimitry Andric
6510b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
6520b57cec5SDimitry Andric                                   "Support ARM v8.2a instructions",
6530b57cec5SDimitry Andric                                   [HasV8_1aOps]>;
6540b57cec5SDimitry Andric
6550b57cec5SDimitry Andricdef HasV8_3aOps   : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true",
6560b57cec5SDimitry Andric                                   "Support ARM v8.3a instructions",
6570b57cec5SDimitry Andric                                   [HasV8_2aOps]>;
6580b57cec5SDimitry Andric
6590b57cec5SDimitry Andricdef HasV8_4aOps   : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true",
6600b57cec5SDimitry Andric                                   "Support ARM v8.4a instructions",
6610b57cec5SDimitry Andric                                   [HasV8_3aOps, FeatureDotProd]>;
6620b57cec5SDimitry Andric
6630b57cec5SDimitry Andricdef HasV8_5aOps   : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true",
6640b57cec5SDimitry Andric                                   "Support ARM v8.5a instructions",
6650b57cec5SDimitry Andric                                   [HasV8_4aOps, FeatureSB]>;
6660b57cec5SDimitry Andric
6675ffd83dbSDimitry Andricdef HasV8_6aOps   : SubtargetFeature<"v8.6a", "HasV8_6aOps", "true",
6685ffd83dbSDimitry Andric                                   "Support ARM v8.6a instructions",
6695ffd83dbSDimitry Andric                                   [HasV8_5aOps, FeatureBF16,
6705ffd83dbSDimitry Andric                                    FeatureMatMulInt8]>;
6715ffd83dbSDimitry Andric
672e8d8bef9SDimitry Andricdef HasV8_7aOps   : SubtargetFeature<"v8.7a", "HasV8_7aOps", "true",
673e8d8bef9SDimitry Andric                                   "Support ARM v8.7a instructions",
674e8d8bef9SDimitry Andric                                   [HasV8_6aOps]>;
675e8d8bef9SDimitry Andric
67604eeddc0SDimitry Andricdef HasV8_8aOps   : SubtargetFeature<"v8.8a", "HasV8_8aOps", "true",
67704eeddc0SDimitry Andric                                   "Support ARM v8.8a instructions",
67804eeddc0SDimitry Andric                                   [HasV8_7aOps]>;
67904eeddc0SDimitry Andric
680*bdd1243dSDimitry Andricdef HasV8_9aOps   : SubtargetFeature<"v8.9a", "HasV8_9aOps", "true",
681*bdd1243dSDimitry Andric                                   "Support ARM v8.9a instructions",
682*bdd1243dSDimitry Andric                                   [HasV8_8aOps, FeatureCLRBHB]>;
683*bdd1243dSDimitry Andric
684349cc55cSDimitry Andricdef HasV9_0aOps   : SubtargetFeature<"v9a", "HasV9_0aOps", "true",
685349cc55cSDimitry Andric                                   "Support ARM v9a instructions",
686349cc55cSDimitry Andric                                   [HasV8_5aOps]>;
687349cc55cSDimitry Andric
688349cc55cSDimitry Andricdef HasV9_1aOps   : SubtargetFeature<"v9.1a", "HasV9_1aOps", "true",
689349cc55cSDimitry Andric                                   "Support ARM v9.1a instructions",
690349cc55cSDimitry Andric                                   [HasV8_6aOps, HasV9_0aOps]>;
691349cc55cSDimitry Andric
692349cc55cSDimitry Andricdef HasV9_2aOps   : SubtargetFeature<"v9.2a", "HasV9_2aOps", "true",
693349cc55cSDimitry Andric                                   "Support ARM v9.2a instructions",
694349cc55cSDimitry Andric                                   [HasV8_7aOps, HasV9_1aOps]>;
695349cc55cSDimitry Andric
69604eeddc0SDimitry Andricdef HasV9_3aOps   : SubtargetFeature<"v9.3a", "HasV9_3aOps", "true",
69704eeddc0SDimitry Andric                                   "Support ARM v9.3a instructions",
69804eeddc0SDimitry Andric                                   [HasV8_8aOps, HasV9_2aOps]>;
69904eeddc0SDimitry Andric
700*bdd1243dSDimitry Andricdef HasV9_4aOps   : SubtargetFeature<"v9.4a", "HasV9_4aOps", "true",
701*bdd1243dSDimitry Andric                                   "Support ARM v9.4a instructions",
702*bdd1243dSDimitry Andric                                   [HasV8_9aOps, HasV9_3aOps]>;
703*bdd1243dSDimitry Andric
7040b57cec5SDimitry Andricdef HasV8_1MMainlineOps : SubtargetFeature<
7050b57cec5SDimitry Andric               "v8.1m.main", "HasV8_1MMainlineOps", "true",
7060b57cec5SDimitry Andric               "Support ARM v8-1M Mainline instructions",
7070b57cec5SDimitry Andric               [HasV8MMainlineOps]>;
7080b57cec5SDimitry Andricdef HasMVEIntegerOps : SubtargetFeature<
7090b57cec5SDimitry Andric               "mve", "HasMVEIntegerOps", "true",
7100b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer ops",
7110b57cec5SDimitry Andric               [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>;
7120b57cec5SDimitry Andricdef HasMVEFloatOps : SubtargetFeature<
7130b57cec5SDimitry Andric               "mve.fp", "HasMVEFloatOps", "true",
7140b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer and floating ops",
7150b57cec5SDimitry Andric               [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>;
7160b57cec5SDimitry Andric
7175ffd83dbSDimitry Andricdef HasCDEOps : SubtargetFeature<"cde", "HasCDEOps", "true",
7185ffd83dbSDimitry Andric                                 "Support CDE instructions",
7195ffd83dbSDimitry Andric                                 [HasV8MMainlineOps]>;
7205ffd83dbSDimitry Andric
7215ffd83dbSDimitry Andricforeach i = {0-7} in
7225ffd83dbSDimitry Andric    def FeatureCoprocCDE#i : SubtargetFeature<"cdecp"#i,
7235ffd83dbSDimitry Andric                                              "CoprocCDE["#i#"]", "true",
7245ffd83dbSDimitry Andric                                              "Coprocessor "#i#" ISA is CDEv1",
7255ffd83dbSDimitry Andric                                              [HasCDEOps]>;
7265ffd83dbSDimitry Andric
7270b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
728e8d8bef9SDimitry Andric// Control codegen mitigation against Straight Line Speculation vulnerability.
729e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
730e8d8bef9SDimitry Andric
73181ad6265SDimitry Andric/// Harden against Straight Line Speculation for Returns and Indirect Branches.
732e8d8bef9SDimitry Andricdef FeatureHardenSlsRetBr : SubtargetFeature<"harden-sls-retbr",
733e8d8bef9SDimitry Andric  "HardenSlsRetBr", "true",
734e8d8bef9SDimitry Andric  "Harden against straight line speculation across RETurn and BranchRegister "
735e8d8bef9SDimitry Andric  "instructions">;
73681ad6265SDimitry Andric/// Harden against Straight Line Speculation for indirect calls.
737e8d8bef9SDimitry Andricdef FeatureHardenSlsBlr : SubtargetFeature<"harden-sls-blr",
738e8d8bef9SDimitry Andric  "HardenSlsBlr", "true",
739e8d8bef9SDimitry Andric  "Harden against straight line speculation across indirect calls">;
74081ad6265SDimitry Andric/// Generate thunk code for SLS mitigation in the normal text section.
741fe6060f1SDimitry Andricdef FeatureHardenSlsNoComdat : SubtargetFeature<"harden-sls-nocomdat",
742fe6060f1SDimitry Andric  "HardenSlsNoComdat", "true",
743fe6060f1SDimitry Andric  "Generate thunk code for SLS mitigation in the normal text section">;
744e8d8bef9SDimitry Andric
745e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
746*bdd1243dSDimitry Andric// Endianness of instruction encodings in memory.
747*bdd1243dSDimitry Andric//
748*bdd1243dSDimitry Andric// In the current Arm architecture, this is usually little-endian regardless of
749*bdd1243dSDimitry Andric// data endianness. But before Armv7 it was typical for instruction endianness
750*bdd1243dSDimitry Andric// to match data endianness, so that a big-endian system was consistently big-
751*bdd1243dSDimitry Andric// endian. And Armv7-R can be configured to use big-endian instructions.
752*bdd1243dSDimitry Andric//
753*bdd1243dSDimitry Andric// Additionally, even when targeting Armv7-A, big-endian instructions can be
754*bdd1243dSDimitry Andric// found in relocatable object files, because the Arm ABI specifies that the
755*bdd1243dSDimitry Andric// linker byte-reverses them depending on the target architecture.
756*bdd1243dSDimitry Andric//
757*bdd1243dSDimitry Andric// So we have a feature here to indicate that instructions are stored big-
758*bdd1243dSDimitry Andric// endian, which you can set when instantiating an MCDisassembler.
759*bdd1243dSDimitry Andricdef ModeBigEndianInstructions : SubtargetFeature<"big-endian-instructions",
760*bdd1243dSDimitry Andric    "BigEndianInstructions", "true",
761*bdd1243dSDimitry Andric     "Expect instructions to be stored big-endian.">;
762*bdd1243dSDimitry Andric
763*bdd1243dSDimitry Andric//===----------------------------------------------------------------------===//
7640b57cec5SDimitry Andric// ARM Processor subtarget features.
7650b57cec5SDimitry Andric//
7660b57cec5SDimitry Andric
7670b57cec5SDimitry Andricdef ProcA5      : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5",
7680b57cec5SDimitry Andric                                   "Cortex-A5 ARM processors", []>;
7690b57cec5SDimitry Andricdef ProcA7      : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7",
7700b57cec5SDimitry Andric                                   "Cortex-A7 ARM processors", []>;
7710b57cec5SDimitry Andricdef ProcA8      : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8",
7720b57cec5SDimitry Andric                                   "Cortex-A8 ARM processors", []>;
7730b57cec5SDimitry Andricdef ProcA9      : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9",
7740b57cec5SDimitry Andric                                   "Cortex-A9 ARM processors", []>;
7750b57cec5SDimitry Andricdef ProcA12     : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12",
7760b57cec5SDimitry Andric                                   "Cortex-A12 ARM processors", []>;
7770b57cec5SDimitry Andricdef ProcA15     : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
7780b57cec5SDimitry Andric                                   "Cortex-A15 ARM processors", []>;
7790b57cec5SDimitry Andricdef ProcA17     : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17",
7800b57cec5SDimitry Andric                                   "Cortex-A17 ARM processors", []>;
7810b57cec5SDimitry Andricdef ProcA32     : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32",
7820b57cec5SDimitry Andric                                   "Cortex-A32 ARM processors", []>;
7830b57cec5SDimitry Andricdef ProcA35     : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
7840b57cec5SDimitry Andric                                   "Cortex-A35 ARM processors", []>;
7850b57cec5SDimitry Andricdef ProcA53     : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
7860b57cec5SDimitry Andric                                   "Cortex-A53 ARM processors", []>;
7870b57cec5SDimitry Andricdef ProcA55     : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
7880b57cec5SDimitry Andric                                   "Cortex-A55 ARM processors", []>;
7890b57cec5SDimitry Andricdef ProcA57     : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
7900b57cec5SDimitry Andric                                   "Cortex-A57 ARM processors", []>;
7910b57cec5SDimitry Andricdef ProcA72     : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
7920b57cec5SDimitry Andric                                   "Cortex-A72 ARM processors", []>;
7930b57cec5SDimitry Andricdef ProcA73     : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
7940b57cec5SDimitry Andric                                   "Cortex-A73 ARM processors", []>;
7950b57cec5SDimitry Andricdef ProcA75     : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
7960b57cec5SDimitry Andric                                   "Cortex-A75 ARM processors", []>;
7970b57cec5SDimitry Andricdef ProcA76     : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
7980b57cec5SDimitry Andric                                   "Cortex-A76 ARM processors", []>;
7995ffd83dbSDimitry Andricdef ProcA77     : SubtargetFeature<"a77", "ARMProcFamily", "CortexA77",
8005ffd83dbSDimitry Andric                                   "Cortex-A77 ARM processors", []>;
8015ffd83dbSDimitry Andricdef ProcA78     : SubtargetFeature<"cortex-a78", "ARMProcFamily", "CortexA78",
8025ffd83dbSDimitry Andric                                   "Cortex-A78 ARM processors", []>;
803e8d8bef9SDimitry Andricdef ProcA78C    : SubtargetFeature<"a78c", "ARMProcFamily", "CortexA78C",
804e8d8bef9SDimitry Andric                                   "Cortex-A78C ARM processors", []>;
805349cc55cSDimitry Andricdef ProcA710    : SubtargetFeature<"cortex-a710", "ARMProcFamily",
806349cc55cSDimitry Andric                                   "CortexA710", "Cortex-A710 ARM processors", []>;
8075ffd83dbSDimitry Andricdef ProcX1      : SubtargetFeature<"cortex-x1", "ARMProcFamily", "CortexX1",
8085ffd83dbSDimitry Andric                                   "Cortex-X1 ARM processors", []>;
8091fd87a68SDimitry Andricdef ProcX1C     : SubtargetFeature<"cortex-x1c", "ARMProcFamily", "CortexX1C",
8101fd87a68SDimitry Andric                                   "Cortex-X1C ARM processors", []>;
8110b57cec5SDimitry Andric
812e8d8bef9SDimitry Andricdef ProcV1      : SubtargetFeature<"neoverse-v1", "ARMProcFamily",
813e8d8bef9SDimitry Andric                                   "NeoverseV1", "Neoverse-V1 ARM processors", []>;
814e8d8bef9SDimitry Andric
8150b57cec5SDimitry Andricdef ProcKrait   : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
8160b57cec5SDimitry Andric                                   "Qualcomm Krait processors", []>;
8170b57cec5SDimitry Andricdef ProcKryo    : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
8180b57cec5SDimitry Andric                                   "Qualcomm Kryo processors", []>;
8190b57cec5SDimitry Andricdef ProcSwift   : SubtargetFeature<"swift", "ARMProcFamily", "Swift",
8200b57cec5SDimitry Andric                                   "Swift ARM processors", []>;
8210b57cec5SDimitry Andric
8220b57cec5SDimitry Andricdef ProcExynos  : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos",
8230b57cec5SDimitry Andric                                   "Samsung Exynos processors",
8240b57cec5SDimitry Andric                                   [FeatureZCZeroing,
8250b57cec5SDimitry Andric                                    FeatureUseWideStrideVFP,
8260b57cec5SDimitry Andric                                    FeatureSplatVFPToNeon,
8270b57cec5SDimitry Andric                                    FeatureSlowVGETLNi32,
8280b57cec5SDimitry Andric                                    FeatureSlowVDUP32,
8290b57cec5SDimitry Andric                                    FeatureSlowFPBrcc,
8300b57cec5SDimitry Andric                                    FeatureProfUnpredicate,
8310b57cec5SDimitry Andric                                    FeatureHWDivThumb,
8320b57cec5SDimitry Andric                                    FeatureHWDivARM,
8330b57cec5SDimitry Andric                                    FeatureHasSlowFPVMLx,
834480093f4SDimitry Andric                                    FeatureHasSlowFPVFMx,
8350b57cec5SDimitry Andric                                    FeatureHasRetAddrStack,
8360b57cec5SDimitry Andric                                    FeatureFuseLiterals,
8370b57cec5SDimitry Andric                                    FeatureFuseAES,
8380b57cec5SDimitry Andric                                    FeatureExpandMLx,
8390b57cec5SDimitry Andric                                    FeatureCrypto,
8400b57cec5SDimitry Andric                                    FeatureCRC]>;
8410b57cec5SDimitry Andric
8420b57cec5SDimitry Andricdef ProcR4      : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4",
8430b57cec5SDimitry Andric                                   "Cortex-R4 ARM processors", []>;
8440b57cec5SDimitry Andricdef ProcR5      : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
8450b57cec5SDimitry Andric                                   "Cortex-R5 ARM processors", []>;
8460b57cec5SDimitry Andricdef ProcR7      : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7",
8470b57cec5SDimitry Andric                                   "Cortex-R7 ARM processors", []>;
8480b57cec5SDimitry Andricdef ProcR52     : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52",
8490b57cec5SDimitry Andric                                   "Cortex-R52 ARM processors", []>;
8500b57cec5SDimitry Andric
8510b57cec5SDimitry Andricdef ProcM3      : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3",
8520b57cec5SDimitry Andric                                   "Cortex-M3 ARM processors", []>;
853e8d8bef9SDimitry Andricdef ProcM7      : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7",
854e8d8bef9SDimitry Andric                                   "Cortex-M7 ARM processors", []>;
8550b57cec5SDimitry Andric
8560b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8570b57cec5SDimitry Andric// ARM Helper classes.
8580b57cec5SDimitry Andric//
8590b57cec5SDimitry Andric
8600b57cec5SDimitry Andricclass Architecture<string fname, string aname, list<SubtargetFeature> features>
8610b57cec5SDimitry Andric  : SubtargetFeature<fname, "ARMArch", aname,
8620b57cec5SDimitry Andric                     !strconcat(aname, " architecture"), features>;
8630b57cec5SDimitry Andric
8640b57cec5SDimitry Andricclass ProcNoItin<string Name, list<SubtargetFeature> Features>
8650b57cec5SDimitry Andric  : Processor<Name, NoItineraries, Features>;
8660b57cec5SDimitry Andric
8670b57cec5SDimitry Andric
8680b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8690b57cec5SDimitry Andric// ARM architectures
8700b57cec5SDimitry Andric//
8710b57cec5SDimitry Andric
8720b57cec5SDimitry Andricdef ARMv4     : Architecture<"armv4",     "ARMv4",    []>;
8730b57cec5SDimitry Andric
8740b57cec5SDimitry Andricdef ARMv4t    : Architecture<"armv4t",    "ARMv4t",   [HasV4TOps]>;
8750b57cec5SDimitry Andric
8760b57cec5SDimitry Andricdef ARMv5t    : Architecture<"armv5t",    "ARMv5t",   [HasV5TOps]>;
8770b57cec5SDimitry Andric
8780b57cec5SDimitry Andricdef ARMv5te   : Architecture<"armv5te",   "ARMv5te",  [HasV5TEOps]>;
8790b57cec5SDimitry Andric
8800b57cec5SDimitry Andricdef ARMv5tej  : Architecture<"armv5tej",  "ARMv5tej", [HasV5TEOps]>;
8810b57cec5SDimitry Andric
8820b57cec5SDimitry Andricdef ARMv6     : Architecture<"armv6",     "ARMv6",    [HasV6Ops,
8830b57cec5SDimitry Andric                                                       FeatureDSP]>;
8840b57cec5SDimitry Andric
8850b57cec5SDimitry Andricdef ARMv6t2   : Architecture<"armv6t2",   "ARMv6t2",  [HasV6T2Ops,
8860b57cec5SDimitry Andric                                                       FeatureDSP]>;
8870b57cec5SDimitry Andric
8880b57cec5SDimitry Andricdef ARMv6k    : Architecture<"armv6k",    "ARMv6k",   [HasV6KOps]>;
8890b57cec5SDimitry Andric
8900b57cec5SDimitry Andricdef ARMv6kz   : Architecture<"armv6kz",   "ARMv6kz",  [HasV6KOps,
8910b57cec5SDimitry Andric                                                       FeatureTrustZone]>;
8920b57cec5SDimitry Andric
8930b57cec5SDimitry Andricdef ARMv6m    : Architecture<"armv6-m",   "ARMv6m",   [HasV6MOps,
8940b57cec5SDimitry Andric                                                       FeatureNoARM,
8950b57cec5SDimitry Andric                                                       ModeThumb,
8960b57cec5SDimitry Andric                                                       FeatureDB,
8970b57cec5SDimitry Andric                                                       FeatureMClass,
8980b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
8990b57cec5SDimitry Andric
9000b57cec5SDimitry Andricdef ARMv6sm   : Architecture<"armv6s-m",  "ARMv6sm",  [HasV6MOps,
9010b57cec5SDimitry Andric                                                       FeatureNoARM,
9020b57cec5SDimitry Andric                                                       ModeThumb,
9030b57cec5SDimitry Andric                                                       FeatureDB,
9040b57cec5SDimitry Andric                                                       FeatureMClass,
9050b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
9060b57cec5SDimitry Andric
9070b57cec5SDimitry Andricdef ARMv7a    : Architecture<"armv7-a",   "ARMv7a",   [HasV7Ops,
9080b57cec5SDimitry Andric                                                       FeatureNEON,
9090b57cec5SDimitry Andric                                                       FeatureDB,
9100b57cec5SDimitry Andric                                                       FeatureDSP,
91104eeddc0SDimitry Andric                                                       FeatureAClass,
91204eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9130b57cec5SDimitry Andric
9140b57cec5SDimitry Andricdef ARMv7ve   : Architecture<"armv7ve",   "ARMv7ve",  [HasV7Ops,
9150b57cec5SDimitry Andric                                                       FeatureNEON,
9160b57cec5SDimitry Andric                                                       FeatureDB,
9170b57cec5SDimitry Andric                                                       FeatureDSP,
9180b57cec5SDimitry Andric                                                       FeatureTrustZone,
9190b57cec5SDimitry Andric                                                       FeatureMP,
9200b57cec5SDimitry Andric                                                       FeatureVirtualization,
92104eeddc0SDimitry Andric                                                       FeatureAClass,
92204eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9230b57cec5SDimitry Andric
9240b57cec5SDimitry Andricdef ARMv7r    : Architecture<"armv7-r",   "ARMv7r",   [HasV7Ops,
9250b57cec5SDimitry Andric                                                       FeatureDB,
9260b57cec5SDimitry Andric                                                       FeatureDSP,
9270b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
92804eeddc0SDimitry Andric                                                       FeatureRClass,
92904eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9300b57cec5SDimitry Andric
9310b57cec5SDimitry Andricdef ARMv7m    : Architecture<"armv7-m",   "ARMv7m",   [HasV7Ops,
9320b57cec5SDimitry Andric                                                       FeatureThumb2,
9330b57cec5SDimitry Andric                                                       FeatureNoARM,
9340b57cec5SDimitry Andric                                                       ModeThumb,
9350b57cec5SDimitry Andric                                                       FeatureDB,
9360b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
9370b57cec5SDimitry Andric                                                       FeatureMClass]>;
9380b57cec5SDimitry Andric
9390b57cec5SDimitry Andricdef ARMv7em   : Architecture<"armv7e-m",  "ARMv7em",  [HasV7Ops,
9400b57cec5SDimitry Andric                                                       FeatureThumb2,
9410b57cec5SDimitry Andric                                                       FeatureNoARM,
9420b57cec5SDimitry Andric                                                       ModeThumb,
9430b57cec5SDimitry Andric                                                       FeatureDB,
9440b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
9450b57cec5SDimitry Andric                                                       FeatureMClass,
9460b57cec5SDimitry Andric                                                       FeatureDSP]>;
9470b57cec5SDimitry Andric
9480b57cec5SDimitry Andricdef ARMv8a    : Architecture<"armv8-a",   "ARMv8a",   [HasV8Ops,
9490b57cec5SDimitry Andric                                                       FeatureAClass,
9500b57cec5SDimitry Andric                                                       FeatureDB,
9510b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9520b57cec5SDimitry Andric                                                       FeatureNEON,
9530b57cec5SDimitry Andric                                                       FeatureDSP,
9540b57cec5SDimitry Andric                                                       FeatureTrustZone,
9550b57cec5SDimitry Andric                                                       FeatureMP,
9560b57cec5SDimitry Andric                                                       FeatureVirtualization,
9570b57cec5SDimitry Andric                                                       FeatureCrypto,
9580b57cec5SDimitry Andric                                                       FeatureCRC]>;
9590b57cec5SDimitry Andric
9600b57cec5SDimitry Andricdef ARMv81a   : Architecture<"armv8.1-a", "ARMv81a",  [HasV8_1aOps,
9610b57cec5SDimitry Andric                                                       FeatureAClass,
9620b57cec5SDimitry Andric                                                       FeatureDB,
9630b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9640b57cec5SDimitry Andric                                                       FeatureNEON,
9650b57cec5SDimitry Andric                                                       FeatureDSP,
9660b57cec5SDimitry Andric                                                       FeatureTrustZone,
9670b57cec5SDimitry Andric                                                       FeatureMP,
9680b57cec5SDimitry Andric                                                       FeatureVirtualization,
9690b57cec5SDimitry Andric                                                       FeatureCrypto,
9700b57cec5SDimitry Andric                                                       FeatureCRC]>;
9710b57cec5SDimitry Andric
9720b57cec5SDimitry Andricdef ARMv82a   : Architecture<"armv8.2-a", "ARMv82a",  [HasV8_2aOps,
9730b57cec5SDimitry Andric                                                       FeatureAClass,
9740b57cec5SDimitry Andric                                                       FeatureDB,
9750b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9760b57cec5SDimitry Andric                                                       FeatureNEON,
9770b57cec5SDimitry Andric                                                       FeatureDSP,
9780b57cec5SDimitry Andric                                                       FeatureTrustZone,
9790b57cec5SDimitry Andric                                                       FeatureMP,
9800b57cec5SDimitry Andric                                                       FeatureVirtualization,
9810b57cec5SDimitry Andric                                                       FeatureCrypto,
9820b57cec5SDimitry Andric                                                       FeatureCRC,
9830b57cec5SDimitry Andric                                                       FeatureRAS]>;
9840b57cec5SDimitry Andric
9850b57cec5SDimitry Andricdef ARMv83a   : Architecture<"armv8.3-a", "ARMv83a",  [HasV8_3aOps,
9860b57cec5SDimitry Andric                                                       FeatureAClass,
9870b57cec5SDimitry Andric                                                       FeatureDB,
9880b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9890b57cec5SDimitry Andric                                                       FeatureNEON,
9900b57cec5SDimitry Andric                                                       FeatureDSP,
9910b57cec5SDimitry Andric                                                       FeatureTrustZone,
9920b57cec5SDimitry Andric                                                       FeatureMP,
9930b57cec5SDimitry Andric                                                       FeatureVirtualization,
9940b57cec5SDimitry Andric                                                       FeatureCrypto,
9950b57cec5SDimitry Andric                                                       FeatureCRC,
9960b57cec5SDimitry Andric                                                       FeatureRAS]>;
9970b57cec5SDimitry Andric
9980b57cec5SDimitry Andricdef ARMv84a   : Architecture<"armv8.4-a", "ARMv84a",  [HasV8_4aOps,
9990b57cec5SDimitry Andric                                                       FeatureAClass,
10000b57cec5SDimitry Andric                                                       FeatureDB,
10010b57cec5SDimitry Andric                                                       FeatureFPARMv8,
10020b57cec5SDimitry Andric                                                       FeatureNEON,
10030b57cec5SDimitry Andric                                                       FeatureDSP,
10040b57cec5SDimitry Andric                                                       FeatureTrustZone,
10050b57cec5SDimitry Andric                                                       FeatureMP,
10060b57cec5SDimitry Andric                                                       FeatureVirtualization,
10070b57cec5SDimitry Andric                                                       FeatureCrypto,
10080b57cec5SDimitry Andric                                                       FeatureCRC,
10090b57cec5SDimitry Andric                                                       FeatureRAS,
10100b57cec5SDimitry Andric                                                       FeatureDotProd]>;
10110b57cec5SDimitry Andric
10120b57cec5SDimitry Andricdef ARMv85a   : Architecture<"armv8.5-a", "ARMv85a",  [HasV8_5aOps,
10130b57cec5SDimitry Andric                                                       FeatureAClass,
10140b57cec5SDimitry Andric                                                       FeatureDB,
10150b57cec5SDimitry Andric                                                       FeatureFPARMv8,
10160b57cec5SDimitry Andric                                                       FeatureNEON,
10170b57cec5SDimitry Andric                                                       FeatureDSP,
10180b57cec5SDimitry Andric                                                       FeatureTrustZone,
10190b57cec5SDimitry Andric                                                       FeatureMP,
10200b57cec5SDimitry Andric                                                       FeatureVirtualization,
10210b57cec5SDimitry Andric                                                       FeatureCrypto,
10220b57cec5SDimitry Andric                                                       FeatureCRC,
10230b57cec5SDimitry Andric                                                       FeatureRAS,
10240b57cec5SDimitry Andric                                                       FeatureDotProd]>;
10255ffd83dbSDimitry Andricdef ARMv86a   : Architecture<"armv8.6-a", "ARMv86a",  [HasV8_6aOps,
10265ffd83dbSDimitry Andric                                                       FeatureAClass,
10275ffd83dbSDimitry Andric                                                       FeatureDB,
10285ffd83dbSDimitry Andric                                                       FeatureFPARMv8,
10295ffd83dbSDimitry Andric                                                       FeatureNEON,
10305ffd83dbSDimitry Andric                                                       FeatureDSP,
10315ffd83dbSDimitry Andric                                                       FeatureTrustZone,
10325ffd83dbSDimitry Andric                                                       FeatureMP,
10335ffd83dbSDimitry Andric                                                       FeatureVirtualization,
10345ffd83dbSDimitry Andric                                                       FeatureCrypto,
10355ffd83dbSDimitry Andric                                                       FeatureCRC,
10365ffd83dbSDimitry Andric                                                       FeatureRAS,
10375ffd83dbSDimitry Andric                                                       FeatureDotProd]>;
1038fe6060f1SDimitry Andricdef ARMv87a   : Architecture<"armv8.7-a", "ARMv87a",  [HasV8_7aOps,
1039e8d8bef9SDimitry Andric                                                       FeatureAClass,
1040e8d8bef9SDimitry Andric                                                       FeatureDB,
1041e8d8bef9SDimitry Andric                                                       FeatureFPARMv8,
1042e8d8bef9SDimitry Andric                                                       FeatureNEON,
1043e8d8bef9SDimitry Andric                                                       FeatureDSP,
1044e8d8bef9SDimitry Andric                                                       FeatureTrustZone,
1045e8d8bef9SDimitry Andric                                                       FeatureMP,
1046e8d8bef9SDimitry Andric                                                       FeatureVirtualization,
1047e8d8bef9SDimitry Andric                                                       FeatureCrypto,
1048e8d8bef9SDimitry Andric                                                       FeatureCRC,
1049e8d8bef9SDimitry Andric                                                       FeatureRAS,
1050e8d8bef9SDimitry Andric                                                       FeatureDotProd]>;
105104eeddc0SDimitry Andricdef ARMv88a   : Architecture<"armv8.8-a", "ARMv88a",  [HasV8_8aOps,
105204eeddc0SDimitry Andric                                                       FeatureAClass,
105304eeddc0SDimitry Andric                                                       FeatureDB,
105404eeddc0SDimitry Andric                                                       FeatureFPARMv8,
105504eeddc0SDimitry Andric                                                       FeatureNEON,
105604eeddc0SDimitry Andric                                                       FeatureDSP,
105704eeddc0SDimitry Andric                                                       FeatureTrustZone,
105804eeddc0SDimitry Andric                                                       FeatureMP,
105904eeddc0SDimitry Andric                                                       FeatureVirtualization,
106004eeddc0SDimitry Andric                                                       FeatureCrypto,
106104eeddc0SDimitry Andric                                                       FeatureCRC,
106204eeddc0SDimitry Andric                                                       FeatureRAS,
106304eeddc0SDimitry Andric                                                       FeatureDotProd]>;
1064*bdd1243dSDimitry Andricdef ARMv89a   : Architecture<"armv8.9-a", "ARMv89a",  [HasV8_9aOps,
1065*bdd1243dSDimitry Andric                                                       FeatureAClass,
1066*bdd1243dSDimitry Andric                                                       FeatureDB,
1067*bdd1243dSDimitry Andric                                                       FeatureFPARMv8,
1068*bdd1243dSDimitry Andric                                                       FeatureNEON,
1069*bdd1243dSDimitry Andric                                                       FeatureDSP,
1070*bdd1243dSDimitry Andric                                                       FeatureTrustZone,
1071*bdd1243dSDimitry Andric                                                       FeatureMP,
1072*bdd1243dSDimitry Andric                                                       FeatureVirtualization,
1073*bdd1243dSDimitry Andric                                                       FeatureCrypto,
1074*bdd1243dSDimitry Andric                                                       FeatureCRC,
1075*bdd1243dSDimitry Andric                                                       FeatureRAS,
1076*bdd1243dSDimitry Andric                                                       FeatureDotProd]>;
10770b57cec5SDimitry Andric
1078349cc55cSDimitry Andricdef ARMv9a   : Architecture<"armv9-a", "ARMv9a",       [HasV9_0aOps,
1079349cc55cSDimitry Andric                                                       FeatureAClass,
1080349cc55cSDimitry Andric                                                       FeatureDB,
1081349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1082349cc55cSDimitry Andric                                                       FeatureNEON,
1083349cc55cSDimitry Andric                                                       FeatureDSP,
1084349cc55cSDimitry Andric                                                       FeatureTrustZone,
1085349cc55cSDimitry Andric                                                       FeatureMP,
1086349cc55cSDimitry Andric                                                       FeatureVirtualization,
1087349cc55cSDimitry Andric                                                       FeatureCRC,
1088349cc55cSDimitry Andric                                                       FeatureRAS,
1089349cc55cSDimitry Andric                                                       FeatureDotProd]>;
1090349cc55cSDimitry Andricdef ARMv91a   : Architecture<"armv9.1-a", "ARMv91a",   [HasV9_1aOps,
1091349cc55cSDimitry Andric                                                       FeatureAClass,
1092349cc55cSDimitry Andric                                                       FeatureDB,
1093349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1094349cc55cSDimitry Andric                                                       FeatureNEON,
1095349cc55cSDimitry Andric                                                       FeatureDSP,
1096349cc55cSDimitry Andric                                                       FeatureTrustZone,
1097349cc55cSDimitry Andric                                                       FeatureMP,
1098349cc55cSDimitry Andric                                                       FeatureVirtualization,
1099349cc55cSDimitry Andric                                                       FeatureCRC,
1100349cc55cSDimitry Andric                                                       FeatureRAS,
1101349cc55cSDimitry Andric                                                       FeatureDotProd]>;
1102349cc55cSDimitry Andricdef ARMv92a   : Architecture<"armv9.2-a", "ARMv92a",  [HasV9_2aOps,
1103349cc55cSDimitry Andric                                                       FeatureAClass,
1104349cc55cSDimitry Andric                                                       FeatureDB,
1105349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1106349cc55cSDimitry Andric                                                       FeatureNEON,
1107349cc55cSDimitry Andric                                                       FeatureDSP,
1108349cc55cSDimitry Andric                                                       FeatureTrustZone,
1109349cc55cSDimitry Andric                                                       FeatureMP,
1110349cc55cSDimitry Andric                                                       FeatureVirtualization,
1111349cc55cSDimitry Andric                                                       FeatureCRC,
1112349cc55cSDimitry Andric                                                       FeatureRAS,
1113349cc55cSDimitry Andric                                                       FeatureDotProd]>;
111404eeddc0SDimitry Andricdef ARMv93a   : Architecture<"armv9.3-a", "ARMv93a",  [HasV9_3aOps,
111504eeddc0SDimitry Andric                                                       FeatureAClass,
111604eeddc0SDimitry Andric                                                       FeatureDB,
111704eeddc0SDimitry Andric                                                       FeatureFPARMv8,
111804eeddc0SDimitry Andric                                                       FeatureNEON,
111904eeddc0SDimitry Andric                                                       FeatureDSP,
112004eeddc0SDimitry Andric                                                       FeatureTrustZone,
112104eeddc0SDimitry Andric                                                       FeatureMP,
112204eeddc0SDimitry Andric                                                       FeatureVirtualization,
112304eeddc0SDimitry Andric                                                       FeatureCrypto,
112404eeddc0SDimitry Andric                                                       FeatureCRC,
112504eeddc0SDimitry Andric                                                       FeatureRAS,
112604eeddc0SDimitry Andric                                                       FeatureDotProd]>;
1127*bdd1243dSDimitry Andricdef ARMv94a   : Architecture<"armv9.4-a", "ARMv94a",  [HasV9_4aOps,
1128*bdd1243dSDimitry Andric                                                       FeatureAClass,
1129*bdd1243dSDimitry Andric                                                       FeatureDB,
1130*bdd1243dSDimitry Andric                                                       FeatureFPARMv8,
1131*bdd1243dSDimitry Andric                                                       FeatureNEON,
1132*bdd1243dSDimitry Andric                                                       FeatureDSP,
1133*bdd1243dSDimitry Andric                                                       FeatureTrustZone,
1134*bdd1243dSDimitry Andric                                                       FeatureMP,
1135*bdd1243dSDimitry Andric                                                       FeatureVirtualization,
1136*bdd1243dSDimitry Andric                                                       FeatureCRC,
1137*bdd1243dSDimitry Andric                                                       FeatureRAS,
1138*bdd1243dSDimitry Andric                                                       FeatureDotProd]>;
1139349cc55cSDimitry Andric
11400b57cec5SDimitry Andricdef ARMv8r    : Architecture<"armv8-r",   "ARMv8r",   [HasV8Ops,
11410b57cec5SDimitry Andric                                                       FeatureRClass,
11420b57cec5SDimitry Andric                                                       FeatureDB,
11430b57cec5SDimitry Andric                                                       FeatureDFB,
11440b57cec5SDimitry Andric                                                       FeatureDSP,
11450b57cec5SDimitry Andric                                                       FeatureCRC,
11460b57cec5SDimitry Andric                                                       FeatureMP,
11470b57cec5SDimitry Andric                                                       FeatureVirtualization,
11480b57cec5SDimitry Andric                                                       FeatureFPARMv8,
11490b57cec5SDimitry Andric                                                       FeatureNEON]>;
11500b57cec5SDimitry Andric
11510b57cec5SDimitry Andricdef ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline",
11520b57cec5SDimitry Andric                                                      [HasV8MBaselineOps,
11530b57cec5SDimitry Andric                                                       FeatureNoARM,
11540b57cec5SDimitry Andric                                                       ModeThumb,
11550b57cec5SDimitry Andric                                                       FeatureDB,
11560b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11570b57cec5SDimitry Andric                                                       FeatureV7Clrex,
11580b57cec5SDimitry Andric                                                       Feature8MSecExt,
11590b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11600b57cec5SDimitry Andric                                                       FeatureMClass,
11610b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
11620b57cec5SDimitry Andric
11630b57cec5SDimitry Andricdef ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline",
11640b57cec5SDimitry Andric                                                      [HasV8MMainlineOps,
11650b57cec5SDimitry Andric                                                       FeatureNoARM,
11660b57cec5SDimitry Andric                                                       ModeThumb,
11670b57cec5SDimitry Andric                                                       FeatureDB,
11680b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11690b57cec5SDimitry Andric                                                       Feature8MSecExt,
11700b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11710b57cec5SDimitry Andric                                                       FeatureMClass]>;
11720b57cec5SDimitry Andric
11730b57cec5SDimitry Andricdef ARMv81mMainline : Architecture<"armv8.1-m.main", "ARMv81mMainline",
11740b57cec5SDimitry Andric                                                      [HasV8_1MMainlineOps,
11750b57cec5SDimitry Andric                                                       FeatureNoARM,
11760b57cec5SDimitry Andric                                                       ModeThumb,
11770b57cec5SDimitry Andric                                                       FeatureDB,
11780b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11790b57cec5SDimitry Andric                                                       Feature8MSecExt,
11800b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11810b57cec5SDimitry Andric                                                       FeatureMClass,
11820b57cec5SDimitry Andric                                                       FeatureRAS,
11830b57cec5SDimitry Andric                                                       FeatureLOB]>;
11840b57cec5SDimitry Andric
11850b57cec5SDimitry Andric// Aliases
11860b57cec5SDimitry Andricdef IWMMXT   : Architecture<"iwmmxt",      "ARMv5te",  [ARMv5te]>;
11870b57cec5SDimitry Andricdef IWMMXT2  : Architecture<"iwmmxt2",     "ARMv5te",  [ARMv5te]>;
11880b57cec5SDimitry Andricdef XScale   : Architecture<"xscale",      "ARMv5te",  [ARMv5te]>;
11890b57cec5SDimitry Andricdef ARMv6j   : Architecture<"armv6j",      "ARMv7a",   [ARMv6]>;
11900b57cec5SDimitry Andricdef ARMv7k   : Architecture<"armv7k",      "ARMv7a",   [ARMv7a]>;
11910b57cec5SDimitry Andricdef ARMv7s   : Architecture<"armv7s",      "ARMv7a",   [ARMv7a]>;
11920b57cec5SDimitry Andric
1193e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1194e8d8bef9SDimitry Andric// Register File Description
1195e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1196e8d8bef9SDimitry Andric
1197e8d8bef9SDimitry Andricinclude "ARMRegisterInfo.td"
1198e8d8bef9SDimitry Andricinclude "ARMRegisterBanks.td"
1199e8d8bef9SDimitry Andricinclude "ARMCallingConv.td"
12000b57cec5SDimitry Andric
12010b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12020b57cec5SDimitry Andric// ARM schedules.
12030b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12040b57cec5SDimitry Andric//
12050b57cec5SDimitry Andricinclude "ARMPredicates.td"
12060b57cec5SDimitry Andricinclude "ARMSchedule.td"
12070b57cec5SDimitry Andric
12080b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1209e8d8bef9SDimitry Andric// Instruction Descriptions
1210e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1211e8d8bef9SDimitry Andric
1212e8d8bef9SDimitry Andricinclude "ARMInstrInfo.td"
1213e8d8bef9SDimitry Andricdef ARMInstrInfo : InstrInfo;
1214e8d8bef9SDimitry Andric
1215e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1216e8d8bef9SDimitry Andric// ARM schedules
1217e8d8bef9SDimitry Andric//
1218e8d8bef9SDimitry Andricinclude "ARMScheduleV6.td"
1219e8d8bef9SDimitry Andricinclude "ARMScheduleA8.td"
1220e8d8bef9SDimitry Andricinclude "ARMScheduleA9.td"
1221e8d8bef9SDimitry Andricinclude "ARMScheduleSwift.td"
1222e8d8bef9SDimitry Andricinclude "ARMScheduleR52.td"
1223e8d8bef9SDimitry Andricinclude "ARMScheduleA57.td"
1224e8d8bef9SDimitry Andricinclude "ARMScheduleM4.td"
1225*bdd1243dSDimitry Andricinclude "ARMScheduleM55.td"
1226e8d8bef9SDimitry Andricinclude "ARMScheduleM7.td"
1227e8d8bef9SDimitry Andric
1228e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
12290b57cec5SDimitry Andric// ARM processors
12300b57cec5SDimitry Andric//
12310b57cec5SDimitry Andric// Dummy CPU, used to target architectures
12320b57cec5SDimitry Andricdef : ProcessorModel<"generic",     CortexA8Model,      []>;
12330b57cec5SDimitry Andric
12340b57cec5SDimitry Andric// FIXME: Several processors below are not using their own scheduler
12350b57cec5SDimitry Andric// model, but one of similar/previous processor. These should be fixed.
12360b57cec5SDimitry Andric
12370b57cec5SDimitry Andricdef : ProcNoItin<"arm8",                                [ARMv4]>;
12380b57cec5SDimitry Andricdef : ProcNoItin<"arm810",                              [ARMv4]>;
12390b57cec5SDimitry Andricdef : ProcNoItin<"strongarm",                           [ARMv4]>;
12400b57cec5SDimitry Andricdef : ProcNoItin<"strongarm110",                        [ARMv4]>;
12410b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1100",                       [ARMv4]>;
12420b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1110",                       [ARMv4]>;
12430b57cec5SDimitry Andric
12440b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi",                            [ARMv4t]>;
12450b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi-s",                          [ARMv4t]>;
12460b57cec5SDimitry Andricdef : ProcNoItin<"arm710t",                             [ARMv4t]>;
12470b57cec5SDimitry Andricdef : ProcNoItin<"arm720t",                             [ARMv4t]>;
12480b57cec5SDimitry Andricdef : ProcNoItin<"arm9",                                [ARMv4t]>;
12490b57cec5SDimitry Andricdef : ProcNoItin<"arm9tdmi",                            [ARMv4t]>;
12500b57cec5SDimitry Andricdef : ProcNoItin<"arm920",                              [ARMv4t]>;
12510b57cec5SDimitry Andricdef : ProcNoItin<"arm920t",                             [ARMv4t]>;
12520b57cec5SDimitry Andricdef : ProcNoItin<"arm922t",                             [ARMv4t]>;
12530b57cec5SDimitry Andricdef : ProcNoItin<"arm940t",                             [ARMv4t]>;
12540b57cec5SDimitry Andricdef : ProcNoItin<"ep9312",                              [ARMv4t]>;
12550b57cec5SDimitry Andric
12560b57cec5SDimitry Andricdef : ProcNoItin<"arm10tdmi",                           [ARMv5t]>;
12570b57cec5SDimitry Andricdef : ProcNoItin<"arm1020t",                            [ARMv5t]>;
12580b57cec5SDimitry Andric
12590b57cec5SDimitry Andricdef : ProcNoItin<"arm9e",                               [ARMv5te]>;
12600b57cec5SDimitry Andricdef : ProcNoItin<"arm926ej-s",                          [ARMv5te]>;
12610b57cec5SDimitry Andricdef : ProcNoItin<"arm946e-s",                           [ARMv5te]>;
12620b57cec5SDimitry Andricdef : ProcNoItin<"arm966e-s",                           [ARMv5te]>;
12630b57cec5SDimitry Andricdef : ProcNoItin<"arm968e-s",                           [ARMv5te]>;
12640b57cec5SDimitry Andricdef : ProcNoItin<"arm10e",                              [ARMv5te]>;
12650b57cec5SDimitry Andricdef : ProcNoItin<"arm1020e",                            [ARMv5te]>;
12660b57cec5SDimitry Andricdef : ProcNoItin<"arm1022e",                            [ARMv5te]>;
12670b57cec5SDimitry Andricdef : ProcNoItin<"xscale",                              [ARMv5te]>;
12680b57cec5SDimitry Andricdef : ProcNoItin<"iwmmxt",                              [ARMv5te]>;
12690b57cec5SDimitry Andric
12700b57cec5SDimitry Andricdef : Processor<"arm1136j-s",       ARMV6Itineraries,   [ARMv6]>;
12710b57cec5SDimitry Andricdef : Processor<"arm1136jf-s",      ARMV6Itineraries,   [ARMv6,
12720b57cec5SDimitry Andric                                                         FeatureVFP2,
12730b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12740b57cec5SDimitry Andric
1275fe6060f1SDimitry Andricdef : Processor<"cortex-m0",        ARMV6Itineraries,   [ARMv6m,
1276fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1277fe6060f1SDimitry Andricdef : Processor<"cortex-m0plus",    ARMV6Itineraries,   [ARMv6m,
1278fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1279fe6060f1SDimitry Andricdef : Processor<"cortex-m1",        ARMV6Itineraries,   [ARMv6m,
1280fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1281fe6060f1SDimitry Andricdef : Processor<"sc000",            ARMV6Itineraries,   [ARMv6m,
1282fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
12830b57cec5SDimitry Andric
12840b57cec5SDimitry Andricdef : Processor<"arm1176jz-s",      ARMV6Itineraries,   [ARMv6kz]>;
12850b57cec5SDimitry Andricdef : Processor<"arm1176jzf-s",     ARMV6Itineraries,   [ARMv6kz,
12860b57cec5SDimitry Andric                                                         FeatureVFP2,
12870b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12880b57cec5SDimitry Andric
12890b57cec5SDimitry Andricdef : Processor<"mpcorenovfp",      ARMV6Itineraries,   [ARMv6k]>;
12900b57cec5SDimitry Andricdef : Processor<"mpcore",           ARMV6Itineraries,   [ARMv6k,
12910b57cec5SDimitry Andric                                                         FeatureVFP2,
12920b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12930b57cec5SDimitry Andric
12940b57cec5SDimitry Andricdef : Processor<"arm1156t2-s",      ARMV6Itineraries,   [ARMv6t2]>;
12950b57cec5SDimitry Andricdef : Processor<"arm1156t2f-s",     ARMV6Itineraries,   [ARMv6t2,
12960b57cec5SDimitry Andric                                                         FeatureVFP2,
12970b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12980b57cec5SDimitry Andric
12990b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a5",   CortexA8Model,      [ARMv7a, ProcA5,
13000b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13010b57cec5SDimitry Andric                                                         FeatureTrustZone,
13020b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13030b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1304480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13050b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13060b57cec5SDimitry Andric                                                         FeatureMP,
13070b57cec5SDimitry Andric                                                         FeatureVFP4]>;
13080b57cec5SDimitry Andric
13090b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a7",   CortexA8Model,      [ARMv7a, ProcA7,
13100b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13110b57cec5SDimitry Andric                                                         FeatureTrustZone,
13120b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13130b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13140b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1315480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13160b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13170b57cec5SDimitry Andric                                                         FeatureMP,
13180b57cec5SDimitry Andric                                                         FeatureVFP4,
13190b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13200b57cec5SDimitry Andric
13210b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a8",   CortexA8Model,      [ARMv7a, ProcA8,
13220b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13230b57cec5SDimitry Andric                                                         FeatureNonpipelinedVFP,
13240b57cec5SDimitry Andric                                                         FeatureTrustZone,
13250b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13260b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13270b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1328480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13290b57cec5SDimitry Andric                                                         FeatureVMLxForwarding]>;
13300b57cec5SDimitry Andric
13310b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a9",   CortexA9Model,      [ARMv7a, ProcA9,
13320b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13330b57cec5SDimitry Andric                                                         FeatureTrustZone,
13340b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13350b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13360b57cec5SDimitry Andric                                                         FeatureFP16,
13370b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13380b57cec5SDimitry Andric                                                         FeatureExpandMLx,
13390b57cec5SDimitry Andric                                                         FeaturePreferVMOVSR,
13400b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13410b57cec5SDimitry Andric                                                         FeatureNEONForFPMovs,
13420b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13430b57cec5SDimitry Andric                                                         FeatureMP]>;
13440b57cec5SDimitry Andric
13450b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a12",  CortexA9Model,      [ARMv7a, ProcA12,
13460b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13470b57cec5SDimitry Andric                                                         FeatureTrustZone,
13480b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13490b57cec5SDimitry Andric                                                         FeatureVFP4,
13500b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13510b57cec5SDimitry Andric                                                         FeatureVirtualization,
13520b57cec5SDimitry Andric                                                         FeatureMP]>;
13530b57cec5SDimitry Andric
13540b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a15",  CortexA9Model,      [ARMv7a, ProcA15,
13550b57cec5SDimitry Andric                                                         FeatureDontWidenVMOVS,
13560b57cec5SDimitry Andric                                                         FeatureSplatVFPToNeon,
13570b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13580b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13590b57cec5SDimitry Andric                                                         FeatureTrustZone,
13600b57cec5SDimitry Andric                                                         FeatureVFP4,
13610b57cec5SDimitry Andric                                                         FeatureMP,
13620b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13630b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13640b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13650b57cec5SDimitry Andric
13660b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a17",  CortexA9Model,      [ARMv7a, ProcA17,
13670b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13680b57cec5SDimitry Andric                                                         FeatureTrustZone,
13690b57cec5SDimitry Andric                                                         FeatureMP,
13700b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13710b57cec5SDimitry Andric                                                         FeatureVFP4,
13720b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13730b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13740b57cec5SDimitry Andric
13750b57cec5SDimitry Andric// FIXME: krait has currently the same features as A9 plus VFP4 and  HWDiv
13760b57cec5SDimitry Andricdef : ProcessorModel<"krait",       CortexA9Model,      [ARMv7a, ProcKrait,
13770b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13780b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13790b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13800b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13810b57cec5SDimitry Andric                                                         FeatureFP16,
13820b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13830b57cec5SDimitry Andric                                                         FeatureVFP4,
13840b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
13850b57cec5SDimitry Andric                                                         FeatureHWDivARM]>;
13860b57cec5SDimitry Andric
13870b57cec5SDimitry Andricdef : ProcessorModel<"swift",       SwiftModel,         [ARMv7a, ProcSwift,
13880b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13890b57cec5SDimitry Andric                                                         FeatureNEONForFP,
13900b57cec5SDimitry Andric                                                         FeatureVFP4,
13910b57cec5SDimitry Andric                                                         FeatureUseWideStrideVFP,
13920b57cec5SDimitry Andric                                                         FeatureMP,
13930b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
13940b57cec5SDimitry Andric                                                         FeatureHWDivARM,
13950b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13960b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
13970b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1398480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13990b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
14000b57cec5SDimitry Andric                                                         FeatureProfUnpredicate,
14010b57cec5SDimitry Andric                                                         FeaturePrefISHSTBarrier,
14020b57cec5SDimitry Andric                                                         FeatureSlowOddRegister,
14030b57cec5SDimitry Andric                                                         FeatureSlowLoadDSubreg,
14040b57cec5SDimitry Andric                                                         FeatureSlowVGETLNi32,
14050b57cec5SDimitry Andric                                                         FeatureSlowVDUP32,
14060b57cec5SDimitry Andric                                                         FeatureUseMISched,
14070b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
14080b57cec5SDimitry Andric
14090b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4",   CortexA8Model,      [ARMv7r, ProcR4,
14100b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14110b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14120b57cec5SDimitry Andric
14130b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4f",  CortexA8Model,      [ARMv7r, ProcR4,
14140b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14150b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14160b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1417480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14180b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14190b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14200b57cec5SDimitry Andric
14210b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r5",   CortexA8Model,      [ARMv7r, ProcR5,
14220b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14230b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14240b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14250b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14260b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1427480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14280b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14290b57cec5SDimitry Andric
14300b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r7",   CortexA8Model,      [ARMv7r, ProcR7,
14310b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14320b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14330b57cec5SDimitry Andric                                                         FeatureFP16,
14340b57cec5SDimitry Andric                                                         FeatureMP,
14350b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14360b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14370b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1438480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14390b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14400b57cec5SDimitry Andric
14410b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r8",   CortexA8Model,      [ARMv7r,
14420b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14430b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14440b57cec5SDimitry Andric                                                         FeatureFP16,
14450b57cec5SDimitry Andric                                                         FeatureMP,
14460b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14470b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14480b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1449480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14500b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14510b57cec5SDimitry Andric
14520b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m3",   CortexM4Model,      [ARMv7m,
14530b57cec5SDimitry Andric                                                         ProcM3,
14540b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14550b57cec5SDimitry Andric                                                         FeatureUseMISched,
14560b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14570b57cec5SDimitry Andric
14580b57cec5SDimitry Andricdef : ProcessorModel<"sc300",       CortexM4Model,      [ARMv7m,
14590b57cec5SDimitry Andric                                                         ProcM3,
14600b57cec5SDimitry Andric                                                         FeatureUseMISched,
14610b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14620b57cec5SDimitry Andric
14630b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m4", CortexM4Model,        [ARMv7em,
14640b57cec5SDimitry Andric                                                         FeatureVFP4_D16_SP,
14650b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14660b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1467480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14680b57cec5SDimitry Andric                                                         FeatureUseMISched,
14690b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14700b57cec5SDimitry Andric
1471e8d8bef9SDimitry Andricdef : ProcessorModel<"cortex-m7", CortexM7Model,        [ARMv7em,
1472e8d8bef9SDimitry Andric                                                         ProcM7,
1473e8d8bef9SDimitry Andric                                                         FeatureFPARMv8_D16,
147481ad6265SDimitry Andric                                                         FeatureUseMIPipeliner,
1475e8d8bef9SDimitry Andric                                                         FeatureUseMISched]>;
14760b57cec5SDimitry Andric
14770b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m23",                          [ARMv8mBaseline,
1478fe6060f1SDimitry Andric                                                         FeatureNoMovt,
1479fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14800b57cec5SDimitry Andric
14810b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m33", CortexM4Model,       [ARMv8mMainline,
14820b57cec5SDimitry Andric                                                         FeatureDSP,
14830b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
14840b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14850b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1486480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14870b57cec5SDimitry Andric                                                         FeatureUseMISched,
1488349cc55cSDimitry Andric                                                         FeatureHasNoBranchPredictor,
1489349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
14900b57cec5SDimitry Andric
14910b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m35p", CortexM4Model,      [ARMv8mMainline,
14920b57cec5SDimitry Andric                                                         FeatureDSP,
14930b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
14940b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14950b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1496480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14970b57cec5SDimitry Andric                                                         FeatureUseMISched,
1498349cc55cSDimitry Andric                                                         FeatureHasNoBranchPredictor,
1499349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
15000b57cec5SDimitry Andric
1501*bdd1243dSDimitry Andricdef : ProcessorModel<"cortex-m55", CortexM55Model,      [ARMv81mMainline,
15025ffd83dbSDimitry Andric                                                         FeatureDSP,
15035ffd83dbSDimitry Andric                                                         FeatureFPARMv8_D16,
15045ffd83dbSDimitry Andric                                                         FeatureUseMISched,
15055ffd83dbSDimitry Andric                                                         FeatureHasNoBranchPredictor,
15065ffd83dbSDimitry Andric                                                         FeaturePrefLoopAlign32,
15075ffd83dbSDimitry Andric                                                         FeatureHasSlowFPVMLx,
1508349cc55cSDimitry Andric                                                         HasMVEFloatOps,
1509349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
15100b57cec5SDimitry Andric
1511753f127fSDimitry Andricdef : ProcessorModel<"cortex-m85", CortexM7Model,       [ARMv81mMainline,
1512753f127fSDimitry Andric                                                         FeatureDSP,
1513753f127fSDimitry Andric                                                         FeatureFPARMv8_D16,
1514753f127fSDimitry Andric                                                         FeaturePACBTI,
1515753f127fSDimitry Andric                                                         FeatureUseMISched,
1516753f127fSDimitry Andric                                                         HasMVEFloatOps]>;
1517753f127fSDimitry Andric
15180b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a32",                           [ARMv8a,
15190b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15200b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15210b57cec5SDimitry Andric                                                         FeatureCrypto,
15220b57cec5SDimitry Andric                                                         FeatureCRC]>;
15230b57cec5SDimitry Andric
15240b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a35",                          [ARMv8a, ProcA35,
15250b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15260b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15270b57cec5SDimitry Andric                                                         FeatureCrypto,
15280b57cec5SDimitry Andric                                                         FeatureCRC]>;
15290b57cec5SDimitry Andric
15300b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a53",                          [ARMv8a, ProcA53,
15310b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15320b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15330b57cec5SDimitry Andric                                                         FeatureCrypto,
15340b57cec5SDimitry Andric                                                         FeatureCRC,
15350b57cec5SDimitry Andric                                                         FeatureFPAO]>;
15360b57cec5SDimitry Andric
15370b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a55",                          [ARMv82a, ProcA55,
15380b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15390b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15400b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15410b57cec5SDimitry Andric
15420b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a57",  CortexA57Model,     [ARMv8a, ProcA57,
15430b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15440b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15450b57cec5SDimitry Andric                                                         FeatureCrypto,
15460b57cec5SDimitry Andric                                                         FeatureCRC,
15470b57cec5SDimitry Andric                                                         FeatureFPAO,
15480b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
154981ad6265SDimitry Andric                                                         FeatureCheapPredicableCPSR,
155081ad6265SDimitry Andric                                                         FeatureFixCortexA57AES1742098]>;
15510b57cec5SDimitry Andric
15520b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a72",  CortexA57Model,     [ARMv8a, ProcA72,
15530b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15540b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15550b57cec5SDimitry Andric                                                         FeatureCrypto,
155681ad6265SDimitry Andric                                                         FeatureCRC,
155781ad6265SDimitry Andric                                                         FeatureFixCortexA57AES1742098]>;
15580b57cec5SDimitry Andric
15590b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a73",                          [ARMv8a, ProcA73,
15600b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15610b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15620b57cec5SDimitry Andric                                                         FeatureCrypto,
15630b57cec5SDimitry Andric                                                         FeatureCRC]>;
15640b57cec5SDimitry Andric
15650b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a75",                          [ARMv82a, ProcA75,
15660b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15670b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15680b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15690b57cec5SDimitry Andric
15700b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76",                          [ARMv82a, ProcA76,
15710b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15720b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15730b57cec5SDimitry Andric                                                         FeatureCrypto,
15740b57cec5SDimitry Andric                                                         FeatureCRC,
15750b57cec5SDimitry Andric                                                         FeatureFullFP16,
15760b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15770b57cec5SDimitry Andric
15780b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76ae",                        [ARMv82a, ProcA76,
15790b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15800b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15810b57cec5SDimitry Andric                                                         FeatureCrypto,
15820b57cec5SDimitry Andric                                                         FeatureCRC,
15830b57cec5SDimitry Andric                                                         FeatureFullFP16,
15840b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15850b57cec5SDimitry Andric
15865ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-a77",                          [ARMv82a, ProcA77,
15875ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
15885ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
15895ffd83dbSDimitry Andric                                                         FeatureCrypto,
15905ffd83dbSDimitry Andric                                                         FeatureCRC,
15915ffd83dbSDimitry Andric                                                         FeatureFullFP16,
15925ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
15935ffd83dbSDimitry Andric
15945ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-a78",                          [ARMv82a, ProcA78,
15955ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
15965ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
15975ffd83dbSDimitry Andric                                                         FeatureCrypto,
15985ffd83dbSDimitry Andric                                                         FeatureCRC,
15995ffd83dbSDimitry Andric                                                         FeatureFullFP16,
16005ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
16015ffd83dbSDimitry Andric
1602e8d8bef9SDimitry Andricdef : ProcNoItin<"cortex-a78c",                         [ARMv82a, ProcA78C,
1603e8d8bef9SDimitry Andric                                                         FeatureHWDivThumb,
1604e8d8bef9SDimitry Andric                                                         FeatureHWDivARM,
1605e8d8bef9SDimitry Andric                                                         FeatureCrypto,
1606e8d8bef9SDimitry Andric                                                         FeatureCRC,
1607e8d8bef9SDimitry Andric                                                         FeatureDotProd,
1608e8d8bef9SDimitry Andric                                                         FeatureFullFP16]>;
1609e8d8bef9SDimitry Andric
1610349cc55cSDimitry Andricdef : ProcNoItin<"cortex-a710",                         [ARMv9a, ProcA710,
1611349cc55cSDimitry Andric                                                         FeatureHWDivThumb,
1612349cc55cSDimitry Andric                                                         FeatureHWDivARM,
1613349cc55cSDimitry Andric                                                         FeatureFP16FML,
1614349cc55cSDimitry Andric                                                         FeatureBF16,
1615349cc55cSDimitry Andric                                                         FeatureMatMulInt8,
1616349cc55cSDimitry Andric                                                         FeatureSB]>;
1617349cc55cSDimitry Andric
16185ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-x1",                           [ARMv82a, ProcX1,
16195ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
16205ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
16215ffd83dbSDimitry Andric                                                         FeatureCrypto,
16225ffd83dbSDimitry Andric                                                         FeatureCRC,
16235ffd83dbSDimitry Andric                                                         FeatureFullFP16,
16245ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
16255ffd83dbSDimitry Andric
16261fd87a68SDimitry Andricdef : ProcNoItin<"cortex-x1c",                          [ARMv82a, ProcX1C,
16271fd87a68SDimitry Andric                                                         FeatureHWDivThumb,
16281fd87a68SDimitry Andric                                                         FeatureHWDivARM,
16291fd87a68SDimitry Andric                                                         FeatureCrypto,
16301fd87a68SDimitry Andric                                                         FeatureCRC,
16311fd87a68SDimitry Andric                                                         FeatureFullFP16,
16321fd87a68SDimitry Andric                                                         FeatureDotProd]>;
16331fd87a68SDimitry Andric
1634e8d8bef9SDimitry Andricdef : ProcNoItin<"neoverse-v1",                         [ARMv84a,
1635e8d8bef9SDimitry Andric                                                         FeatureHWDivThumb,
1636e8d8bef9SDimitry Andric                                                         FeatureHWDivARM,
1637e8d8bef9SDimitry Andric                                                         FeatureCrypto,
1638e8d8bef9SDimitry Andric                                                         FeatureCRC,
1639e8d8bef9SDimitry Andric                                                         FeatureFullFP16,
1640e8d8bef9SDimitry Andric                                                         FeatureBF16,
1641e8d8bef9SDimitry Andric                                                         FeatureMatMulInt8]>;
1642e8d8bef9SDimitry Andric
16438bcb0991SDimitry Andricdef : ProcNoItin<"neoverse-n1",                         [ARMv82a,
16448bcb0991SDimitry Andric                                                         FeatureHWDivThumb,
16458bcb0991SDimitry Andric                                                         FeatureHWDivARM,
16468bcb0991SDimitry Andric                                                         FeatureCrypto,
16478bcb0991SDimitry Andric                                                         FeatureCRC,
16488bcb0991SDimitry Andric                                                         FeatureDotProd]>;
16498bcb0991SDimitry Andric
1650e8d8bef9SDimitry Andricdef : ProcNoItin<"neoverse-n2",                         [ARMv85a,
1651e8d8bef9SDimitry Andric                                                         FeatureBF16,
165204eeddc0SDimitry Andric                                                         FeatureMatMulInt8]>;
1653e8d8bef9SDimitry Andric
16540b57cec5SDimitry Andricdef : ProcessorModel<"cyclone",     SwiftModel,         [ARMv8a, ProcSwift,
16550b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
16560b57cec5SDimitry Andric                                                         FeatureNEONForFP,
16570b57cec5SDimitry Andric                                                         FeatureVFP4,
16580b57cec5SDimitry Andric                                                         FeatureMP,
16590b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
16600b57cec5SDimitry Andric                                                         FeatureHWDivARM,
16610b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
16620b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
16630b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1664480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
16650b57cec5SDimitry Andric                                                         FeatureCrypto,
16660b57cec5SDimitry Andric                                                         FeatureUseMISched,
16670b57cec5SDimitry Andric                                                         FeatureZCZeroing,
16680b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
16690b57cec5SDimitry Andric
16700b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m3",                           [ARMv8a, ProcExynos]>;
16710b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m4",                           [ARMv82a, ProcExynos,
16720b57cec5SDimitry Andric                                                         FeatureFullFP16,
16730b57cec5SDimitry Andric                                                         FeatureDotProd]>;
16740b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m5",                           [ARMv82a, ProcExynos,
16750b57cec5SDimitry Andric                                                         FeatureFullFP16,
16760b57cec5SDimitry Andric                                                         FeatureDotProd]>;
16770b57cec5SDimitry Andric
16780b57cec5SDimitry Andricdef : ProcNoItin<"kryo",                                [ARMv8a, ProcKryo,
16790b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
16800b57cec5SDimitry Andric                                                         FeatureHWDivARM,
16810b57cec5SDimitry Andric                                                         FeatureCrypto,
16820b57cec5SDimitry Andric                                                         FeatureCRC]>;
16830b57cec5SDimitry Andric
16840b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r52", CortexR52Model,      [ARMv8r, ProcR52,
16850b57cec5SDimitry Andric                                                         FeatureUseMISched,
1686480093f4SDimitry Andric                                                         FeatureFPAO]>;
16870b57cec5SDimitry Andric
16880b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
16890b57cec5SDimitry Andric// Declare the target which we are implementing
16900b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
16910b57cec5SDimitry Andric
16920b57cec5SDimitry Andricdef ARMAsmWriter : AsmWriter {
16930b57cec5SDimitry Andric  string AsmWriterClassName  = "InstPrinter";
16940b57cec5SDimitry Andric  int PassSubtarget = 1;
16950b57cec5SDimitry Andric  int Variant = 0;
16960b57cec5SDimitry Andric  bit isMCAsmWriter = 1;
16970b57cec5SDimitry Andric}
16980b57cec5SDimitry Andric
16990b57cec5SDimitry Andricdef ARMAsmParser : AsmParser {
17000b57cec5SDimitry Andric  bit ReportMultipleNearMisses = 1;
17010b57cec5SDimitry Andric}
17020b57cec5SDimitry Andric
17030b57cec5SDimitry Andricdef ARMAsmParserVariant : AsmParserVariant {
17040b57cec5SDimitry Andric  int Variant = 0;
17050b57cec5SDimitry Andric  string Name = "ARM";
17060b57cec5SDimitry Andric  string BreakCharacters = ".";
17070b57cec5SDimitry Andric}
17080b57cec5SDimitry Andric
17090b57cec5SDimitry Andricdef ARM : Target {
17100b57cec5SDimitry Andric  // Pull in Instruction Info.
17110b57cec5SDimitry Andric  let InstructionSet = ARMInstrInfo;
17120b57cec5SDimitry Andric  let AssemblyWriters = [ARMAsmWriter];
17130b57cec5SDimitry Andric  let AssemblyParsers = [ARMAsmParser];
17140b57cec5SDimitry Andric  let AssemblyParserVariants = [ARMAsmParserVariant];
17150b57cec5SDimitry Andric  let AllowRegisterRenaming = 1;
17160b57cec5SDimitry Andric}
1717