xref: /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ARM.td (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
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
23106c3fb27SDimitry Andric// Choice of hardware register to use as the thread pointer, if any.
23206c3fb27SDimitry Andricdef FeatureReadTpTPIDRURW :  SubtargetFeature<"read-tp-tpidrurw", "IsReadTPTPIDRURW", "true",
23306c3fb27SDimitry Andric                                      "Reading thread pointer from TPIDRURW register">;
23406c3fb27SDimitry Andricdef FeatureReadTpTPIDRURO :  SubtargetFeature<"read-tp-tpidruro", "IsReadTPTPIDRURO", "true",
23506c3fb27SDimitry Andric                                      "Reading thread pointer from TPIDRURO register">;
23606c3fb27SDimitry Andricdef FeatureReadTpTPIDRPRW :  SubtargetFeature<"read-tp-tpidrprw", "IsReadTPTPIDRPRW", "true",
23706c3fb27SDimitry Andric                                      "Reading thread pointer from TPIDRPRW register">;
2380b57cec5SDimitry Andric
2390b57cec5SDimitry Andric// Cyclone can zero VFP registers in 0 cycles.
24081ad6265SDimitry Andric// True if the instructions "vmov.i32 d0, #0" and "vmov.i32 q0, #0" are
24181ad6265SDimitry Andric// particularly effective at zeroing a VFP register.
2420b57cec5SDimitry Andricdef FeatureZCZeroing      : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
2430b57cec5SDimitry Andric                                             "Has zero-cycle zeroing instructions">;
2440b57cec5SDimitry Andric
24581ad6265SDimitry Andric// Whether it is profitable to unpredicate certain instructions during if-conversion.
24681ad6265SDimitry Andric// True if if conversion may decide to leave some instructions unpredicated.
2470b57cec5SDimitry Andricdef FeatureProfUnpredicate : SubtargetFeature<"prof-unpr",
2480b57cec5SDimitry Andric                                              "IsProfitableToUnpredicate", "true",
2490b57cec5SDimitry Andric                                              "Is profitable to unpredicate">;
2500b57cec5SDimitry Andric
2510b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VGETLNi32.
25281ad6265SDimitry Andric// True if VMOV will be favored over VGETLNi32.
2530b57cec5SDimitry Andricdef FeatureSlowVGETLNi32  : SubtargetFeature<"slow-vgetlni32",
2540b57cec5SDimitry Andric                                             "HasSlowVGETLNi32", "true",
2550b57cec5SDimitry Andric                                             "Has slow VGETLNi32 - prefer VMOV">;
2560b57cec5SDimitry Andric
2570b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VDUP32.
25881ad6265SDimitry Andric// True if VMOV will be favored over VDUP.
2590b57cec5SDimitry Andricdef FeatureSlowVDUP32     : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32",
2600b57cec5SDimitry Andric                                             "true",
2610b57cec5SDimitry Andric                                             "Has slow VDUP32 - prefer VMOV">;
2620b57cec5SDimitry Andric
2630b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON
2640b57cec5SDimitry Andric// for scalar FP, as this allows more effective execution domain optimization.
26581ad6265SDimitry Andric// True if VMOVSR will be favored over VMOVDRR.
2660b57cec5SDimitry Andricdef FeaturePreferVMOVSR   : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR",
2670b57cec5SDimitry Andric                                             "true", "Prefer VMOVSR">;
2680b57cec5SDimitry Andric
2690b57cec5SDimitry Andric// Swift has ISHST barriers compatible with Atomic Release semantics but weaker
27081ad6265SDimitry Andric// than ISH.
27181ad6265SDimitry Andric// True if ISHST barriers will be used for Release semantics.
27281ad6265SDimitry Andricdef FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHSTBarriers",
2730b57cec5SDimitry Andric                                               "true", "Prefer ISHST barriers">;
2740b57cec5SDimitry Andric
2750b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU.
27681ad6265SDimitry Andric// True if the AGU and NEON/FPU units are multiplexed.
2770b57cec5SDimitry Andricdef FeatureMuxedUnits     : SubtargetFeature<"muxed-units", "HasMuxedUnits",
2780b57cec5SDimitry Andric                                             "true",
2790b57cec5SDimitry Andric                                             "Has muxed AGU and NEON/FPU">;
2800b57cec5SDimitry Andric
2810b57cec5SDimitry Andric// Whether VLDM/VSTM starting with odd register number need more microops
28281ad6265SDimitry Andric// than single VLDRS.
28381ad6265SDimitry Andric// True if a VLDM/VSTM starting with an odd register number is considered to
28481ad6265SDimitry Andric// take more microops than single VLDRS/VSTRS.
28581ad6265SDimitry Andricdef FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "HasSlowOddRegister",
2860b57cec5SDimitry Andric                                              "true", "VLDM/VSTM starting "
2870b57cec5SDimitry Andric                                              "with an odd register is slow">;
2880b57cec5SDimitry Andric
2890b57cec5SDimitry Andric// Some targets have a renaming dependency when loading into D subregisters.
29081ad6265SDimitry Andric// True if loading into a D subregister will be penalized.
2910b57cec5SDimitry Andricdef FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg",
29281ad6265SDimitry Andric                                              "HasSlowLoadDSubregister", "true",
2930b57cec5SDimitry Andric                                              "Loading into D subregs is slow">;
2940b57cec5SDimitry Andric
29581ad6265SDimitry Andric// True if use a wider stride when allocating VFP registers.
2960b57cec5SDimitry Andricdef FeatureUseWideStrideVFP : SubtargetFeature<"wide-stride-vfp",
2970b57cec5SDimitry Andric                                               "UseWideStrideVFP", "true",
2980b57cec5SDimitry Andric                                               "Use a wide stride when allocating VFP registers">;
2990b57cec5SDimitry Andric
3000b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD.
30181ad6265SDimitry Andric// True if VMOVS will never be widened to VMOVD.
3020b57cec5SDimitry Andricdef FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs",
3030b57cec5SDimitry Andric                                             "DontWidenVMOVS", "true",
3040b57cec5SDimitry Andric                                             "Don't widen VMOVS to VMOVD">;
3050b57cec5SDimitry Andric
3060b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) prefer to avoid mixing operations on different
3070b57cec5SDimitry Andric// VFP register widths.
30881ad6265SDimitry Andric// True if splat a register between VFP and NEON instructions.
3090b57cec5SDimitry Andricdef FeatureSplatVFPToNeon : SubtargetFeature<"splat-vfp-neon",
31081ad6265SDimitry Andric                                             "UseSplatVFPToNeon", "true",
3110b57cec5SDimitry Andric                                             "Splat register from VFP to NEON",
3120b57cec5SDimitry Andric                                             [FeatureDontWidenVMOVS]>;
3130b57cec5SDimitry Andric
3140b57cec5SDimitry Andric// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions.
31581ad6265SDimitry Andric// True if run the MLx expansion pass.
3160b57cec5SDimitry Andricdef FeatureExpandMLx      : SubtargetFeature<"expand-fp-mlx",
3170b57cec5SDimitry Andric                                             "ExpandMLx", "true",
3180b57cec5SDimitry Andric                                             "Expand VFP/NEON MLA/MLS instructions">;
3190b57cec5SDimitry Andric
3200b57cec5SDimitry Andric// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS.
32181ad6265SDimitry Andric// True if VFP/NEON VMLA/VMLS have special RAW hazards.
3220b57cec5SDimitry Andricdef FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards",
3230b57cec5SDimitry Andric                                             "true", "Has VMLx hazards">;
3240b57cec5SDimitry Andric
3250b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from
3260b57cec5SDimitry Andric// VFP to NEON, as an execution domain optimization.
32781ad6265SDimitry Andric// True if VMOVRS, VMOVSR and VMOVS will be converted from VFP to NEON.
3280b57cec5SDimitry Andricdef FeatureNEONForFPMovs  : SubtargetFeature<"neon-fpmovs",
3290b57cec5SDimitry Andric                                             "UseNEONForFPMovs", "true",
3300b57cec5SDimitry Andric                                             "Convert VMOVSR, VMOVRS, "
3310b57cec5SDimitry Andric                                             "VMOVS to NEON">;
3320b57cec5SDimitry Andric
3330b57cec5SDimitry Andric// Some processors benefit from using NEON instructions for scalar
3340b57cec5SDimitry Andric// single-precision FP operations. This affects instruction selection and should
3350b57cec5SDimitry Andric// only be enabled if the handling of denormals is not important.
33681ad6265SDimitry Andric// Use the method useNEONForSinglePrecisionFP() to determine if NEON should actually be used.
3370b57cec5SDimitry Andricdef FeatureNEONForFP      : SubtargetFeature<"neonfp",
33881ad6265SDimitry Andric                                             "HasNEONForFP",
3390b57cec5SDimitry Andric                                             "true",
3400b57cec5SDimitry Andric                                             "Use NEON for single precision FP">;
3410b57cec5SDimitry Andric
3420b57cec5SDimitry Andric// On some processors, VLDn instructions that access unaligned data take one
3430b57cec5SDimitry Andric// extra cycle. Take that into account when computing operand latencies.
34481ad6265SDimitry Andric// True if VLDn instructions take an extra cycle for unaligned accesses.
34581ad6265SDimitry Andricdef FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAccessAlignment",
3460b57cec5SDimitry Andric                                             "true",
3470b57cec5SDimitry Andric                                             "Check for VLDn unaligned access">;
3480b57cec5SDimitry Andric
3490b57cec5SDimitry Andric// Some processors have a nonpipelined VFP coprocessor.
35081ad6265SDimitry Andric// True if VFP instructions are not pipelined.
3510b57cec5SDimitry Andricdef FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp",
3520b57cec5SDimitry Andric                                              "NonpipelinedVFP", "true",
3530b57cec5SDimitry Andric                                              "VFP instructions are not pipelined">;
3540b57cec5SDimitry Andric
3550b57cec5SDimitry Andric// Some processors have FP multiply-accumulate instructions that don't
3560b57cec5SDimitry Andric// play nicely with other VFP / NEON instructions, and it's generally better
3570b57cec5SDimitry Andric// to just not use them.
35881ad6265SDimitry Andric// If the VFP2 / NEON instructions are available, indicates
35981ad6265SDimitry Andric// whether the FP VML[AS] instructions are slow (if so, don't use them).
3600b57cec5SDimitry Andricdef FeatureHasSlowFPVMLx  : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true",
3610b57cec5SDimitry Andric                                             "Disable VFP / NEON MAC instructions">;
3620b57cec5SDimitry Andric
36381ad6265SDimitry Andric// VFPv4 added VFMA instructions that can similarly be fast or slow.
36481ad6265SDimitry Andric// If the VFP4 / NEON instructions are available, indicates
36581ad6265SDimitry Andric// whether the FP VFM[AS] instructions are slow (if so, don't use them).
366480093f4SDimitry Andricdef FeatureHasSlowFPVFMx  : SubtargetFeature<"slowfpvfmx", "SlowFPVFMx", "true",
367480093f4SDimitry Andric                                             "Disable VFP / NEON FMA instructions">;
368480093f4SDimitry Andric
3690b57cec5SDimitry Andric// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding.
37081ad6265SDimitry Andric/// True if NEON has special multiplier accumulator
37181ad6265SDimitry Andric/// forwarding to allow mul + mla being issued back to back.
3720b57cec5SDimitry Andricdef FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding",
3730b57cec5SDimitry Andric                                             "HasVMLxForwarding", "true",
3740b57cec5SDimitry Andric                                             "Has multiplier accumulator forwarding">;
3750b57cec5SDimitry Andric
3760b57cec5SDimitry Andric// Disable 32-bit to 16-bit narrowing for experimentation.
37781ad6265SDimitry Andric// True if codegen would prefer 32-bit Thumb instructions over 16-bit ones.
37881ad6265SDimitry Andricdef FeaturePref32BitThumb : SubtargetFeature<"32bit", "Prefers32BitThumb", "true",
3790b57cec5SDimitry Andric                                             "Prefer 32-bit Thumb instrs">;
3800b57cec5SDimitry Andric
3818bcb0991SDimitry Andricdef FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopLogAlignment","2",
3820b57cec5SDimitry Andric                                              "Prefer 32-bit alignment for loops">;
3830b57cec5SDimitry Andric
384753f127fSDimitry Andricdef FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "4",
3858bcb0991SDimitry Andric                        "Model MVE instructions as a 1 beat per tick architecture">;
3868bcb0991SDimitry Andric
3878bcb0991SDimitry Andricdef FeatureMVEVectorCostFactor2 : SubtargetFeature<"mve2beat", "MVEVectorCostFactor", "2",
3888bcb0991SDimitry Andric                        "Model MVE instructions as a 2 beats per tick architecture">;
3898bcb0991SDimitry Andric
390753f127fSDimitry Andricdef FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "1",
3918bcb0991SDimitry Andric                        "Model MVE instructions as a 4 beats per tick architecture">;
3928bcb0991SDimitry Andric
3930b57cec5SDimitry Andric/// Some instructions update CPSR partially, which can add false dependency for
3940b57cec5SDimitry Andric/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is
3950b57cec5SDimitry Andric/// mapped to a separate physical register. Avoid partial CPSR update for these
3960b57cec5SDimitry Andric/// processors.
39781ad6265SDimitry Andric/// True if codegen would avoid using instructions
39881ad6265SDimitry Andric/// that partially update CPSR and add false dependency on the previous
39981ad6265SDimitry Andric/// CPSR setting instruction.
4000b57cec5SDimitry Andricdef FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr",
4010b57cec5SDimitry Andric                                               "AvoidCPSRPartialUpdate", "true",
4020b57cec5SDimitry Andric                                 "Avoid CPSR partial update for OOO execution">;
4030b57cec5SDimitry Andric
4040b57cec5SDimitry Andric/// Disable +1 predication cost for instructions updating CPSR.
4050b57cec5SDimitry Andric/// Enabled for Cortex-A57.
40681ad6265SDimitry Andric/// True if disable +1 predication cost for instructions updating CPSR. Enabled for Cortex-A57.
4070b57cec5SDimitry Andricdef FeatureCheapPredicableCPSR : SubtargetFeature<"cheap-predicable-cpsr",
4080b57cec5SDimitry Andric                                                  "CheapPredicableCPSRDef",
4090b57cec5SDimitry Andric                                                  "true",
4100b57cec5SDimitry Andric                  "Disable +1 predication cost for instructions updating CPSR">;
4110b57cec5SDimitry Andric
41281ad6265SDimitry Andric// True if codegen should avoid using flag setting movs with shifter operand (i.e. asr, lsl, lsr).
4130b57cec5SDimitry Andricdef FeatureAvoidMOVsShOp  : SubtargetFeature<"avoid-movs-shop",
4140b57cec5SDimitry Andric                                             "AvoidMOVsShifterOperand", "true",
4150b57cec5SDimitry Andric                                             "Avoid movs instructions with "
4160b57cec5SDimitry Andric                                             "shifter operand">;
4170b57cec5SDimitry Andric
4180b57cec5SDimitry Andric// Some processors perform return stack prediction. CodeGen should avoid issue
4190b57cec5SDimitry Andric// "normal" call instructions to callees which do not return.
4200b57cec5SDimitry Andricdef FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack",
4210b57cec5SDimitry Andric                                              "HasRetAddrStack", "true",
4220b57cec5SDimitry Andric                                              "Has return address stack">;
4230b57cec5SDimitry Andric
4240b57cec5SDimitry Andric// Some processors have no branch predictor, which changes the expected cost of
4250b57cec5SDimitry Andric// taking a branch which affects the choice of whether to use predicated
4260b57cec5SDimitry Andric// instructions.
42781ad6265SDimitry Andric// True if the subtarget has a branch predictor. Having
42881ad6265SDimitry Andric// a branch predictor or not changes the expected cost of taking a branch
42981ad6265SDimitry Andric// which affects the choice of whether to use predicated instructions.
4300b57cec5SDimitry Andricdef FeatureHasNoBranchPredictor : SubtargetFeature<"no-branch-predictor",
4310b57cec5SDimitry Andric                                                   "HasBranchPredictor", "false",
4320b57cec5SDimitry Andric                                                   "Has no branch predictor">;
4330b57cec5SDimitry Andric
4340b57cec5SDimitry Andric/// DSP extension.
43581ad6265SDimitry Andric/// True if the subtarget supports the DSP (saturating arith and such) instructions.
4360b57cec5SDimitry Andricdef FeatureDSP            : SubtargetFeature<"dsp", "HasDSP", "true",
4370b57cec5SDimitry Andric                                             "Supports DSP instructions in "
4380b57cec5SDimitry Andric                                             "ARM and/or Thumb2">;
4390b57cec5SDimitry Andric
44081ad6265SDimitry Andric// True if the subtarget supports Multiprocessing extension (ARMv7 only).
4410b57cec5SDimitry Andricdef FeatureMP             : SubtargetFeature<"mp", "HasMPExtension", "true",
4420b57cec5SDimitry Andric                                        "Supports Multiprocessing extension">;
4430b57cec5SDimitry Andric
4440b57cec5SDimitry Andric// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8).
4450b57cec5SDimitry Andricdef FeatureVirtualization : SubtargetFeature<"virtualization",
4460b57cec5SDimitry Andric                                             "HasVirtualization", "true",
4470b57cec5SDimitry Andric                                             "Supports Virtualization extension",
4480b57cec5SDimitry Andric                                             [FeatureHWDivThumb, FeatureHWDivARM]>;
4490b57cec5SDimitry Andric
4500b57cec5SDimitry Andric// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too.
4510b57cec5SDimitry Andric// See ARMInstrInfo.td for details.
45281ad6265SDimitry Andric// True if NaCl TRAP instruction is generated instead of the regular TRAP.
4530b57cec5SDimitry Andricdef FeatureNaClTrap       : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true",
4540b57cec5SDimitry Andric                                             "NaCl trap">;
4550b57cec5SDimitry Andric
45681ad6265SDimitry Andric// True if the subtarget disallows unaligned memory
45781ad6265SDimitry Andric// accesses for some types.  For details, see
45881ad6265SDimitry Andric// ARMTargetLowering::allowsMisalignedMemoryAccesses().
4590b57cec5SDimitry Andricdef FeatureStrictAlign    : SubtargetFeature<"strict-align",
4600b57cec5SDimitry Andric                                             "StrictAlign", "true",
4610b57cec5SDimitry Andric                                             "Disallow all unaligned memory "
4620b57cec5SDimitry Andric                                             "access">;
4630b57cec5SDimitry Andric
46481ad6265SDimitry Andric// Generate calls via indirect call instructions.
4650b57cec5SDimitry Andricdef FeatureLongCalls      : SubtargetFeature<"long-calls", "GenLongCalls", "true",
4660b57cec5SDimitry Andric                                             "Generate calls via indirect call "
4670b57cec5SDimitry Andric                                             "instructions">;
4680b57cec5SDimitry Andric
46981ad6265SDimitry Andric// Generate code that does not contain data access to code sections.
4700b57cec5SDimitry Andricdef FeatureExecuteOnly    : SubtargetFeature<"execute-only",
4710b57cec5SDimitry Andric                                             "GenExecuteOnly", "true",
4720b57cec5SDimitry Andric                                             "Enable the generation of "
4730b57cec5SDimitry Andric                                             "execute only code.">;
4740b57cec5SDimitry Andric
47581ad6265SDimitry Andric// True if R9 is not available as a general purpose register.
4760b57cec5SDimitry Andricdef FeatureReserveR9      : SubtargetFeature<"reserve-r9", "ReserveR9", "true",
4770b57cec5SDimitry Andric                                             "Reserve R9, making it unavailable"
4780b57cec5SDimitry Andric                                             " as GPR">;
4790b57cec5SDimitry Andric
48081ad6265SDimitry Andric// True if MOVT / MOVW pairs are not used for materialization of
48181ad6265SDimitry Andric// 32-bit imms (including global addresses).
4820b57cec5SDimitry Andricdef FeatureNoMovt         : SubtargetFeature<"no-movt", "NoMovt", "true",
4830b57cec5SDimitry Andric                                             "Don't use movt/movw pairs for "
4840b57cec5SDimitry Andric                                             "32-bit imms">;
4850b57cec5SDimitry Andric
48681ad6265SDimitry Andric/// Implicitly convert an instruction to a different one if its immediates
48781ad6265SDimitry Andric/// cannot be encoded. For example, ADD r0, r1, #FFFFFFFF -> SUB r0, r1, #1.
4880b57cec5SDimitry Andricdef FeatureNoNegativeImmediates
4890b57cec5SDimitry Andric                          : SubtargetFeature<"no-neg-immediates",
4900b57cec5SDimitry Andric                                             "NegativeImmediates", "false",
4910b57cec5SDimitry Andric                                             "Convert immediates and instructions "
4920b57cec5SDimitry Andric                                             "to their negated or complemented "
4930b57cec5SDimitry Andric                                             "equivalent when the immediate does "
4940b57cec5SDimitry Andric                                             "not fit in the encoding.">;
4950b57cec5SDimitry Andric
4960b57cec5SDimitry Andric// Use the MachineScheduler for instruction scheduling for the subtarget.
4970b57cec5SDimitry Andricdef FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true",
4980b57cec5SDimitry Andric                                        "Use the MachineScheduler">;
4990b57cec5SDimitry Andric
50081ad6265SDimitry Andric// Use the MachinePipeliner for instruction scheduling for the subtarget.
50181ad6265SDimitry Andricdef FeatureUseMIPipeliner: SubtargetFeature<"use-mipipeliner", "UseMIPipeliner", "true",
50281ad6265SDimitry Andric                                            "Use the MachinePipeliner">;
50381ad6265SDimitry Andric
50481ad6265SDimitry Andric// False if scheduling should happen again after register allocation.
5050b57cec5SDimitry Andricdef FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler",
5060b57cec5SDimitry Andric    "DisablePostRAScheduler", "true",
5070b57cec5SDimitry Andric    "Don't schedule again after register allocation">;
5080b57cec5SDimitry Andric
5090b57cec5SDimitry Andric// Armv8.5-A extensions
5100b57cec5SDimitry Andric
51181ad6265SDimitry Andric// Has speculation barrier.
5120b57cec5SDimitry Andricdef FeatureSB       : SubtargetFeature<"sb", "HasSB", "true",
5130b57cec5SDimitry Andric  "Enable v8.5a Speculation Barrier" >;
5140b57cec5SDimitry Andric
5155ffd83dbSDimitry Andric// Armv8.6-A extensions
51681ad6265SDimitry Andric
51781ad6265SDimitry Andric// True if subtarget supports BFloat16 floating point operations.
5185ffd83dbSDimitry Andricdef FeatureBF16     : SubtargetFeature<"bf16", "HasBF16", "true",
5195ffd83dbSDimitry Andric  "Enable support for BFloat16 instructions",  [FeatureNEON]>;
5205ffd83dbSDimitry Andric
52181ad6265SDimitry Andric// True if subtarget supports 8-bit integer matrix multiply.
5225ffd83dbSDimitry Andricdef FeatureMatMulInt8 : SubtargetFeature<"i8mm", "HasMatMulInt8",
5235ffd83dbSDimitry Andric    "true", "Enable Matrix Multiply Int8 Extension", [FeatureNEON]>;
5245ffd83dbSDimitry Andric
5250b57cec5SDimitry Andric// Armv8.1-M extensions
5260b57cec5SDimitry Andric
52781ad6265SDimitry Andric// True if the processor supports the Low Overhead Branch extension.
5280b57cec5SDimitry Andricdef FeatureLOB            : SubtargetFeature<"lob", "HasLOB", "true",
5290b57cec5SDimitry Andric                                             "Enable Low Overhead Branch "
5300b57cec5SDimitry Andric                                             "extensions">;
5310b57cec5SDimitry Andric
53281ad6265SDimitry Andric// Mitigate against the cve-2021-35465 security vulnurability.
533349cc55cSDimitry Andricdef FeatureFixCMSE_CVE_2021_35465 : SubtargetFeature<"fix-cmse-cve-2021-35465",
534349cc55cSDimitry Andric                                        "FixCMSE_CVE_2021_35465", "true",
535349cc55cSDimitry Andric                                        "Mitigate against the cve-2021-35465 "
536349cc55cSDimitry Andric                                        "security vulnurability">;
537349cc55cSDimitry Andric
5384824e7fdSDimitry Andricdef FeaturePACBTI         : SubtargetFeature<"pacbti", "HasPACBTI", "true",
5394824e7fdSDimitry Andric                                             "Enable Pointer Authentication and Branch "
5404824e7fdSDimitry Andric                                             "Target Identification">;
5414824e7fdSDimitry Andric
54281ad6265SDimitry Andric/// Don't place a BTI instruction after return-twice constructs (setjmp).
5430eae32dcSDimitry Andricdef FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice",
5440eae32dcSDimitry Andric                                                 "NoBTIAtReturnTwice", "true",
5450eae32dcSDimitry Andric                                                 "Don't place a BTI instruction "
5460eae32dcSDimitry Andric                                                 "after a return-twice">;
5470eae32dcSDimitry Andric
548bdd1243dSDimitry Andric// Armv8.9-A/Armv9.4-A 2022 Architecture Extensions
549bdd1243dSDimitry Andricdef FeatureCLRBHB : SubtargetFeature<"clrbhb", "HasCLRBHB", "true",
550bdd1243dSDimitry Andric                                     "Enable Clear BHB instruction">;
551bdd1243dSDimitry Andric
552bdd1243dSDimitry Andric
55381ad6265SDimitry Andricdef FeatureFixCortexA57AES1742098 : SubtargetFeature<"fix-cortex-a57-aes-1742098",
55481ad6265SDimitry Andric  "FixCortexA57AES1742098", "true",
55581ad6265SDimitry Andric  "Work around Cortex-A57 Erratum 1742098 / Cortex-A72 Erratum 1655431 (AES)">;
55681ad6265SDimitry Andric
55781ad6265SDimitry Andricdef FeatureAAPCSFrameChain : SubtargetFeature<"aapcs-frame-chain",
55881ad6265SDimitry Andric                                              "CreateAAPCSFrameChain", "true",
55981ad6265SDimitry Andric                                              "Create an AAPCS compliant frame chain">;
56081ad6265SDimitry Andric
56181ad6265SDimitry Andricdef FeatureAAPCSFrameChainLeaf : SubtargetFeature<"aapcs-frame-chain-leaf",
56281ad6265SDimitry Andric                                                  "CreateAAPCSFrameChainLeaf", "true",
56381ad6265SDimitry Andric                                                  "Create an AAPCS compliant frame chain "
56481ad6265SDimitry Andric                                                  "for leaf functions",
56581ad6265SDimitry Andric                                                  [FeatureAAPCSFrameChain]>;
56681ad6265SDimitry Andric
56761cfbce3SDimitry Andric// Assume that lock-free 32-bit atomics are available, even if the target
56861cfbce3SDimitry Andric// and operating system combination would not usually provide them. The user
56961cfbce3SDimitry Andric// is responsible for providing any necessary __sync implementations. Code
57061cfbce3SDimitry Andric// built with this feature is not ABI-compatible with code built without this
57161cfbce3SDimitry Andric// feature, if atomic variables are exposed across the ABI boundary.
57261cfbce3SDimitry Andricdef FeatureAtomics32 : SubtargetFeature<
57361cfbce3SDimitry Andric    "atomics-32", "HasForced32BitAtomics", "true",
57461cfbce3SDimitry Andric    "Assume that lock-free 32-bit atomics are available">;
57561cfbce3SDimitry Andric
5760b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5770b57cec5SDimitry Andric// ARM architecture class
5780b57cec5SDimitry Andric//
5790b57cec5SDimitry Andric
5800b57cec5SDimitry Andric// A-series ISA
5810b57cec5SDimitry Andricdef FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass",
5820b57cec5SDimitry Andric                                     "Is application profile ('A' series)">;
5830b57cec5SDimitry Andric
5840b57cec5SDimitry Andric// R-series ISA
5850b57cec5SDimitry Andricdef FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass",
5860b57cec5SDimitry Andric                                     "Is realtime profile ('R' series)">;
5870b57cec5SDimitry Andric
5880b57cec5SDimitry Andric// M-series ISA
5890b57cec5SDimitry Andricdef FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass",
5900b57cec5SDimitry Andric                                     "Is microcontroller profile ('M' series)">;
5910b57cec5SDimitry Andric
59281ad6265SDimitry Andric// True if Thumb2 instructions are supported.
5930b57cec5SDimitry Andricdef FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true",
5940b57cec5SDimitry Andric                                     "Enable Thumb2 instructions">;
5950b57cec5SDimitry Andric
59681ad6265SDimitry Andric// True if subtarget does not support ARM mode execution.
5970b57cec5SDimitry Andricdef FeatureNoARM  : SubtargetFeature<"noarm", "NoARM", "true",
5980b57cec5SDimitry Andric                                     "Does not support ARM mode execution">;
5990b57cec5SDimitry Andric
6000b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
6010b57cec5SDimitry Andric// ARM ISAa.
6020b57cec5SDimitry Andric//
60381ad6265SDimitry Andric// Specify whether target support specific ARM ISA variants.
6040b57cec5SDimitry Andric
6050b57cec5SDimitry Andricdef HasV4TOps   : SubtargetFeature<"v4t", "HasV4TOps", "true",
6060b57cec5SDimitry Andric                                   "Support ARM v4T instructions">;
6070b57cec5SDimitry Andric
6080b57cec5SDimitry Andricdef HasV5TOps   : SubtargetFeature<"v5t", "HasV5TOps", "true",
6090b57cec5SDimitry Andric                                   "Support ARM v5T instructions",
6100b57cec5SDimitry Andric                                   [HasV4TOps]>;
6110b57cec5SDimitry Andric
6120b57cec5SDimitry Andricdef HasV5TEOps  : SubtargetFeature<"v5te", "HasV5TEOps", "true",
6130b57cec5SDimitry Andric                                   "Support ARM v5TE, v5TEj, and "
6140b57cec5SDimitry Andric                                   "v5TExp instructions",
6150b57cec5SDimitry Andric                                   [HasV5TOps]>;
6160b57cec5SDimitry Andric
6170b57cec5SDimitry Andricdef HasV6Ops    : SubtargetFeature<"v6", "HasV6Ops", "true",
6180b57cec5SDimitry Andric                                   "Support ARM v6 instructions",
6190b57cec5SDimitry Andric                                   [HasV5TEOps]>;
6200b57cec5SDimitry Andric
6210b57cec5SDimitry Andricdef HasV6MOps   : SubtargetFeature<"v6m", "HasV6MOps", "true",
6220b57cec5SDimitry Andric                                   "Support ARM v6M instructions",
6230b57cec5SDimitry Andric                                   [HasV6Ops]>;
6240b57cec5SDimitry Andric
6250b57cec5SDimitry Andricdef HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true",
6260b57cec5SDimitry Andric                                         "Support ARM v8M Baseline instructions",
6270b57cec5SDimitry Andric                                         [HasV6MOps]>;
6280b57cec5SDimitry Andric
6290b57cec5SDimitry Andricdef HasV6KOps   : SubtargetFeature<"v6k", "HasV6KOps", "true",
6300b57cec5SDimitry Andric                                   "Support ARM v6k instructions",
6310b57cec5SDimitry Andric                                   [HasV6Ops]>;
6320b57cec5SDimitry Andric
6330b57cec5SDimitry Andricdef HasV6T2Ops  : SubtargetFeature<"v6t2", "HasV6T2Ops", "true",
6340b57cec5SDimitry Andric                                   "Support ARM v6t2 instructions",
6350b57cec5SDimitry Andric                                   [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>;
6360b57cec5SDimitry Andric
6370b57cec5SDimitry Andricdef HasV7Ops    : SubtargetFeature<"v7", "HasV7Ops", "true",
6380b57cec5SDimitry Andric                                   "Support ARM v7 instructions",
63904eeddc0SDimitry Andric                                   [HasV6T2Ops, FeatureV7Clrex]>;
6400b57cec5SDimitry Andric
6410b57cec5SDimitry Andricdef HasV8MMainlineOps :
6420b57cec5SDimitry Andric                  SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true",
6430b57cec5SDimitry Andric                                   "Support ARM v8M Mainline instructions",
6440b57cec5SDimitry Andric                                   [HasV7Ops]>;
6450b57cec5SDimitry Andric
6460b57cec5SDimitry Andricdef HasV8Ops    : SubtargetFeature<"v8", "HasV8Ops", "true",
6470b57cec5SDimitry Andric                                   "Support ARM v8 instructions",
64804eeddc0SDimitry Andric                                   [HasV7Ops, FeaturePerfMon, FeatureAcquireRelease]>;
6490b57cec5SDimitry Andric
6500b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
6510b57cec5SDimitry Andric                                   "Support ARM v8.1a instructions",
6520b57cec5SDimitry Andric                                   [HasV8Ops]>;
6530b57cec5SDimitry Andric
6540b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
6550b57cec5SDimitry Andric                                   "Support ARM v8.2a instructions",
6560b57cec5SDimitry Andric                                   [HasV8_1aOps]>;
6570b57cec5SDimitry Andric
6580b57cec5SDimitry Andricdef HasV8_3aOps   : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true",
6590b57cec5SDimitry Andric                                   "Support ARM v8.3a instructions",
6600b57cec5SDimitry Andric                                   [HasV8_2aOps]>;
6610b57cec5SDimitry Andric
6620b57cec5SDimitry Andricdef HasV8_4aOps   : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true",
6630b57cec5SDimitry Andric                                   "Support ARM v8.4a instructions",
6640b57cec5SDimitry Andric                                   [HasV8_3aOps, FeatureDotProd]>;
6650b57cec5SDimitry Andric
6660b57cec5SDimitry Andricdef HasV8_5aOps   : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true",
6670b57cec5SDimitry Andric                                   "Support ARM v8.5a instructions",
6680b57cec5SDimitry Andric                                   [HasV8_4aOps, FeatureSB]>;
6690b57cec5SDimitry Andric
6705ffd83dbSDimitry Andricdef HasV8_6aOps   : SubtargetFeature<"v8.6a", "HasV8_6aOps", "true",
6715ffd83dbSDimitry Andric                                   "Support ARM v8.6a instructions",
6725ffd83dbSDimitry Andric                                   [HasV8_5aOps, FeatureBF16,
6735ffd83dbSDimitry Andric                                    FeatureMatMulInt8]>;
6745ffd83dbSDimitry Andric
675e8d8bef9SDimitry Andricdef HasV8_7aOps   : SubtargetFeature<"v8.7a", "HasV8_7aOps", "true",
676e8d8bef9SDimitry Andric                                   "Support ARM v8.7a instructions",
677e8d8bef9SDimitry Andric                                   [HasV8_6aOps]>;
678e8d8bef9SDimitry Andric
67904eeddc0SDimitry Andricdef HasV8_8aOps   : SubtargetFeature<"v8.8a", "HasV8_8aOps", "true",
68004eeddc0SDimitry Andric                                   "Support ARM v8.8a instructions",
68104eeddc0SDimitry Andric                                   [HasV8_7aOps]>;
68204eeddc0SDimitry Andric
683bdd1243dSDimitry Andricdef HasV8_9aOps   : SubtargetFeature<"v8.9a", "HasV8_9aOps", "true",
684bdd1243dSDimitry Andric                                   "Support ARM v8.9a instructions",
685bdd1243dSDimitry Andric                                   [HasV8_8aOps, FeatureCLRBHB]>;
686bdd1243dSDimitry Andric
687349cc55cSDimitry Andricdef HasV9_0aOps   : SubtargetFeature<"v9a", "HasV9_0aOps", "true",
688349cc55cSDimitry Andric                                   "Support ARM v9a instructions",
689349cc55cSDimitry Andric                                   [HasV8_5aOps]>;
690349cc55cSDimitry Andric
691349cc55cSDimitry Andricdef HasV9_1aOps   : SubtargetFeature<"v9.1a", "HasV9_1aOps", "true",
692349cc55cSDimitry Andric                                   "Support ARM v9.1a instructions",
693349cc55cSDimitry Andric                                   [HasV8_6aOps, HasV9_0aOps]>;
694349cc55cSDimitry Andric
695349cc55cSDimitry Andricdef HasV9_2aOps   : SubtargetFeature<"v9.2a", "HasV9_2aOps", "true",
696349cc55cSDimitry Andric                                   "Support ARM v9.2a instructions",
697349cc55cSDimitry Andric                                   [HasV8_7aOps, HasV9_1aOps]>;
698349cc55cSDimitry Andric
69904eeddc0SDimitry Andricdef HasV9_3aOps   : SubtargetFeature<"v9.3a", "HasV9_3aOps", "true",
70004eeddc0SDimitry Andric                                   "Support ARM v9.3a instructions",
70104eeddc0SDimitry Andric                                   [HasV8_8aOps, HasV9_2aOps]>;
70204eeddc0SDimitry Andric
703bdd1243dSDimitry Andricdef HasV9_4aOps   : SubtargetFeature<"v9.4a", "HasV9_4aOps", "true",
704bdd1243dSDimitry Andric                                   "Support ARM v9.4a instructions",
705bdd1243dSDimitry Andric                                   [HasV8_9aOps, HasV9_3aOps]>;
706bdd1243dSDimitry Andric
7070b57cec5SDimitry Andricdef HasV8_1MMainlineOps : SubtargetFeature<
7080b57cec5SDimitry Andric               "v8.1m.main", "HasV8_1MMainlineOps", "true",
7090b57cec5SDimitry Andric               "Support ARM v8-1M Mainline instructions",
7100b57cec5SDimitry Andric               [HasV8MMainlineOps]>;
7110b57cec5SDimitry Andricdef HasMVEIntegerOps : SubtargetFeature<
7120b57cec5SDimitry Andric               "mve", "HasMVEIntegerOps", "true",
7130b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer ops",
7140b57cec5SDimitry Andric               [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>;
7150b57cec5SDimitry Andricdef HasMVEFloatOps : SubtargetFeature<
7160b57cec5SDimitry Andric               "mve.fp", "HasMVEFloatOps", "true",
7170b57cec5SDimitry Andric               "Support M-Class Vector Extension with integer and floating ops",
7180b57cec5SDimitry Andric               [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>;
7190b57cec5SDimitry Andric
7205ffd83dbSDimitry Andricdef HasCDEOps : SubtargetFeature<"cde", "HasCDEOps", "true",
7215ffd83dbSDimitry Andric                                 "Support CDE instructions",
7225ffd83dbSDimitry Andric                                 [HasV8MMainlineOps]>;
7235ffd83dbSDimitry Andric
7245ffd83dbSDimitry Andricforeach i = {0-7} in
7255ffd83dbSDimitry Andric    def FeatureCoprocCDE#i : SubtargetFeature<"cdecp"#i,
7265ffd83dbSDimitry Andric                                              "CoprocCDE["#i#"]", "true",
7275ffd83dbSDimitry Andric                                              "Coprocessor "#i#" ISA is CDEv1",
7285ffd83dbSDimitry Andric                                              [HasCDEOps]>;
7295ffd83dbSDimitry Andric
7300b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
731e8d8bef9SDimitry Andric// Control codegen mitigation against Straight Line Speculation vulnerability.
732e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
733e8d8bef9SDimitry Andric
73481ad6265SDimitry Andric/// Harden against Straight Line Speculation for Returns and Indirect Branches.
735e8d8bef9SDimitry Andricdef FeatureHardenSlsRetBr : SubtargetFeature<"harden-sls-retbr",
736e8d8bef9SDimitry Andric  "HardenSlsRetBr", "true",
737e8d8bef9SDimitry Andric  "Harden against straight line speculation across RETurn and BranchRegister "
738e8d8bef9SDimitry Andric  "instructions">;
73981ad6265SDimitry Andric/// Harden against Straight Line Speculation for indirect calls.
740e8d8bef9SDimitry Andricdef FeatureHardenSlsBlr : SubtargetFeature<"harden-sls-blr",
741e8d8bef9SDimitry Andric  "HardenSlsBlr", "true",
742e8d8bef9SDimitry Andric  "Harden against straight line speculation across indirect calls">;
74381ad6265SDimitry Andric/// Generate thunk code for SLS mitigation in the normal text section.
744fe6060f1SDimitry Andricdef FeatureHardenSlsNoComdat : SubtargetFeature<"harden-sls-nocomdat",
745fe6060f1SDimitry Andric  "HardenSlsNoComdat", "true",
746fe6060f1SDimitry Andric  "Generate thunk code for SLS mitigation in the normal text section">;
747e8d8bef9SDimitry Andric
748e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
749bdd1243dSDimitry Andric// Endianness of instruction encodings in memory.
750bdd1243dSDimitry Andric//
751bdd1243dSDimitry Andric// In the current Arm architecture, this is usually little-endian regardless of
752bdd1243dSDimitry Andric// data endianness. But before Armv7 it was typical for instruction endianness
753bdd1243dSDimitry Andric// to match data endianness, so that a big-endian system was consistently big-
754bdd1243dSDimitry Andric// endian. And Armv7-R can be configured to use big-endian instructions.
755bdd1243dSDimitry Andric//
756bdd1243dSDimitry Andric// Additionally, even when targeting Armv7-A, big-endian instructions can be
757bdd1243dSDimitry Andric// found in relocatable object files, because the Arm ABI specifies that the
758bdd1243dSDimitry Andric// linker byte-reverses them depending on the target architecture.
759bdd1243dSDimitry Andric//
760bdd1243dSDimitry Andric// So we have a feature here to indicate that instructions are stored big-
761bdd1243dSDimitry Andric// endian, which you can set when instantiating an MCDisassembler.
762bdd1243dSDimitry Andricdef ModeBigEndianInstructions : SubtargetFeature<"big-endian-instructions",
763bdd1243dSDimitry Andric    "BigEndianInstructions", "true",
764bdd1243dSDimitry Andric     "Expect instructions to be stored big-endian.">;
765bdd1243dSDimitry Andric
766bdd1243dSDimitry Andric//===----------------------------------------------------------------------===//
7670b57cec5SDimitry Andric// ARM Processor subtarget features.
7680b57cec5SDimitry Andric//
7690b57cec5SDimitry Andric
7700b57cec5SDimitry Andricdef ProcA5      : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5",
7710b57cec5SDimitry Andric                                   "Cortex-A5 ARM processors", []>;
7720b57cec5SDimitry Andricdef ProcA7      : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7",
7730b57cec5SDimitry Andric                                   "Cortex-A7 ARM processors", []>;
7740b57cec5SDimitry Andricdef ProcA8      : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8",
7750b57cec5SDimitry Andric                                   "Cortex-A8 ARM processors", []>;
7760b57cec5SDimitry Andricdef ProcA9      : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9",
7770b57cec5SDimitry Andric                                   "Cortex-A9 ARM processors", []>;
7780b57cec5SDimitry Andricdef ProcA12     : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12",
7790b57cec5SDimitry Andric                                   "Cortex-A12 ARM processors", []>;
7800b57cec5SDimitry Andricdef ProcA15     : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15",
7810b57cec5SDimitry Andric                                   "Cortex-A15 ARM processors", []>;
7820b57cec5SDimitry Andricdef ProcA17     : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17",
7830b57cec5SDimitry Andric                                   "Cortex-A17 ARM processors", []>;
7840b57cec5SDimitry Andricdef ProcA32     : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32",
7850b57cec5SDimitry Andric                                   "Cortex-A32 ARM processors", []>;
7860b57cec5SDimitry Andricdef ProcA35     : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
7870b57cec5SDimitry Andric                                   "Cortex-A35 ARM processors", []>;
7880b57cec5SDimitry Andricdef ProcA53     : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
7890b57cec5SDimitry Andric                                   "Cortex-A53 ARM processors", []>;
7900b57cec5SDimitry Andricdef ProcA55     : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
7910b57cec5SDimitry Andric                                   "Cortex-A55 ARM processors", []>;
7920b57cec5SDimitry Andricdef ProcA57     : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
7930b57cec5SDimitry Andric                                   "Cortex-A57 ARM processors", []>;
7940b57cec5SDimitry Andricdef ProcA72     : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
7950b57cec5SDimitry Andric                                   "Cortex-A72 ARM processors", []>;
7960b57cec5SDimitry Andricdef ProcA73     : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
7970b57cec5SDimitry Andric                                   "Cortex-A73 ARM processors", []>;
7980b57cec5SDimitry Andricdef ProcA75     : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
7990b57cec5SDimitry Andric                                   "Cortex-A75 ARM processors", []>;
8000b57cec5SDimitry Andricdef ProcA76     : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
8010b57cec5SDimitry Andric                                   "Cortex-A76 ARM processors", []>;
8025ffd83dbSDimitry Andricdef ProcA77     : SubtargetFeature<"a77", "ARMProcFamily", "CortexA77",
8035ffd83dbSDimitry Andric                                   "Cortex-A77 ARM processors", []>;
8045ffd83dbSDimitry Andricdef ProcA78     : SubtargetFeature<"cortex-a78", "ARMProcFamily", "CortexA78",
8055ffd83dbSDimitry Andric                                   "Cortex-A78 ARM processors", []>;
806e8d8bef9SDimitry Andricdef ProcA78C    : SubtargetFeature<"a78c", "ARMProcFamily", "CortexA78C",
807e8d8bef9SDimitry Andric                                   "Cortex-A78C ARM processors", []>;
808349cc55cSDimitry Andricdef ProcA710    : SubtargetFeature<"cortex-a710", "ARMProcFamily",
809349cc55cSDimitry Andric                                   "CortexA710", "Cortex-A710 ARM processors", []>;
8105ffd83dbSDimitry Andricdef ProcX1      : SubtargetFeature<"cortex-x1", "ARMProcFamily", "CortexX1",
8115ffd83dbSDimitry Andric                                   "Cortex-X1 ARM processors", []>;
8121fd87a68SDimitry Andricdef ProcX1C     : SubtargetFeature<"cortex-x1c", "ARMProcFamily", "CortexX1C",
8131fd87a68SDimitry Andric                                   "Cortex-X1C ARM processors", []>;
8140b57cec5SDimitry Andric
815e8d8bef9SDimitry Andricdef ProcV1      : SubtargetFeature<"neoverse-v1", "ARMProcFamily",
816e8d8bef9SDimitry Andric                                   "NeoverseV1", "Neoverse-V1 ARM processors", []>;
817e8d8bef9SDimitry Andric
8180b57cec5SDimitry Andricdef ProcKrait   : SubtargetFeature<"krait", "ARMProcFamily", "Krait",
8190b57cec5SDimitry Andric                                   "Qualcomm Krait processors", []>;
8200b57cec5SDimitry Andricdef ProcKryo    : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
8210b57cec5SDimitry Andric                                   "Qualcomm Kryo processors", []>;
8220b57cec5SDimitry Andricdef ProcSwift   : SubtargetFeature<"swift", "ARMProcFamily", "Swift",
8230b57cec5SDimitry Andric                                   "Swift ARM processors", []>;
8240b57cec5SDimitry Andric
8250b57cec5SDimitry Andricdef ProcExynos  : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos",
8260b57cec5SDimitry Andric                                   "Samsung Exynos processors",
8270b57cec5SDimitry Andric                                   [FeatureZCZeroing,
8280b57cec5SDimitry Andric                                    FeatureUseWideStrideVFP,
8290b57cec5SDimitry Andric                                    FeatureSplatVFPToNeon,
8300b57cec5SDimitry Andric                                    FeatureSlowVGETLNi32,
8310b57cec5SDimitry Andric                                    FeatureSlowVDUP32,
8320b57cec5SDimitry Andric                                    FeatureSlowFPBrcc,
8330b57cec5SDimitry Andric                                    FeatureProfUnpredicate,
8340b57cec5SDimitry Andric                                    FeatureHWDivThumb,
8350b57cec5SDimitry Andric                                    FeatureHWDivARM,
8360b57cec5SDimitry Andric                                    FeatureHasSlowFPVMLx,
837480093f4SDimitry Andric                                    FeatureHasSlowFPVFMx,
8380b57cec5SDimitry Andric                                    FeatureHasRetAddrStack,
8390b57cec5SDimitry Andric                                    FeatureFuseLiterals,
8400b57cec5SDimitry Andric                                    FeatureFuseAES,
8410b57cec5SDimitry Andric                                    FeatureExpandMLx,
8420b57cec5SDimitry Andric                                    FeatureCrypto,
8430b57cec5SDimitry Andric                                    FeatureCRC]>;
8440b57cec5SDimitry Andric
8450b57cec5SDimitry Andricdef ProcR4      : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4",
8460b57cec5SDimitry Andric                                   "Cortex-R4 ARM processors", []>;
8470b57cec5SDimitry Andricdef ProcR5      : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5",
8480b57cec5SDimitry Andric                                   "Cortex-R5 ARM processors", []>;
8490b57cec5SDimitry Andricdef ProcR7      : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7",
8500b57cec5SDimitry Andric                                   "Cortex-R7 ARM processors", []>;
8510b57cec5SDimitry Andricdef ProcR52     : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52",
8520b57cec5SDimitry Andric                                   "Cortex-R52 ARM processors", []>;
8530b57cec5SDimitry Andric
8540b57cec5SDimitry Andricdef ProcM3      : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3",
8550b57cec5SDimitry Andric                                   "Cortex-M3 ARM processors", []>;
856e8d8bef9SDimitry Andricdef ProcM7      : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7",
857e8d8bef9SDimitry Andric                                   "Cortex-M7 ARM processors", []>;
8580b57cec5SDimitry Andric
8590b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8600b57cec5SDimitry Andric// ARM Helper classes.
8610b57cec5SDimitry Andric//
8620b57cec5SDimitry Andric
8630b57cec5SDimitry Andricclass Architecture<string fname, string aname, list<SubtargetFeature> features>
8640b57cec5SDimitry Andric  : SubtargetFeature<fname, "ARMArch", aname,
8650b57cec5SDimitry Andric                     !strconcat(aname, " architecture"), features>;
8660b57cec5SDimitry Andric
8670b57cec5SDimitry Andricclass ProcNoItin<string Name, list<SubtargetFeature> Features>
8680b57cec5SDimitry Andric  : Processor<Name, NoItineraries, Features>;
8690b57cec5SDimitry Andric
8700b57cec5SDimitry Andric
8710b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8720b57cec5SDimitry Andric// ARM architectures
8730b57cec5SDimitry Andric//
8740b57cec5SDimitry Andric
8750b57cec5SDimitry Andricdef ARMv4     : Architecture<"armv4",     "ARMv4",    []>;
8760b57cec5SDimitry Andric
8770b57cec5SDimitry Andricdef ARMv4t    : Architecture<"armv4t",    "ARMv4t",   [HasV4TOps]>;
8780b57cec5SDimitry Andric
8790b57cec5SDimitry Andricdef ARMv5t    : Architecture<"armv5t",    "ARMv5t",   [HasV5TOps]>;
8800b57cec5SDimitry Andric
8810b57cec5SDimitry Andricdef ARMv5te   : Architecture<"armv5te",   "ARMv5te",  [HasV5TEOps]>;
8820b57cec5SDimitry Andric
8830b57cec5SDimitry Andricdef ARMv5tej  : Architecture<"armv5tej",  "ARMv5tej", [HasV5TEOps]>;
8840b57cec5SDimitry Andric
8850b57cec5SDimitry Andricdef ARMv6     : Architecture<"armv6",     "ARMv6",    [HasV6Ops,
8860b57cec5SDimitry Andric                                                       FeatureDSP]>;
8870b57cec5SDimitry Andric
8880b57cec5SDimitry Andricdef ARMv6t2   : Architecture<"armv6t2",   "ARMv6t2",  [HasV6T2Ops,
8890b57cec5SDimitry Andric                                                       FeatureDSP]>;
8900b57cec5SDimitry Andric
8910b57cec5SDimitry Andricdef ARMv6k    : Architecture<"armv6k",    "ARMv6k",   [HasV6KOps]>;
8920b57cec5SDimitry Andric
8930b57cec5SDimitry Andricdef ARMv6kz   : Architecture<"armv6kz",   "ARMv6kz",  [HasV6KOps,
8940b57cec5SDimitry Andric                                                       FeatureTrustZone]>;
8950b57cec5SDimitry Andric
8960b57cec5SDimitry Andricdef ARMv6m    : Architecture<"armv6-m",   "ARMv6m",   [HasV6MOps,
8970b57cec5SDimitry Andric                                                       FeatureNoARM,
8980b57cec5SDimitry Andric                                                       ModeThumb,
8990b57cec5SDimitry Andric                                                       FeatureDB,
9000b57cec5SDimitry Andric                                                       FeatureMClass,
9010b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
9020b57cec5SDimitry Andric
9030b57cec5SDimitry Andricdef ARMv6sm   : Architecture<"armv6s-m",  "ARMv6sm",  [HasV6MOps,
9040b57cec5SDimitry Andric                                                       FeatureNoARM,
9050b57cec5SDimitry Andric                                                       ModeThumb,
9060b57cec5SDimitry Andric                                                       FeatureDB,
9070b57cec5SDimitry Andric                                                       FeatureMClass,
9080b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
9090b57cec5SDimitry Andric
9100b57cec5SDimitry Andricdef ARMv7a    : Architecture<"armv7-a",   "ARMv7a",   [HasV7Ops,
9110b57cec5SDimitry Andric                                                       FeatureNEON,
9120b57cec5SDimitry Andric                                                       FeatureDB,
9130b57cec5SDimitry Andric                                                       FeatureDSP,
91404eeddc0SDimitry Andric                                                       FeatureAClass,
91504eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9160b57cec5SDimitry Andric
9170b57cec5SDimitry Andricdef ARMv7ve   : Architecture<"armv7ve",   "ARMv7ve",  [HasV7Ops,
9180b57cec5SDimitry Andric                                                       FeatureNEON,
9190b57cec5SDimitry Andric                                                       FeatureDB,
9200b57cec5SDimitry Andric                                                       FeatureDSP,
9210b57cec5SDimitry Andric                                                       FeatureTrustZone,
9220b57cec5SDimitry Andric                                                       FeatureMP,
9230b57cec5SDimitry Andric                                                       FeatureVirtualization,
92404eeddc0SDimitry Andric                                                       FeatureAClass,
92504eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9260b57cec5SDimitry Andric
9270b57cec5SDimitry Andricdef ARMv7r    : Architecture<"armv7-r",   "ARMv7r",   [HasV7Ops,
9280b57cec5SDimitry Andric                                                       FeatureDB,
9290b57cec5SDimitry Andric                                                       FeatureDSP,
9300b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
93104eeddc0SDimitry Andric                                                       FeatureRClass,
93204eeddc0SDimitry Andric                                                       FeaturePerfMon]>;
9330b57cec5SDimitry Andric
9340b57cec5SDimitry Andricdef ARMv7m    : Architecture<"armv7-m",   "ARMv7m",   [HasV7Ops,
9350b57cec5SDimitry Andric                                                       FeatureThumb2,
9360b57cec5SDimitry Andric                                                       FeatureNoARM,
9370b57cec5SDimitry Andric                                                       ModeThumb,
9380b57cec5SDimitry Andric                                                       FeatureDB,
9390b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
9400b57cec5SDimitry Andric                                                       FeatureMClass]>;
9410b57cec5SDimitry Andric
9420b57cec5SDimitry Andricdef ARMv7em   : Architecture<"armv7e-m",  "ARMv7em",  [HasV7Ops,
9430b57cec5SDimitry Andric                                                       FeatureThumb2,
9440b57cec5SDimitry Andric                                                       FeatureNoARM,
9450b57cec5SDimitry Andric                                                       ModeThumb,
9460b57cec5SDimitry Andric                                                       FeatureDB,
9470b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
9480b57cec5SDimitry Andric                                                       FeatureMClass,
9490b57cec5SDimitry Andric                                                       FeatureDSP]>;
9500b57cec5SDimitry Andric
9510b57cec5SDimitry Andricdef ARMv8a    : Architecture<"armv8-a",   "ARMv8a",   [HasV8Ops,
9520b57cec5SDimitry Andric                                                       FeatureAClass,
9530b57cec5SDimitry Andric                                                       FeatureDB,
9540b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9550b57cec5SDimitry Andric                                                       FeatureNEON,
9560b57cec5SDimitry Andric                                                       FeatureDSP,
9570b57cec5SDimitry Andric                                                       FeatureTrustZone,
9580b57cec5SDimitry Andric                                                       FeatureMP,
9590b57cec5SDimitry Andric                                                       FeatureVirtualization,
9600b57cec5SDimitry Andric                                                       FeatureCrypto,
9610b57cec5SDimitry Andric                                                       FeatureCRC]>;
9620b57cec5SDimitry Andric
9630b57cec5SDimitry Andricdef ARMv81a   : Architecture<"armv8.1-a", "ARMv81a",  [HasV8_1aOps,
9640b57cec5SDimitry Andric                                                       FeatureAClass,
9650b57cec5SDimitry Andric                                                       FeatureDB,
9660b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9670b57cec5SDimitry Andric                                                       FeatureNEON,
9680b57cec5SDimitry Andric                                                       FeatureDSP,
9690b57cec5SDimitry Andric                                                       FeatureTrustZone,
9700b57cec5SDimitry Andric                                                       FeatureMP,
9710b57cec5SDimitry Andric                                                       FeatureVirtualization,
9720b57cec5SDimitry Andric                                                       FeatureCrypto,
9730b57cec5SDimitry Andric                                                       FeatureCRC]>;
9740b57cec5SDimitry Andric
9750b57cec5SDimitry Andricdef ARMv82a   : Architecture<"armv8.2-a", "ARMv82a",  [HasV8_2aOps,
9760b57cec5SDimitry Andric                                                       FeatureAClass,
9770b57cec5SDimitry Andric                                                       FeatureDB,
9780b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9790b57cec5SDimitry Andric                                                       FeatureNEON,
9800b57cec5SDimitry Andric                                                       FeatureDSP,
9810b57cec5SDimitry Andric                                                       FeatureTrustZone,
9820b57cec5SDimitry Andric                                                       FeatureMP,
9830b57cec5SDimitry Andric                                                       FeatureVirtualization,
9840b57cec5SDimitry Andric                                                       FeatureCrypto,
9850b57cec5SDimitry Andric                                                       FeatureCRC,
9860b57cec5SDimitry Andric                                                       FeatureRAS]>;
9870b57cec5SDimitry Andric
9880b57cec5SDimitry Andricdef ARMv83a   : Architecture<"armv8.3-a", "ARMv83a",  [HasV8_3aOps,
9890b57cec5SDimitry Andric                                                       FeatureAClass,
9900b57cec5SDimitry Andric                                                       FeatureDB,
9910b57cec5SDimitry Andric                                                       FeatureFPARMv8,
9920b57cec5SDimitry Andric                                                       FeatureNEON,
9930b57cec5SDimitry Andric                                                       FeatureDSP,
9940b57cec5SDimitry Andric                                                       FeatureTrustZone,
9950b57cec5SDimitry Andric                                                       FeatureMP,
9960b57cec5SDimitry Andric                                                       FeatureVirtualization,
9970b57cec5SDimitry Andric                                                       FeatureCrypto,
9980b57cec5SDimitry Andric                                                       FeatureCRC,
9990b57cec5SDimitry Andric                                                       FeatureRAS]>;
10000b57cec5SDimitry Andric
10010b57cec5SDimitry Andricdef ARMv84a   : Architecture<"armv8.4-a", "ARMv84a",  [HasV8_4aOps,
10020b57cec5SDimitry Andric                                                       FeatureAClass,
10030b57cec5SDimitry Andric                                                       FeatureDB,
10040b57cec5SDimitry Andric                                                       FeatureFPARMv8,
10050b57cec5SDimitry Andric                                                       FeatureNEON,
10060b57cec5SDimitry Andric                                                       FeatureDSP,
10070b57cec5SDimitry Andric                                                       FeatureTrustZone,
10080b57cec5SDimitry Andric                                                       FeatureMP,
10090b57cec5SDimitry Andric                                                       FeatureVirtualization,
10100b57cec5SDimitry Andric                                                       FeatureCrypto,
10110b57cec5SDimitry Andric                                                       FeatureCRC,
10120b57cec5SDimitry Andric                                                       FeatureRAS,
10130b57cec5SDimitry Andric                                                       FeatureDotProd]>;
10140b57cec5SDimitry Andric
10150b57cec5SDimitry Andricdef ARMv85a   : Architecture<"armv8.5-a", "ARMv85a",  [HasV8_5aOps,
10160b57cec5SDimitry Andric                                                       FeatureAClass,
10170b57cec5SDimitry Andric                                                       FeatureDB,
10180b57cec5SDimitry Andric                                                       FeatureFPARMv8,
10190b57cec5SDimitry Andric                                                       FeatureNEON,
10200b57cec5SDimitry Andric                                                       FeatureDSP,
10210b57cec5SDimitry Andric                                                       FeatureTrustZone,
10220b57cec5SDimitry Andric                                                       FeatureMP,
10230b57cec5SDimitry Andric                                                       FeatureVirtualization,
10240b57cec5SDimitry Andric                                                       FeatureCrypto,
10250b57cec5SDimitry Andric                                                       FeatureCRC,
10260b57cec5SDimitry Andric                                                       FeatureRAS,
10270b57cec5SDimitry Andric                                                       FeatureDotProd]>;
10285ffd83dbSDimitry Andricdef ARMv86a   : Architecture<"armv8.6-a", "ARMv86a",  [HasV8_6aOps,
10295ffd83dbSDimitry Andric                                                       FeatureAClass,
10305ffd83dbSDimitry Andric                                                       FeatureDB,
10315ffd83dbSDimitry Andric                                                       FeatureFPARMv8,
10325ffd83dbSDimitry Andric                                                       FeatureNEON,
10335ffd83dbSDimitry Andric                                                       FeatureDSP,
10345ffd83dbSDimitry Andric                                                       FeatureTrustZone,
10355ffd83dbSDimitry Andric                                                       FeatureMP,
10365ffd83dbSDimitry Andric                                                       FeatureVirtualization,
10375ffd83dbSDimitry Andric                                                       FeatureCrypto,
10385ffd83dbSDimitry Andric                                                       FeatureCRC,
10395ffd83dbSDimitry Andric                                                       FeatureRAS,
10405ffd83dbSDimitry Andric                                                       FeatureDotProd]>;
1041fe6060f1SDimitry Andricdef ARMv87a   : Architecture<"armv8.7-a", "ARMv87a",  [HasV8_7aOps,
1042e8d8bef9SDimitry Andric                                                       FeatureAClass,
1043e8d8bef9SDimitry Andric                                                       FeatureDB,
1044e8d8bef9SDimitry Andric                                                       FeatureFPARMv8,
1045e8d8bef9SDimitry Andric                                                       FeatureNEON,
1046e8d8bef9SDimitry Andric                                                       FeatureDSP,
1047e8d8bef9SDimitry Andric                                                       FeatureTrustZone,
1048e8d8bef9SDimitry Andric                                                       FeatureMP,
1049e8d8bef9SDimitry Andric                                                       FeatureVirtualization,
1050e8d8bef9SDimitry Andric                                                       FeatureCrypto,
1051e8d8bef9SDimitry Andric                                                       FeatureCRC,
1052e8d8bef9SDimitry Andric                                                       FeatureRAS,
1053e8d8bef9SDimitry Andric                                                       FeatureDotProd]>;
105404eeddc0SDimitry Andricdef ARMv88a   : Architecture<"armv8.8-a", "ARMv88a",  [HasV8_8aOps,
105504eeddc0SDimitry Andric                                                       FeatureAClass,
105604eeddc0SDimitry Andric                                                       FeatureDB,
105704eeddc0SDimitry Andric                                                       FeatureFPARMv8,
105804eeddc0SDimitry Andric                                                       FeatureNEON,
105904eeddc0SDimitry Andric                                                       FeatureDSP,
106004eeddc0SDimitry Andric                                                       FeatureTrustZone,
106104eeddc0SDimitry Andric                                                       FeatureMP,
106204eeddc0SDimitry Andric                                                       FeatureVirtualization,
106304eeddc0SDimitry Andric                                                       FeatureCrypto,
106404eeddc0SDimitry Andric                                                       FeatureCRC,
106504eeddc0SDimitry Andric                                                       FeatureRAS,
106604eeddc0SDimitry Andric                                                       FeatureDotProd]>;
1067bdd1243dSDimitry Andricdef ARMv89a   : Architecture<"armv8.9-a", "ARMv89a",  [HasV8_9aOps,
1068bdd1243dSDimitry Andric                                                       FeatureAClass,
1069bdd1243dSDimitry Andric                                                       FeatureDB,
1070bdd1243dSDimitry Andric                                                       FeatureFPARMv8,
1071bdd1243dSDimitry Andric                                                       FeatureNEON,
1072bdd1243dSDimitry Andric                                                       FeatureDSP,
1073bdd1243dSDimitry Andric                                                       FeatureTrustZone,
1074bdd1243dSDimitry Andric                                                       FeatureMP,
1075bdd1243dSDimitry Andric                                                       FeatureVirtualization,
1076bdd1243dSDimitry Andric                                                       FeatureCrypto,
1077bdd1243dSDimitry Andric                                                       FeatureCRC,
1078bdd1243dSDimitry Andric                                                       FeatureRAS,
1079bdd1243dSDimitry Andric                                                       FeatureDotProd]>;
10800b57cec5SDimitry Andric
1081349cc55cSDimitry Andricdef ARMv9a   : Architecture<"armv9-a", "ARMv9a",       [HasV9_0aOps,
1082349cc55cSDimitry Andric                                                       FeatureAClass,
1083349cc55cSDimitry Andric                                                       FeatureDB,
1084349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1085349cc55cSDimitry Andric                                                       FeatureNEON,
1086349cc55cSDimitry Andric                                                       FeatureDSP,
1087349cc55cSDimitry Andric                                                       FeatureTrustZone,
1088349cc55cSDimitry Andric                                                       FeatureMP,
1089349cc55cSDimitry Andric                                                       FeatureVirtualization,
1090349cc55cSDimitry Andric                                                       FeatureCRC,
1091349cc55cSDimitry Andric                                                       FeatureRAS,
1092349cc55cSDimitry Andric                                                       FeatureDotProd]>;
1093349cc55cSDimitry Andricdef ARMv91a   : Architecture<"armv9.1-a", "ARMv91a",   [HasV9_1aOps,
1094349cc55cSDimitry Andric                                                       FeatureAClass,
1095349cc55cSDimitry Andric                                                       FeatureDB,
1096349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1097349cc55cSDimitry Andric                                                       FeatureNEON,
1098349cc55cSDimitry Andric                                                       FeatureDSP,
1099349cc55cSDimitry Andric                                                       FeatureTrustZone,
1100349cc55cSDimitry Andric                                                       FeatureMP,
1101349cc55cSDimitry Andric                                                       FeatureVirtualization,
1102349cc55cSDimitry Andric                                                       FeatureCRC,
1103349cc55cSDimitry Andric                                                       FeatureRAS,
1104349cc55cSDimitry Andric                                                       FeatureDotProd]>;
1105349cc55cSDimitry Andricdef ARMv92a   : Architecture<"armv9.2-a", "ARMv92a",  [HasV9_2aOps,
1106349cc55cSDimitry Andric                                                       FeatureAClass,
1107349cc55cSDimitry Andric                                                       FeatureDB,
1108349cc55cSDimitry Andric                                                       FeatureFPARMv8,
1109349cc55cSDimitry Andric                                                       FeatureNEON,
1110349cc55cSDimitry Andric                                                       FeatureDSP,
1111349cc55cSDimitry Andric                                                       FeatureTrustZone,
1112349cc55cSDimitry Andric                                                       FeatureMP,
1113349cc55cSDimitry Andric                                                       FeatureVirtualization,
1114349cc55cSDimitry Andric                                                       FeatureCRC,
1115349cc55cSDimitry Andric                                                       FeatureRAS,
1116349cc55cSDimitry Andric                                                       FeatureDotProd]>;
111704eeddc0SDimitry Andricdef ARMv93a   : Architecture<"armv9.3-a", "ARMv93a",  [HasV9_3aOps,
111804eeddc0SDimitry Andric                                                       FeatureAClass,
111904eeddc0SDimitry Andric                                                       FeatureDB,
112004eeddc0SDimitry Andric                                                       FeatureFPARMv8,
112104eeddc0SDimitry Andric                                                       FeatureNEON,
112204eeddc0SDimitry Andric                                                       FeatureDSP,
112304eeddc0SDimitry Andric                                                       FeatureTrustZone,
112404eeddc0SDimitry Andric                                                       FeatureMP,
112504eeddc0SDimitry Andric                                                       FeatureVirtualization,
112604eeddc0SDimitry Andric                                                       FeatureCrypto,
112704eeddc0SDimitry Andric                                                       FeatureCRC,
112804eeddc0SDimitry Andric                                                       FeatureRAS,
112904eeddc0SDimitry Andric                                                       FeatureDotProd]>;
1130bdd1243dSDimitry Andricdef ARMv94a   : Architecture<"armv9.4-a", "ARMv94a",  [HasV9_4aOps,
1131bdd1243dSDimitry Andric                                                       FeatureAClass,
1132bdd1243dSDimitry Andric                                                       FeatureDB,
1133bdd1243dSDimitry Andric                                                       FeatureFPARMv8,
1134bdd1243dSDimitry Andric                                                       FeatureNEON,
1135bdd1243dSDimitry Andric                                                       FeatureDSP,
1136bdd1243dSDimitry Andric                                                       FeatureTrustZone,
1137bdd1243dSDimitry Andric                                                       FeatureMP,
1138bdd1243dSDimitry Andric                                                       FeatureVirtualization,
1139bdd1243dSDimitry Andric                                                       FeatureCRC,
1140bdd1243dSDimitry Andric                                                       FeatureRAS,
1141bdd1243dSDimitry Andric                                                       FeatureDotProd]>;
1142349cc55cSDimitry Andric
11430b57cec5SDimitry Andricdef ARMv8r    : Architecture<"armv8-r",   "ARMv8r",   [HasV8Ops,
11440b57cec5SDimitry Andric                                                       FeatureRClass,
11450b57cec5SDimitry Andric                                                       FeatureDB,
11460b57cec5SDimitry Andric                                                       FeatureDFB,
11470b57cec5SDimitry Andric                                                       FeatureDSP,
11480b57cec5SDimitry Andric                                                       FeatureCRC,
11490b57cec5SDimitry Andric                                                       FeatureMP,
11500b57cec5SDimitry Andric                                                       FeatureVirtualization,
11510b57cec5SDimitry Andric                                                       FeatureFPARMv8,
11520b57cec5SDimitry Andric                                                       FeatureNEON]>;
11530b57cec5SDimitry Andric
11540b57cec5SDimitry Andricdef ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline",
11550b57cec5SDimitry Andric                                                      [HasV8MBaselineOps,
11560b57cec5SDimitry Andric                                                       FeatureNoARM,
11570b57cec5SDimitry Andric                                                       ModeThumb,
11580b57cec5SDimitry Andric                                                       FeatureDB,
11590b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11600b57cec5SDimitry Andric                                                       FeatureV7Clrex,
11610b57cec5SDimitry Andric                                                       Feature8MSecExt,
11620b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11630b57cec5SDimitry Andric                                                       FeatureMClass,
11640b57cec5SDimitry Andric                                                       FeatureStrictAlign]>;
11650b57cec5SDimitry Andric
11660b57cec5SDimitry Andricdef ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline",
11670b57cec5SDimitry Andric                                                      [HasV8MMainlineOps,
11680b57cec5SDimitry Andric                                                       FeatureNoARM,
11690b57cec5SDimitry Andric                                                       ModeThumb,
11700b57cec5SDimitry Andric                                                       FeatureDB,
11710b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11720b57cec5SDimitry Andric                                                       Feature8MSecExt,
11730b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11740b57cec5SDimitry Andric                                                       FeatureMClass]>;
11750b57cec5SDimitry Andric
11760b57cec5SDimitry Andricdef ARMv81mMainline : Architecture<"armv8.1-m.main", "ARMv81mMainline",
11770b57cec5SDimitry Andric                                                      [HasV8_1MMainlineOps,
11780b57cec5SDimitry Andric                                                       FeatureNoARM,
11790b57cec5SDimitry Andric                                                       ModeThumb,
11800b57cec5SDimitry Andric                                                       FeatureDB,
11810b57cec5SDimitry Andric                                                       FeatureHWDivThumb,
11820b57cec5SDimitry Andric                                                       Feature8MSecExt,
11830b57cec5SDimitry Andric                                                       FeatureAcquireRelease,
11840b57cec5SDimitry Andric                                                       FeatureMClass,
11850b57cec5SDimitry Andric                                                       FeatureRAS,
11860b57cec5SDimitry Andric                                                       FeatureLOB]>;
11870b57cec5SDimitry Andric
11880b57cec5SDimitry Andric// Aliases
11890b57cec5SDimitry Andricdef IWMMXT   : Architecture<"iwmmxt",      "ARMv5te",  [ARMv5te]>;
11900b57cec5SDimitry Andricdef IWMMXT2  : Architecture<"iwmmxt2",     "ARMv5te",  [ARMv5te]>;
11910b57cec5SDimitry Andricdef XScale   : Architecture<"xscale",      "ARMv5te",  [ARMv5te]>;
11920b57cec5SDimitry Andricdef ARMv6j   : Architecture<"armv6j",      "ARMv7a",   [ARMv6]>;
11930b57cec5SDimitry Andricdef ARMv7k   : Architecture<"armv7k",      "ARMv7a",   [ARMv7a]>;
11940b57cec5SDimitry Andricdef ARMv7s   : Architecture<"armv7s",      "ARMv7a",   [ARMv7a]>;
11950b57cec5SDimitry Andric
1196e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1197e8d8bef9SDimitry Andric// Register File Description
1198e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1199e8d8bef9SDimitry Andric
1200e8d8bef9SDimitry Andricinclude "ARMRegisterInfo.td"
1201e8d8bef9SDimitry Andricinclude "ARMRegisterBanks.td"
1202e8d8bef9SDimitry Andricinclude "ARMCallingConv.td"
12030b57cec5SDimitry Andric
12040b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12050b57cec5SDimitry Andric// ARM schedules.
12060b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12070b57cec5SDimitry Andric//
12080b57cec5SDimitry Andricinclude "ARMPredicates.td"
12090b57cec5SDimitry Andricinclude "ARMSchedule.td"
12100b57cec5SDimitry Andric
12110b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1212e8d8bef9SDimitry Andric// Instruction Descriptions
1213e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1214e8d8bef9SDimitry Andric
1215e8d8bef9SDimitry Andricinclude "ARMInstrInfo.td"
1216e8d8bef9SDimitry Andricdef ARMInstrInfo : InstrInfo;
1217e8d8bef9SDimitry Andric
1218e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
1219e8d8bef9SDimitry Andric// ARM schedules
1220e8d8bef9SDimitry Andric//
1221e8d8bef9SDimitry Andricinclude "ARMScheduleV6.td"
1222e8d8bef9SDimitry Andricinclude "ARMScheduleA8.td"
1223e8d8bef9SDimitry Andricinclude "ARMScheduleA9.td"
1224e8d8bef9SDimitry Andricinclude "ARMScheduleSwift.td"
1225e8d8bef9SDimitry Andricinclude "ARMScheduleR52.td"
1226e8d8bef9SDimitry Andricinclude "ARMScheduleA57.td"
1227e8d8bef9SDimitry Andricinclude "ARMScheduleM4.td"
1228bdd1243dSDimitry Andricinclude "ARMScheduleM55.td"
1229e8d8bef9SDimitry Andricinclude "ARMScheduleM7.td"
1230*5f757f3fSDimitry Andricinclude "ARMScheduleM85.td"
1231e8d8bef9SDimitry Andric
1232e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
12330b57cec5SDimitry Andric// ARM processors
12340b57cec5SDimitry Andric//
12350b57cec5SDimitry Andric// Dummy CPU, used to target architectures
12360b57cec5SDimitry Andricdef : ProcessorModel<"generic",     CortexA8Model,      []>;
12370b57cec5SDimitry Andric
12380b57cec5SDimitry Andric// FIXME: Several processors below are not using their own scheduler
12390b57cec5SDimitry Andric// model, but one of similar/previous processor. These should be fixed.
12400b57cec5SDimitry Andric
12410b57cec5SDimitry Andricdef : ProcNoItin<"arm8",                                [ARMv4]>;
12420b57cec5SDimitry Andricdef : ProcNoItin<"arm810",                              [ARMv4]>;
12430b57cec5SDimitry Andricdef : ProcNoItin<"strongarm",                           [ARMv4]>;
12440b57cec5SDimitry Andricdef : ProcNoItin<"strongarm110",                        [ARMv4]>;
12450b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1100",                       [ARMv4]>;
12460b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1110",                       [ARMv4]>;
12470b57cec5SDimitry Andric
12480b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi",                            [ARMv4t]>;
12490b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi-s",                          [ARMv4t]>;
12500b57cec5SDimitry Andricdef : ProcNoItin<"arm710t",                             [ARMv4t]>;
12510b57cec5SDimitry Andricdef : ProcNoItin<"arm720t",                             [ARMv4t]>;
12520b57cec5SDimitry Andricdef : ProcNoItin<"arm9",                                [ARMv4t]>;
12530b57cec5SDimitry Andricdef : ProcNoItin<"arm9tdmi",                            [ARMv4t]>;
12540b57cec5SDimitry Andricdef : ProcNoItin<"arm920",                              [ARMv4t]>;
12550b57cec5SDimitry Andricdef : ProcNoItin<"arm920t",                             [ARMv4t]>;
12560b57cec5SDimitry Andricdef : ProcNoItin<"arm922t",                             [ARMv4t]>;
12570b57cec5SDimitry Andricdef : ProcNoItin<"arm940t",                             [ARMv4t]>;
12580b57cec5SDimitry Andricdef : ProcNoItin<"ep9312",                              [ARMv4t]>;
12590b57cec5SDimitry Andric
12600b57cec5SDimitry Andricdef : ProcNoItin<"arm10tdmi",                           [ARMv5t]>;
12610b57cec5SDimitry Andricdef : ProcNoItin<"arm1020t",                            [ARMv5t]>;
12620b57cec5SDimitry Andric
12630b57cec5SDimitry Andricdef : ProcNoItin<"arm9e",                               [ARMv5te]>;
12640b57cec5SDimitry Andricdef : ProcNoItin<"arm926ej-s",                          [ARMv5te]>;
12650b57cec5SDimitry Andricdef : ProcNoItin<"arm946e-s",                           [ARMv5te]>;
12660b57cec5SDimitry Andricdef : ProcNoItin<"arm966e-s",                           [ARMv5te]>;
12670b57cec5SDimitry Andricdef : ProcNoItin<"arm968e-s",                           [ARMv5te]>;
12680b57cec5SDimitry Andricdef : ProcNoItin<"arm10e",                              [ARMv5te]>;
12690b57cec5SDimitry Andricdef : ProcNoItin<"arm1020e",                            [ARMv5te]>;
12700b57cec5SDimitry Andricdef : ProcNoItin<"arm1022e",                            [ARMv5te]>;
12710b57cec5SDimitry Andricdef : ProcNoItin<"xscale",                              [ARMv5te]>;
12720b57cec5SDimitry Andricdef : ProcNoItin<"iwmmxt",                              [ARMv5te]>;
12730b57cec5SDimitry Andric
12740b57cec5SDimitry Andricdef : Processor<"arm1136j-s",       ARMV6Itineraries,   [ARMv6]>;
12750b57cec5SDimitry Andricdef : Processor<"arm1136jf-s",      ARMV6Itineraries,   [ARMv6,
12760b57cec5SDimitry Andric                                                         FeatureVFP2,
12770b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12780b57cec5SDimitry Andric
1279fe6060f1SDimitry Andricdef : Processor<"cortex-m0",        ARMV6Itineraries,   [ARMv6m,
1280fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1281fe6060f1SDimitry Andricdef : Processor<"cortex-m0plus",    ARMV6Itineraries,   [ARMv6m,
1282fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1283fe6060f1SDimitry Andricdef : Processor<"cortex-m1",        ARMV6Itineraries,   [ARMv6m,
1284fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
1285fe6060f1SDimitry Andricdef : Processor<"sc000",            ARMV6Itineraries,   [ARMv6m,
1286fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
12870b57cec5SDimitry Andric
12880b57cec5SDimitry Andricdef : Processor<"arm1176jz-s",      ARMV6Itineraries,   [ARMv6kz]>;
12890b57cec5SDimitry Andricdef : Processor<"arm1176jzf-s",     ARMV6Itineraries,   [ARMv6kz,
12900b57cec5SDimitry Andric                                                         FeatureVFP2,
12910b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12920b57cec5SDimitry Andric
12930b57cec5SDimitry Andricdef : Processor<"mpcorenovfp",      ARMV6Itineraries,   [ARMv6k]>;
12940b57cec5SDimitry Andricdef : Processor<"mpcore",           ARMV6Itineraries,   [ARMv6k,
12950b57cec5SDimitry Andric                                                         FeatureVFP2,
12960b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
12970b57cec5SDimitry Andric
12980b57cec5SDimitry Andricdef : Processor<"arm1156t2-s",      ARMV6Itineraries,   [ARMv6t2]>;
12990b57cec5SDimitry Andricdef : Processor<"arm1156t2f-s",     ARMV6Itineraries,   [ARMv6t2,
13000b57cec5SDimitry Andric                                                         FeatureVFP2,
13010b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx]>;
13020b57cec5SDimitry Andric
13030b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a5",   CortexA8Model,      [ARMv7a, ProcA5,
13040b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13050b57cec5SDimitry Andric                                                         FeatureTrustZone,
13060b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13070b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1308480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13090b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13100b57cec5SDimitry Andric                                                         FeatureMP,
13110b57cec5SDimitry Andric                                                         FeatureVFP4]>;
13120b57cec5SDimitry Andric
13130b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a7",   CortexA8Model,      [ARMv7a, ProcA7,
13140b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13150b57cec5SDimitry Andric                                                         FeatureTrustZone,
13160b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13170b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13180b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1319480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13200b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13210b57cec5SDimitry Andric                                                         FeatureMP,
13220b57cec5SDimitry Andric                                                         FeatureVFP4,
13230b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13240b57cec5SDimitry Andric
13250b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a8",   CortexA8Model,      [ARMv7a, ProcA8,
13260b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13270b57cec5SDimitry Andric                                                         FeatureNonpipelinedVFP,
13280b57cec5SDimitry Andric                                                         FeatureTrustZone,
13290b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
13300b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13310b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1332480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
13330b57cec5SDimitry Andric                                                         FeatureVMLxForwarding]>;
13340b57cec5SDimitry Andric
13350b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a9",   CortexA9Model,      [ARMv7a, ProcA9,
13360b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13370b57cec5SDimitry Andric                                                         FeatureTrustZone,
13380b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
13390b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13400b57cec5SDimitry Andric                                                         FeatureFP16,
13410b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13420b57cec5SDimitry Andric                                                         FeatureExpandMLx,
13430b57cec5SDimitry Andric                                                         FeaturePreferVMOVSR,
13440b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13450b57cec5SDimitry Andric                                                         FeatureNEONForFPMovs,
13460b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13470b57cec5SDimitry Andric                                                         FeatureMP]>;
13480b57cec5SDimitry Andric
13490b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a12",  CortexA9Model,      [ARMv7a, ProcA12,
13500b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13510b57cec5SDimitry Andric                                                         FeatureTrustZone,
13520b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13530b57cec5SDimitry Andric                                                         FeatureVFP4,
13540b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13550b57cec5SDimitry Andric                                                         FeatureVirtualization,
13560b57cec5SDimitry Andric                                                         FeatureMP]>;
13570b57cec5SDimitry Andric
13580b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a15",  CortexA9Model,      [ARMv7a, ProcA15,
13590b57cec5SDimitry Andric                                                         FeatureDontWidenVMOVS,
13600b57cec5SDimitry Andric                                                         FeatureSplatVFPToNeon,
13610b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13620b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13630b57cec5SDimitry Andric                                                         FeatureTrustZone,
13640b57cec5SDimitry Andric                                                         FeatureVFP4,
13650b57cec5SDimitry Andric                                                         FeatureMP,
13660b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13670b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13680b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13690b57cec5SDimitry Andric
13700b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a17",  CortexA9Model,      [ARMv7a, ProcA17,
13710b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13720b57cec5SDimitry Andric                                                         FeatureTrustZone,
13730b57cec5SDimitry Andric                                                         FeatureMP,
13740b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13750b57cec5SDimitry Andric                                                         FeatureVFP4,
13760b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13770b57cec5SDimitry Andric                                                         FeatureVirtualization]>;
13780b57cec5SDimitry Andric
13790b57cec5SDimitry Andric// FIXME: krait has currently the same features as A9 plus VFP4 and  HWDiv
13800b57cec5SDimitry Andricdef : ProcessorModel<"krait",       CortexA9Model,      [ARMv7a, ProcKrait,
13810b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13820b57cec5SDimitry Andric                                                         FeatureMuxedUnits,
13830b57cec5SDimitry Andric                                                         FeatureCheckVLDnAlign,
13840b57cec5SDimitry Andric                                                         FeatureVMLxForwarding,
13850b57cec5SDimitry Andric                                                         FeatureFP16,
13860b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
13870b57cec5SDimitry Andric                                                         FeatureVFP4,
13880b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
13890b57cec5SDimitry Andric                                                         FeatureHWDivARM]>;
13900b57cec5SDimitry Andric
13910b57cec5SDimitry Andricdef : ProcessorModel<"swift",       SwiftModel,         [ARMv7a, ProcSwift,
13920b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
13930b57cec5SDimitry Andric                                                         FeatureNEONForFP,
13940b57cec5SDimitry Andric                                                         FeatureVFP4,
13950b57cec5SDimitry Andric                                                         FeatureUseWideStrideVFP,
13960b57cec5SDimitry Andric                                                         FeatureMP,
13970b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
13980b57cec5SDimitry Andric                                                         FeatureHWDivARM,
13990b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
14000b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
14010b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1402480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14030b57cec5SDimitry Andric                                                         FeatureHasVMLxHazards,
14040b57cec5SDimitry Andric                                                         FeatureProfUnpredicate,
14050b57cec5SDimitry Andric                                                         FeaturePrefISHSTBarrier,
14060b57cec5SDimitry Andric                                                         FeatureSlowOddRegister,
14070b57cec5SDimitry Andric                                                         FeatureSlowLoadDSubreg,
14080b57cec5SDimitry Andric                                                         FeatureSlowVGETLNi32,
14090b57cec5SDimitry Andric                                                         FeatureSlowVDUP32,
14100b57cec5SDimitry Andric                                                         FeatureUseMISched,
14110b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
14120b57cec5SDimitry Andric
14130b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4",   CortexA8Model,      [ARMv7r, ProcR4,
14140b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14150b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14160b57cec5SDimitry Andric
14170b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4f",  CortexA8Model,      [ARMv7r, ProcR4,
14180b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14190b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14200b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1421480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14220b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14230b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14240b57cec5SDimitry Andric
14250b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r5",   CortexA8Model,      [ARMv7r, ProcR5,
14260b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14270b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14280b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14290b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14300b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1431480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14320b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14330b57cec5SDimitry Andric
14340b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r7",   CortexA8Model,      [ARMv7r, ProcR7,
14350b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14360b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14370b57cec5SDimitry Andric                                                         FeatureFP16,
14380b57cec5SDimitry Andric                                                         FeatureMP,
14390b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14400b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14410b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1442480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14430b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14440b57cec5SDimitry Andric
14450b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r8",   CortexA8Model,      [ARMv7r,
14460b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
14470b57cec5SDimitry Andric                                                         FeatureVFP3_D16,
14480b57cec5SDimitry Andric                                                         FeatureFP16,
14490b57cec5SDimitry Andric                                                         FeatureMP,
14500b57cec5SDimitry Andric                                                         FeatureSlowFPBrcc,
14510b57cec5SDimitry Andric                                                         FeatureHWDivARM,
14520b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1453480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14540b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR]>;
14550b57cec5SDimitry Andric
14560b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m3",   CortexM4Model,      [ARMv7m,
14570b57cec5SDimitry Andric                                                         ProcM3,
14580b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14590b57cec5SDimitry Andric                                                         FeatureUseMISched,
14600b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14610b57cec5SDimitry Andric
14620b57cec5SDimitry Andricdef : ProcessorModel<"sc300",       CortexM4Model,      [ARMv7m,
14630b57cec5SDimitry Andric                                                         ProcM3,
14640b57cec5SDimitry Andric                                                         FeatureUseMISched,
14650b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14660b57cec5SDimitry Andric
14670b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m4", CortexM4Model,        [ARMv7em,
14680b57cec5SDimitry Andric                                                         FeatureVFP4_D16_SP,
14690b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14700b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1471480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14720b57cec5SDimitry Andric                                                         FeatureUseMISched,
14730b57cec5SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14740b57cec5SDimitry Andric
1475e8d8bef9SDimitry Andricdef : ProcessorModel<"cortex-m7", CortexM7Model,        [ARMv7em,
1476e8d8bef9SDimitry Andric                                                         ProcM7,
1477e8d8bef9SDimitry Andric                                                         FeatureFPARMv8_D16,
147881ad6265SDimitry Andric                                                         FeatureUseMIPipeliner,
1479e8d8bef9SDimitry Andric                                                         FeatureUseMISched]>;
14800b57cec5SDimitry Andric
14810b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m23",                          [ARMv8mBaseline,
1482fe6060f1SDimitry Andric                                                         FeatureNoMovt,
1483fe6060f1SDimitry Andric                                                         FeatureHasNoBranchPredictor]>;
14840b57cec5SDimitry Andric
14850b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m33", CortexM4Model,       [ARMv8mMainline,
14860b57cec5SDimitry Andric                                                         FeatureDSP,
14870b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
14880b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14890b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1490480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
14910b57cec5SDimitry Andric                                                         FeatureUseMISched,
1492349cc55cSDimitry Andric                                                         FeatureHasNoBranchPredictor,
1493349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
14940b57cec5SDimitry Andric
14950b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m35p", CortexM4Model,      [ARMv8mMainline,
14960b57cec5SDimitry Andric                                                         FeatureDSP,
14970b57cec5SDimitry Andric                                                         FeatureFPARMv8_D16_SP,
14980b57cec5SDimitry Andric                                                         FeaturePrefLoopAlign32,
14990b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1500480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
15010b57cec5SDimitry Andric                                                         FeatureUseMISched,
1502349cc55cSDimitry Andric                                                         FeatureHasNoBranchPredictor,
1503349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
15040b57cec5SDimitry Andric
1505bdd1243dSDimitry Andricdef : ProcessorModel<"cortex-m55", CortexM55Model,      [ARMv81mMainline,
15065ffd83dbSDimitry Andric                                                         FeatureDSP,
15075ffd83dbSDimitry Andric                                                         FeatureFPARMv8_D16,
15085ffd83dbSDimitry Andric                                                         FeatureUseMISched,
15095ffd83dbSDimitry Andric                                                         FeatureHasNoBranchPredictor,
15105ffd83dbSDimitry Andric                                                         FeaturePrefLoopAlign32,
15115ffd83dbSDimitry Andric                                                         FeatureHasSlowFPVMLx,
1512349cc55cSDimitry Andric                                                         HasMVEFloatOps,
1513349cc55cSDimitry Andric                                                         FeatureFixCMSE_CVE_2021_35465]>;
15140b57cec5SDimitry Andric
1515*5f757f3fSDimitry Andricdef : ProcessorModel<"cortex-m85", CortexM85Model,      [ARMv81mMainline,
1516753f127fSDimitry Andric                                                         FeatureDSP,
1517753f127fSDimitry Andric                                                         FeatureFPARMv8_D16,
1518753f127fSDimitry Andric                                                         FeaturePACBTI,
1519753f127fSDimitry Andric                                                         FeatureUseMISched,
1520753f127fSDimitry Andric                                                         HasMVEFloatOps]>;
1521753f127fSDimitry Andric
1522*5f757f3fSDimitry Andricdef : ProcessorModel<"cortex-m52", CortexM55Model,      [ARMv81mMainline,
1523*5f757f3fSDimitry Andric                                                         FeatureDSP,
1524*5f757f3fSDimitry Andric                                                         FeatureFPARMv8_D16,
1525*5f757f3fSDimitry Andric                                                         FeatureHasNoBranchPredictor,
1526*5f757f3fSDimitry Andric                                                         FeaturePACBTI,
1527*5f757f3fSDimitry Andric                                                         FeatureUseMISched,
1528*5f757f3fSDimitry Andric                                                         FeaturePrefLoopAlign32,
1529*5f757f3fSDimitry Andric                                                         FeatureHasSlowFPVMLx,
1530*5f757f3fSDimitry Andric                                                         FeatureMVEVectorCostFactor1,
1531*5f757f3fSDimitry Andric                                                         HasMVEFloatOps]>;
1532*5f757f3fSDimitry Andric
15330b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a32",                           [ARMv8a,
15340b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15350b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15360b57cec5SDimitry Andric                                                         FeatureCrypto,
15370b57cec5SDimitry Andric                                                         FeatureCRC]>;
15380b57cec5SDimitry Andric
15390b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a35",                          [ARMv8a, ProcA35,
15400b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15410b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15420b57cec5SDimitry Andric                                                         FeatureCrypto,
15430b57cec5SDimitry Andric                                                         FeatureCRC]>;
15440b57cec5SDimitry Andric
15450b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a53",                          [ARMv8a, ProcA53,
15460b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15470b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15480b57cec5SDimitry Andric                                                         FeatureCrypto,
15490b57cec5SDimitry Andric                                                         FeatureCRC,
15500b57cec5SDimitry Andric                                                         FeatureFPAO]>;
15510b57cec5SDimitry Andric
15520b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a55",                          [ARMv82a, ProcA55,
15530b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15540b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15550b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15560b57cec5SDimitry Andric
15570b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a57",  CortexA57Model,     [ARMv8a, ProcA57,
15580b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15590b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15600b57cec5SDimitry Andric                                                         FeatureCrypto,
15610b57cec5SDimitry Andric                                                         FeatureCRC,
15620b57cec5SDimitry Andric                                                         FeatureFPAO,
15630b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
156481ad6265SDimitry Andric                                                         FeatureCheapPredicableCPSR,
156581ad6265SDimitry Andric                                                         FeatureFixCortexA57AES1742098]>;
15660b57cec5SDimitry Andric
15670b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a72",  CortexA57Model,     [ARMv8a, ProcA72,
15680b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15690b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15700b57cec5SDimitry Andric                                                         FeatureCrypto,
157181ad6265SDimitry Andric                                                         FeatureCRC,
157281ad6265SDimitry Andric                                                         FeatureFixCortexA57AES1742098]>;
15730b57cec5SDimitry Andric
15740b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a73",                          [ARMv8a, ProcA73,
15750b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15760b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15770b57cec5SDimitry Andric                                                         FeatureCrypto,
15780b57cec5SDimitry Andric                                                         FeatureCRC]>;
15790b57cec5SDimitry Andric
15800b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a75",                          [ARMv82a, ProcA75,
15810b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15820b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15830b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15840b57cec5SDimitry Andric
15850b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76",                          [ARMv82a, ProcA76,
15860b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15870b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15880b57cec5SDimitry Andric                                                         FeatureCrypto,
15890b57cec5SDimitry Andric                                                         FeatureCRC,
15900b57cec5SDimitry Andric                                                         FeatureFullFP16,
15910b57cec5SDimitry Andric                                                         FeatureDotProd]>;
15920b57cec5SDimitry Andric
15930b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76ae",                        [ARMv82a, ProcA76,
15940b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
15950b57cec5SDimitry Andric                                                         FeatureHWDivARM,
15960b57cec5SDimitry Andric                                                         FeatureCrypto,
15970b57cec5SDimitry Andric                                                         FeatureCRC,
15980b57cec5SDimitry Andric                                                         FeatureFullFP16,
15990b57cec5SDimitry Andric                                                         FeatureDotProd]>;
16000b57cec5SDimitry Andric
16015ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-a77",                          [ARMv82a, ProcA77,
16025ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
16035ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
16045ffd83dbSDimitry Andric                                                         FeatureCrypto,
16055ffd83dbSDimitry Andric                                                         FeatureCRC,
16065ffd83dbSDimitry Andric                                                         FeatureFullFP16,
16075ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
16085ffd83dbSDimitry Andric
16095ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-a78",                          [ARMv82a, ProcA78,
16105ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
16115ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
16125ffd83dbSDimitry Andric                                                         FeatureCrypto,
16135ffd83dbSDimitry Andric                                                         FeatureCRC,
16145ffd83dbSDimitry Andric                                                         FeatureFullFP16,
16155ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
16165ffd83dbSDimitry Andric
1617e8d8bef9SDimitry Andricdef : ProcNoItin<"cortex-a78c",                         [ARMv82a, ProcA78C,
1618e8d8bef9SDimitry Andric                                                         FeatureHWDivThumb,
1619e8d8bef9SDimitry Andric                                                         FeatureHWDivARM,
1620e8d8bef9SDimitry Andric                                                         FeatureCrypto,
1621e8d8bef9SDimitry Andric                                                         FeatureCRC,
1622e8d8bef9SDimitry Andric                                                         FeatureDotProd,
1623e8d8bef9SDimitry Andric                                                         FeatureFullFP16]>;
1624e8d8bef9SDimitry Andric
1625349cc55cSDimitry Andricdef : ProcNoItin<"cortex-a710",                         [ARMv9a, ProcA710,
1626349cc55cSDimitry Andric                                                         FeatureHWDivThumb,
1627349cc55cSDimitry Andric                                                         FeatureHWDivARM,
1628349cc55cSDimitry Andric                                                         FeatureFP16FML,
1629349cc55cSDimitry Andric                                                         FeatureBF16,
1630349cc55cSDimitry Andric                                                         FeatureMatMulInt8,
1631349cc55cSDimitry Andric                                                         FeatureSB]>;
1632349cc55cSDimitry Andric
16335ffd83dbSDimitry Andricdef : ProcNoItin<"cortex-x1",                           [ARMv82a, ProcX1,
16345ffd83dbSDimitry Andric                                                         FeatureHWDivThumb,
16355ffd83dbSDimitry Andric                                                         FeatureHWDivARM,
16365ffd83dbSDimitry Andric                                                         FeatureCrypto,
16375ffd83dbSDimitry Andric                                                         FeatureCRC,
16385ffd83dbSDimitry Andric                                                         FeatureFullFP16,
16395ffd83dbSDimitry Andric                                                         FeatureDotProd]>;
16405ffd83dbSDimitry Andric
16411fd87a68SDimitry Andricdef : ProcNoItin<"cortex-x1c",                          [ARMv82a, ProcX1C,
16421fd87a68SDimitry Andric                                                         FeatureHWDivThumb,
16431fd87a68SDimitry Andric                                                         FeatureHWDivARM,
16441fd87a68SDimitry Andric                                                         FeatureCrypto,
16451fd87a68SDimitry Andric                                                         FeatureCRC,
16461fd87a68SDimitry Andric                                                         FeatureFullFP16,
16471fd87a68SDimitry Andric                                                         FeatureDotProd]>;
16481fd87a68SDimitry Andric
1649e8d8bef9SDimitry Andricdef : ProcNoItin<"neoverse-v1",                         [ARMv84a,
1650e8d8bef9SDimitry Andric                                                         FeatureHWDivThumb,
1651e8d8bef9SDimitry Andric                                                         FeatureHWDivARM,
1652e8d8bef9SDimitry Andric                                                         FeatureCrypto,
1653e8d8bef9SDimitry Andric                                                         FeatureCRC,
1654e8d8bef9SDimitry Andric                                                         FeatureFullFP16,
1655e8d8bef9SDimitry Andric                                                         FeatureBF16,
1656e8d8bef9SDimitry Andric                                                         FeatureMatMulInt8]>;
1657e8d8bef9SDimitry Andric
16588bcb0991SDimitry Andricdef : ProcNoItin<"neoverse-n1",                         [ARMv82a,
16598bcb0991SDimitry Andric                                                         FeatureHWDivThumb,
16608bcb0991SDimitry Andric                                                         FeatureHWDivARM,
16618bcb0991SDimitry Andric                                                         FeatureCrypto,
16628bcb0991SDimitry Andric                                                         FeatureCRC,
16638bcb0991SDimitry Andric                                                         FeatureDotProd]>;
16648bcb0991SDimitry Andric
1665*5f757f3fSDimitry Andricdef : ProcNoItin<"neoverse-n2",                         [ARMv9a,
1666e8d8bef9SDimitry Andric                                                         FeatureBF16,
166704eeddc0SDimitry Andric                                                         FeatureMatMulInt8]>;
1668e8d8bef9SDimitry Andric
16690b57cec5SDimitry Andricdef : ProcessorModel<"cyclone",     SwiftModel,         [ARMv8a, ProcSwift,
16700b57cec5SDimitry Andric                                                         FeatureHasRetAddrStack,
16710b57cec5SDimitry Andric                                                         FeatureNEONForFP,
16720b57cec5SDimitry Andric                                                         FeatureVFP4,
16730b57cec5SDimitry Andric                                                         FeatureMP,
16740b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
16750b57cec5SDimitry Andric                                                         FeatureHWDivARM,
16760b57cec5SDimitry Andric                                                         FeatureAvoidPartialCPSR,
16770b57cec5SDimitry Andric                                                         FeatureAvoidMOVsShOp,
16780b57cec5SDimitry Andric                                                         FeatureHasSlowFPVMLx,
1679480093f4SDimitry Andric                                                         FeatureHasSlowFPVFMx,
16800b57cec5SDimitry Andric                                                         FeatureCrypto,
16810b57cec5SDimitry Andric                                                         FeatureUseMISched,
16820b57cec5SDimitry Andric                                                         FeatureZCZeroing,
16830b57cec5SDimitry Andric                                                         FeatureNoPostRASched]>;
16840b57cec5SDimitry Andric
16850b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m3",                           [ARMv8a, ProcExynos]>;
16860b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m4",                           [ARMv82a, ProcExynos,
16870b57cec5SDimitry Andric                                                         FeatureFullFP16,
16880b57cec5SDimitry Andric                                                         FeatureDotProd]>;
16890b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m5",                           [ARMv82a, ProcExynos,
16900b57cec5SDimitry Andric                                                         FeatureFullFP16,
16910b57cec5SDimitry Andric                                                         FeatureDotProd]>;
16920b57cec5SDimitry Andric
16930b57cec5SDimitry Andricdef : ProcNoItin<"kryo",                                [ARMv8a, ProcKryo,
16940b57cec5SDimitry Andric                                                         FeatureHWDivThumb,
16950b57cec5SDimitry Andric                                                         FeatureHWDivARM,
16960b57cec5SDimitry Andric                                                         FeatureCrypto,
16970b57cec5SDimitry Andric                                                         FeatureCRC]>;
16980b57cec5SDimitry Andric
16990b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r52", CortexR52Model,      [ARMv8r, ProcR52,
17000b57cec5SDimitry Andric                                                         FeatureUseMISched,
1701480093f4SDimitry Andric                                                         FeatureFPAO]>;
17020b57cec5SDimitry Andric
17030b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
17040b57cec5SDimitry Andric// Declare the target which we are implementing
17050b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
17060b57cec5SDimitry Andric
17070b57cec5SDimitry Andricdef ARMAsmWriter : AsmWriter {
17080b57cec5SDimitry Andric  string AsmWriterClassName  = "InstPrinter";
17090b57cec5SDimitry Andric  int PassSubtarget = 1;
17100b57cec5SDimitry Andric  int Variant = 0;
17110b57cec5SDimitry Andric  bit isMCAsmWriter = 1;
17120b57cec5SDimitry Andric}
17130b57cec5SDimitry Andric
17140b57cec5SDimitry Andricdef ARMAsmParser : AsmParser {
17150b57cec5SDimitry Andric  bit ReportMultipleNearMisses = 1;
17160b57cec5SDimitry Andric}
17170b57cec5SDimitry Andric
17180b57cec5SDimitry Andricdef ARMAsmParserVariant : AsmParserVariant {
17190b57cec5SDimitry Andric  int Variant = 0;
17200b57cec5SDimitry Andric  string Name = "ARM";
17210b57cec5SDimitry Andric  string BreakCharacters = ".";
17220b57cec5SDimitry Andric}
17230b57cec5SDimitry Andric
17240b57cec5SDimitry Andricdef ARM : Target {
17250b57cec5SDimitry Andric  // Pull in Instruction Info.
17260b57cec5SDimitry Andric  let InstructionSet = ARMInstrInfo;
17270b57cec5SDimitry Andric  let AssemblyWriters = [ARMAsmWriter];
17280b57cec5SDimitry Andric  let AssemblyParsers = [ARMAsmParser];
17290b57cec5SDimitry Andric  let AssemblyParserVariants = [ARMAsmParserVariant];
17300b57cec5SDimitry Andric  let AllowRegisterRenaming = 1;
17310b57cec5SDimitry Andric}
1732