10b57cec5SDimitry Andric//=- AArch64.td - Describe the AArch64 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// AArch64 Subtarget features. 200b57cec5SDimitry Andric// 210b57cec5SDimitry Andric 220b57cec5SDimitry Andricdef FeatureFPARMv8 : SubtargetFeature<"fp-armv8", "HasFPARMv8", "true", 230b57cec5SDimitry Andric "Enable ARMv8 FP">; 240b57cec5SDimitry Andric 250b57cec5SDimitry Andricdef FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", 260b57cec5SDimitry Andric "Enable Advanced SIMD instructions", [FeatureFPARMv8]>; 270b57cec5SDimitry Andric 280b57cec5SDimitry Andricdef FeatureSM4 : SubtargetFeature< 290b57cec5SDimitry Andric "sm4", "HasSM4", "true", 300b57cec5SDimitry Andric "Enable SM3 and SM4 support", [FeatureNEON]>; 310b57cec5SDimitry Andric 320b57cec5SDimitry Andricdef FeatureSHA2 : SubtargetFeature< 330b57cec5SDimitry Andric "sha2", "HasSHA2", "true", 340b57cec5SDimitry Andric "Enable SHA1 and SHA256 support", [FeatureNEON]>; 350b57cec5SDimitry Andric 360b57cec5SDimitry Andricdef FeatureSHA3 : SubtargetFeature< 370b57cec5SDimitry Andric "sha3", "HasSHA3", "true", 380b57cec5SDimitry Andric "Enable SHA512 and SHA3 support", [FeatureNEON, FeatureSHA2]>; 390b57cec5SDimitry Andric 400b57cec5SDimitry Andricdef FeatureAES : SubtargetFeature< 410b57cec5SDimitry Andric "aes", "HasAES", "true", 420b57cec5SDimitry Andric "Enable AES support", [FeatureNEON]>; 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric// Crypto has been split up and any combination is now valid (see the 455ffd83dbSDimitry Andric// crypto definitions above). Also, crypto is now context sensitive: 460b57cec5SDimitry Andric// it has a different meaning for e.g. Armv8.4 than it has for Armv8.2. 470b57cec5SDimitry Andric// Therefore, we rely on Clang, the user interacing tool, to pass on the 480b57cec5SDimitry Andric// appropriate crypto options. But here in the backend, crypto has very little 495ffd83dbSDimitry Andric// meaning anymore. We kept the Crypto definition here for backward 500b57cec5SDimitry Andric// compatibility, and now imply features SHA2 and AES, which was the 510b57cec5SDimitry Andric// "traditional" meaning of Crypto. 520b57cec5SDimitry Andricdef FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true", 530b57cec5SDimitry Andric "Enable cryptographic instructions", [FeatureNEON, FeatureSHA2, FeatureAES]>; 540b57cec5SDimitry Andric 550b57cec5SDimitry Andricdef FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true", 560b57cec5SDimitry Andric "Enable ARMv8 CRC-32 checksum instructions">; 570b57cec5SDimitry Andric 580b57cec5SDimitry Andricdef FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true", 590b57cec5SDimitry Andric "Enable ARMv8 Reliability, Availability and Serviceability Extensions">; 600b57cec5SDimitry Andric 610b57cec5SDimitry Andricdef FeatureLSE : SubtargetFeature<"lse", "HasLSE", "true", 620b57cec5SDimitry Andric "Enable ARMv8.1 Large System Extension (LSE) atomic instructions">; 630b57cec5SDimitry Andric 64349cc55cSDimitry Andricdef FeatureLSE2 : SubtargetFeature<"lse2", "HasLSE2", "true", 65349cc55cSDimitry Andric "Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules">; 66349cc55cSDimitry Andric 67*81ad6265SDimitry Andricdef FeatureLDAPR : SubtargetFeature<"ldapr", "HasLDAPR", "true", 68*81ad6265SDimitry Andric "Use LDAPR to lower atomic loads; experimental until we " 69*81ad6265SDimitry Andric "have more testing/a formal correctness proof">; 70*81ad6265SDimitry Andric 71e8d8bef9SDimitry Andricdef FeatureOutlineAtomics : SubtargetFeature<"outline-atomics", "OutlineAtomics", "true", 72e8d8bef9SDimitry Andric "Enable out of line atomics to support LSE instructions">; 73e8d8bef9SDimitry Andric 740b57cec5SDimitry Andricdef FeatureRDM : SubtargetFeature<"rdm", "HasRDM", "true", 750b57cec5SDimitry Andric "Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions">; 760b57cec5SDimitry Andric 770b57cec5SDimitry Andricdef FeaturePAN : SubtargetFeature< 780b57cec5SDimitry Andric "pan", "HasPAN", "true", 790b57cec5SDimitry Andric "Enables ARM v8.1 Privileged Access-Never extension">; 800b57cec5SDimitry Andric 810b57cec5SDimitry Andricdef FeatureLOR : SubtargetFeature< 820b57cec5SDimitry Andric "lor", "HasLOR", "true", 830b57cec5SDimitry Andric "Enables ARM v8.1 Limited Ordering Regions extension">; 840b57cec5SDimitry Andric 85e8d8bef9SDimitry Andricdef FeatureCONTEXTIDREL2 : SubtargetFeature<"CONTEXTIDREL2", "HasCONTEXTIDREL2", 86e8d8bef9SDimitry Andric "true", "Enable RW operand CONTEXTIDR_EL2" >; 87e8d8bef9SDimitry Andric 88e8d8bef9SDimitry Andricdef FeatureVH : SubtargetFeature<"vh", "HasVH", "true", 89e8d8bef9SDimitry Andric "Enables ARM v8.1 Virtual Host extension", [FeatureCONTEXTIDREL2] >; 900b57cec5SDimitry Andric 910b57cec5SDimitry Andricdef FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true", 920b57cec5SDimitry Andric "Enable ARMv8 PMUv3 Performance Monitors extension">; 930b57cec5SDimitry Andric 940b57cec5SDimitry Andricdef FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true", 950b57cec5SDimitry Andric "Full FP16", [FeatureFPARMv8]>; 960b57cec5SDimitry Andric 970b57cec5SDimitry Andricdef FeatureFP16FML : SubtargetFeature<"fp16fml", "HasFP16FML", "true", 980b57cec5SDimitry Andric "Enable FP16 FML instructions", [FeatureFullFP16]>; 990b57cec5SDimitry Andric 1000b57cec5SDimitry Andricdef FeatureSPE : SubtargetFeature<"spe", "HasSPE", "true", 1010b57cec5SDimitry Andric "Enable Statistical Profiling extension">; 1020b57cec5SDimitry Andric 1030b57cec5SDimitry Andricdef FeaturePAN_RWV : SubtargetFeature< 1040b57cec5SDimitry Andric "pan-rwv", "HasPAN_RWV", "true", 1050b57cec5SDimitry Andric "Enable v8.2 PAN s1e1R and s1e1W Variants", 1060b57cec5SDimitry Andric [FeaturePAN]>; 1070b57cec5SDimitry Andric 1080b57cec5SDimitry Andric// UAO PState 1090b57cec5SDimitry Andricdef FeaturePsUAO : SubtargetFeature< "uaops", "HasPsUAO", "true", 1100b57cec5SDimitry Andric "Enable v8.2 UAO PState">; 1110b57cec5SDimitry Andric 1120b57cec5SDimitry Andricdef FeatureCCPP : SubtargetFeature<"ccpp", "HasCCPP", 1130b57cec5SDimitry Andric "true", "Enable v8.2 data Cache Clean to Point of Persistence" >; 1140b57cec5SDimitry Andric 1150b57cec5SDimitry Andricdef FeatureSVE : SubtargetFeature<"sve", "HasSVE", "true", 1165ffd83dbSDimitry Andric "Enable Scalable Vector Extension (SVE) instructions", [FeatureFullFP16]>; 1175ffd83dbSDimitry Andric 1185ffd83dbSDimitry Andric// This flag is currently still labeled as Experimental, but when fully 1195ffd83dbSDimitry Andric// implemented this should tell the compiler to use the zeroing pseudos to 1205ffd83dbSDimitry Andric// benefit from the reverse instructions (e.g. SUB vs SUBR) if the inactive 1215ffd83dbSDimitry Andric// lanes are known to be zero. The pseudos will then be expanded using the 1225ffd83dbSDimitry Andric// MOVPRFX instruction to zero the inactive lanes. This feature should only be 1235ffd83dbSDimitry Andric// enabled if MOVPRFX instructions are known to merge with the destructive 1245ffd83dbSDimitry Andric// operations they prefix. 1255ffd83dbSDimitry Andric// 1265ffd83dbSDimitry Andric// This feature could similarly be extended to support cheap merging of _any_ 1275ffd83dbSDimitry Andric// value into the inactive lanes using the MOVPRFX instruction that uses 1285ffd83dbSDimitry Andric// merging-predication. 1295ffd83dbSDimitry Andricdef FeatureExperimentalZeroingPseudos 1305ffd83dbSDimitry Andric : SubtargetFeature<"use-experimental-zeroing-pseudos", 1315ffd83dbSDimitry Andric "UseExperimentalZeroingPseudos", "true", 1325ffd83dbSDimitry Andric "Hint to the compiler that the MOVPRFX instruction is " 1335ffd83dbSDimitry Andric "merged with destructive operations", 1345ffd83dbSDimitry Andric []>; 1350b57cec5SDimitry Andric 136349cc55cSDimitry Andricdef FeatureUseScalarIncVL : SubtargetFeature<"use-scalar-inc-vl", 137349cc55cSDimitry Andric "UseScalarIncVL", "true", "Prefer inc/dec over add+cnt">; 138349cc55cSDimitry Andric 1390b57cec5SDimitry Andricdef FeatureSVE2 : SubtargetFeature<"sve2", "HasSVE2", "true", 140349cc55cSDimitry Andric "Enable Scalable Vector Extension 2 (SVE2) instructions", 141349cc55cSDimitry Andric [FeatureSVE, FeatureUseScalarIncVL]>; 1420b57cec5SDimitry Andric 1430b57cec5SDimitry Andricdef FeatureSVE2AES : SubtargetFeature<"sve2-aes", "HasSVE2AES", "true", 1440b57cec5SDimitry Andric "Enable AES SVE2 instructions", [FeatureSVE2, FeatureAES]>; 1450b57cec5SDimitry Andric 1460b57cec5SDimitry Andricdef FeatureSVE2SM4 : SubtargetFeature<"sve2-sm4", "HasSVE2SM4", "true", 1470b57cec5SDimitry Andric "Enable SM4 SVE2 instructions", [FeatureSVE2, FeatureSM4]>; 1480b57cec5SDimitry Andric 1490b57cec5SDimitry Andricdef FeatureSVE2SHA3 : SubtargetFeature<"sve2-sha3", "HasSVE2SHA3", "true", 1500b57cec5SDimitry Andric "Enable SHA3 SVE2 instructions", [FeatureSVE2, FeatureSHA3]>; 1510b57cec5SDimitry Andric 1520b57cec5SDimitry Andricdef FeatureSVE2BitPerm : SubtargetFeature<"sve2-bitperm", "HasSVE2BitPerm", "true", 1530b57cec5SDimitry Andric "Enable bit permutation SVE2 instructions", [FeatureSVE2]>; 1540b57cec5SDimitry Andric 1550b57cec5SDimitry Andricdef FeatureZCRegMove : SubtargetFeature<"zcm", "HasZeroCycleRegMove", "true", 1560b57cec5SDimitry Andric "Has zero-cycle register moves">; 1578bcb0991SDimitry Andric 1580b57cec5SDimitry Andricdef FeatureZCZeroingGP : SubtargetFeature<"zcz-gp", "HasZeroCycleZeroingGP", "true", 1590b57cec5SDimitry Andric "Has zero-cycle zeroing instructions for generic registers">; 1600b57cec5SDimitry Andric 161*81ad6265SDimitry Andric// It is generally beneficial to rewrite "fmov s0, wzr" to "movi d0, #0". 162*81ad6265SDimitry Andric// as movi is more efficient across all cores. Newer cores can eliminate 163*81ad6265SDimitry Andric// fmovs early and there is no difference with movi, but this not true for 164*81ad6265SDimitry Andric// all implementations. 165fe6060f1SDimitry Andricdef FeatureNoZCZeroingFP : SubtargetFeature<"no-zcz-fp", "HasZeroCycleZeroingFP", "false", 166fe6060f1SDimitry Andric "Has no zero-cycle zeroing instructions for FP registers">; 1670b57cec5SDimitry Andric 1680b57cec5SDimitry Andricdef FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true", 1690b57cec5SDimitry Andric "Has zero-cycle zeroing instructions", 170fe6060f1SDimitry Andric [FeatureZCZeroingGP]>; 1710b57cec5SDimitry Andric 1720b57cec5SDimitry Andric/// ... but the floating-point version doesn't quite work in rare cases on older 1730b57cec5SDimitry Andric/// CPUs. 1740b57cec5SDimitry Andricdef FeatureZCZeroingFPWorkaround : SubtargetFeature<"zcz-fp-workaround", 1750b57cec5SDimitry Andric "HasZeroCycleZeroingFPWorkaround", "true", 1760b57cec5SDimitry Andric "The zero-cycle floating-point zeroing instruction has a bug">; 1770b57cec5SDimitry Andric 1780b57cec5SDimitry Andricdef FeatureStrictAlign : SubtargetFeature<"strict-align", 179*81ad6265SDimitry Andric "RequiresStrictAlign", "true", 1800b57cec5SDimitry Andric "Disallow all unaligned memory " 1810b57cec5SDimitry Andric "access">; 1820b57cec5SDimitry Andric 1835ffd83dbSDimitry Andricforeach i = {1-7,9-15,18,20-28,30} in 1840b57cec5SDimitry Andric def FeatureReserveX#i : SubtargetFeature<"reserve-x"#i, "ReserveXRegister["#i#"]", "true", 1850b57cec5SDimitry Andric "Reserve X"#i#", making it unavailable " 1860b57cec5SDimitry Andric "as a GPR">; 1870b57cec5SDimitry Andric 1880b57cec5SDimitry Andricforeach i = {8-15,18} in 1890b57cec5SDimitry Andric def FeatureCallSavedX#i : SubtargetFeature<"call-saved-x"#i, 1900b57cec5SDimitry Andric "CustomCallSavedXRegs["#i#"]", "true", "Make X"#i#" callee saved.">; 1910b57cec5SDimitry Andric 1920b57cec5SDimitry Andricdef FeatureBalanceFPOps : SubtargetFeature<"balance-fp-ops", "BalanceFPOps", 1930b57cec5SDimitry Andric "true", 1940b57cec5SDimitry Andric "balance mix of odd and even D-registers for fp multiply(-accumulate) ops">; 1950b57cec5SDimitry Andric 1960b57cec5SDimitry Andricdef FeaturePredictableSelectIsExpensive : SubtargetFeature< 1970b57cec5SDimitry Andric "predictable-select-expensive", "PredictableSelectIsExpensive", "true", 1980b57cec5SDimitry Andric "Prefer likely predicted branches over selects">; 1990b57cec5SDimitry Andric 2000b57cec5SDimitry Andricdef FeatureCustomCheapAsMoveHandling : SubtargetFeature<"custom-cheap-as-move", 201*81ad6265SDimitry Andric "HasCustomCheapAsMoveHandling", "true", 2020b57cec5SDimitry Andric "Use custom handling of cheap instructions">; 2030b57cec5SDimitry Andric 2040b57cec5SDimitry Andricdef FeatureExynosCheapAsMoveHandling : SubtargetFeature<"exynos-cheap-as-move", 205*81ad6265SDimitry Andric "HasExynosCheapAsMoveHandling", "true", 2060b57cec5SDimitry Andric "Use Exynos specific handling of cheap instructions", 2070b57cec5SDimitry Andric [FeatureCustomCheapAsMoveHandling]>; 2080b57cec5SDimitry Andric 2090b57cec5SDimitry Andricdef FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler", 2100b57cec5SDimitry Andric "UsePostRAScheduler", "true", "Schedule again after register allocation">; 2110b57cec5SDimitry Andric 2120b57cec5SDimitry Andricdef FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store", 213*81ad6265SDimitry Andric "IsMisaligned128StoreSlow", "true", "Misaligned 128 bit stores are slow">; 2140b57cec5SDimitry Andric 2150b57cec5SDimitry Andricdef FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128", 216*81ad6265SDimitry Andric "IsPaired128Slow", "true", "Paired 128 bit loads and stores are slow">; 2170b57cec5SDimitry Andric 218*81ad6265SDimitry Andricdef FeatureAscendStoreAddress : SubtargetFeature<"ascend-store-address", 219*81ad6265SDimitry Andric "IsStoreAddressAscend", "false", 220*81ad6265SDimitry Andric "Schedule vector stores by ascending address">; 221*81ad6265SDimitry Andric 222*81ad6265SDimitry Andricdef FeatureSlowSTRQro : SubtargetFeature<"slow-strqro-store", "IsSTRQroSlow", 2230b57cec5SDimitry Andric "true", "STR of Q register with register offset is slow">; 2240b57cec5SDimitry Andric 2250b57cec5SDimitry Andricdef FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature< 2260b57cec5SDimitry Andric "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern", 2270b57cec5SDimitry Andric "true", "Use alternative pattern for sextload convert to f32">; 2280b57cec5SDimitry Andric 2290b57cec5SDimitry Andricdef FeatureArithmeticBccFusion : SubtargetFeature< 2300b57cec5SDimitry Andric "arith-bcc-fusion", "HasArithmeticBccFusion", "true", 2310b57cec5SDimitry Andric "CPU fuses arithmetic+bcc operations">; 2320b57cec5SDimitry Andric 2330b57cec5SDimitry Andricdef FeatureArithmeticCbzFusion : SubtargetFeature< 2340b57cec5SDimitry Andric "arith-cbz-fusion", "HasArithmeticCbzFusion", "true", 2350b57cec5SDimitry Andric "CPU fuses arithmetic + cbz/cbnz operations">; 2360b57cec5SDimitry Andric 237e8d8bef9SDimitry Andricdef FeatureCmpBccFusion : SubtargetFeature< 238e8d8bef9SDimitry Andric "cmp-bcc-fusion", "HasCmpBccFusion", "true", 239e8d8bef9SDimitry Andric "CPU fuses cmp+bcc operations">; 240e8d8bef9SDimitry Andric 2410b57cec5SDimitry Andricdef FeatureFuseAddress : SubtargetFeature< 2420b57cec5SDimitry Andric "fuse-address", "HasFuseAddress", "true", 2430b57cec5SDimitry Andric "CPU fuses address generation and memory operations">; 2440b57cec5SDimitry Andric 2450b57cec5SDimitry Andricdef FeatureFuseAES : SubtargetFeature< 2460b57cec5SDimitry Andric "fuse-aes", "HasFuseAES", "true", 2470b57cec5SDimitry Andric "CPU fuses AES crypto operations">; 2480b57cec5SDimitry Andric 2490b57cec5SDimitry Andricdef FeatureFuseArithmeticLogic : SubtargetFeature< 2500b57cec5SDimitry Andric "fuse-arith-logic", "HasFuseArithmeticLogic", "true", 2510b57cec5SDimitry Andric "CPU fuses arithmetic and logic operations">; 2520b57cec5SDimitry Andric 2530b57cec5SDimitry Andricdef FeatureFuseCCSelect : SubtargetFeature< 2540b57cec5SDimitry Andric "fuse-csel", "HasFuseCCSelect", "true", 2550b57cec5SDimitry Andric "CPU fuses conditional select operations">; 2560b57cec5SDimitry Andric 2570b57cec5SDimitry Andricdef FeatureFuseCryptoEOR : SubtargetFeature< 2580b57cec5SDimitry Andric "fuse-crypto-eor", "HasFuseCryptoEOR", "true", 2590b57cec5SDimitry Andric "CPU fuses AES/PMULL and EOR operations">; 2600b57cec5SDimitry Andric 261*81ad6265SDimitry Andricdef FeatureFuseAdrpAdd : SubtargetFeature< 262*81ad6265SDimitry Andric "fuse-adrp-add", "HasFuseAdrpAdd", "true", 263*81ad6265SDimitry Andric "CPU fuses adrp+add operations">; 264*81ad6265SDimitry Andric 2650b57cec5SDimitry Andricdef FeatureFuseLiterals : SubtargetFeature< 2660b57cec5SDimitry Andric "fuse-literals", "HasFuseLiterals", "true", 2670b57cec5SDimitry Andric "CPU fuses literal generation operations">; 2680b57cec5SDimitry Andric 2690b57cec5SDimitry Andricdef FeatureDisableLatencySchedHeuristic : SubtargetFeature< 2700b57cec5SDimitry Andric "disable-latency-sched-heuristic", "DisableLatencySchedHeuristic", "true", 2710b57cec5SDimitry Andric "Disable latency scheduling heuristic">; 2720b57cec5SDimitry Andric 2730b57cec5SDimitry Andricdef FeatureForce32BitJumpTables 2740b57cec5SDimitry Andric : SubtargetFeature<"force-32bit-jump-tables", "Force32BitJumpTables", "true", 2750b57cec5SDimitry Andric "Force jump table entries to be 32-bits wide except at MinSize">; 2760b57cec5SDimitry Andric 2770b57cec5SDimitry Andricdef FeatureRCPC : SubtargetFeature<"rcpc", "HasRCPC", "true", 2780b57cec5SDimitry Andric "Enable support for RCPC extension">; 2790b57cec5SDimitry Andric 2800b57cec5SDimitry Andricdef FeatureUseRSqrt : SubtargetFeature< 2810b57cec5SDimitry Andric "use-reciprocal-square-root", "UseRSqrt", "true", 2820b57cec5SDimitry Andric "Use the reciprocal square root approximation">; 2830b57cec5SDimitry Andric 2840b57cec5SDimitry Andricdef FeatureDotProd : SubtargetFeature< 2850b57cec5SDimitry Andric "dotprod", "HasDotProd", "true", 2860b57cec5SDimitry Andric "Enable dot product support">; 2870b57cec5SDimitry Andric 288e8d8bef9SDimitry Andricdef FeaturePAuth : SubtargetFeature< 289e8d8bef9SDimitry Andric "pauth", "HasPAuth", "true", 2905ffd83dbSDimitry Andric "Enable v8.3-A Pointer Authentication extension">; 2910b57cec5SDimitry Andric 2920b57cec5SDimitry Andricdef FeatureJS : SubtargetFeature< 2930b57cec5SDimitry Andric "jsconv", "HasJS", "true", 2945ffd83dbSDimitry Andric "Enable v8.3-A JavaScript FP conversion instructions", 2950b57cec5SDimitry Andric [FeatureFPARMv8]>; 2960b57cec5SDimitry Andric 2970b57cec5SDimitry Andricdef FeatureCCIDX : SubtargetFeature< 2980b57cec5SDimitry Andric "ccidx", "HasCCIDX", "true", 2990b57cec5SDimitry Andric "Enable v8.3-A Extend of the CCSIDR number of sets">; 3000b57cec5SDimitry Andric 3010b57cec5SDimitry Andricdef FeatureComplxNum : SubtargetFeature< 3020b57cec5SDimitry Andric "complxnum", "HasComplxNum", "true", 3030b57cec5SDimitry Andric "Enable v8.3-A Floating-point complex number support", 3040b57cec5SDimitry Andric [FeatureNEON]>; 3050b57cec5SDimitry Andric 3060b57cec5SDimitry Andricdef FeatureNV : SubtargetFeature< 3070b57cec5SDimitry Andric "nv", "HasNV", "true", 3080b57cec5SDimitry Andric "Enable v8.4-A Nested Virtualization Enchancement">; 3090b57cec5SDimitry Andric 3100b57cec5SDimitry Andricdef FeatureMPAM : SubtargetFeature< 3110b57cec5SDimitry Andric "mpam", "HasMPAM", "true", 3120b57cec5SDimitry Andric "Enable v8.4-A Memory system Partitioning and Monitoring extension">; 3130b57cec5SDimitry Andric 3140b57cec5SDimitry Andricdef FeatureDIT : SubtargetFeature< 3150b57cec5SDimitry Andric "dit", "HasDIT", "true", 3160b57cec5SDimitry Andric "Enable v8.4-A Data Independent Timing instructions">; 3170b57cec5SDimitry Andric 3180b57cec5SDimitry Andricdef FeatureTRACEV8_4 : SubtargetFeature< 3190b57cec5SDimitry Andric "tracev8.4", "HasTRACEV8_4", "true", 3200b57cec5SDimitry Andric "Enable v8.4-A Trace extension">; 3210b57cec5SDimitry Andric 3220b57cec5SDimitry Andricdef FeatureAM : SubtargetFeature< 3230b57cec5SDimitry Andric "am", "HasAM", "true", 3240b57cec5SDimitry Andric "Enable v8.4-A Activity Monitors extension">; 3250b57cec5SDimitry Andric 3265ffd83dbSDimitry Andricdef FeatureAMVS : SubtargetFeature< 3275ffd83dbSDimitry Andric "amvs", "HasAMVS", "true", 3285ffd83dbSDimitry Andric "Enable v8.6-A Activity Monitors Virtualization support", 3295ffd83dbSDimitry Andric [FeatureAM]>; 3305ffd83dbSDimitry Andric 3310b57cec5SDimitry Andricdef FeatureSEL2 : SubtargetFeature< 3320b57cec5SDimitry Andric "sel2", "HasSEL2", "true", 3330b57cec5SDimitry Andric "Enable v8.4-A Secure Exception Level 2 extension">; 3340b57cec5SDimitry Andric 3350b57cec5SDimitry Andricdef FeatureTLB_RMI : SubtargetFeature< 3360b57cec5SDimitry Andric "tlb-rmi", "HasTLB_RMI", "true", 3370b57cec5SDimitry Andric "Enable v8.4-A TLB Range and Maintenance Instructions">; 3380b57cec5SDimitry Andric 339e8d8bef9SDimitry Andricdef FeatureFlagM : SubtargetFeature< 340e8d8bef9SDimitry Andric "flagm", "HasFlagM", "true", 3410b57cec5SDimitry Andric "Enable v8.4-A Flag Manipulation Instructions">; 3420b57cec5SDimitry Andric 3430b57cec5SDimitry Andric// 8.4 RCPC enchancements: LDAPR & STLR instructions with Immediate Offset 3440b57cec5SDimitry Andricdef FeatureRCPC_IMMO : SubtargetFeature<"rcpc-immo", "HasRCPC_IMMO", "true", 3450b57cec5SDimitry Andric "Enable v8.4-A RCPC instructions with Immediate Offsets", 3460b57cec5SDimitry Andric [FeatureRCPC]>; 3470b57cec5SDimitry Andric 3480b57cec5SDimitry Andricdef FeatureNoNegativeImmediates : SubtargetFeature<"no-neg-immediates", 3490b57cec5SDimitry Andric "NegativeImmediates", "false", 3500b57cec5SDimitry Andric "Convert immediates and instructions " 3510b57cec5SDimitry Andric "to their negated or complemented " 3520b57cec5SDimitry Andric "equivalent when the immediate does " 3530b57cec5SDimitry Andric "not fit in the encoding.">; 3540b57cec5SDimitry Andric 3550b57cec5SDimitry Andricdef FeatureLSLFast : SubtargetFeature< 3560b57cec5SDimitry Andric "lsl-fast", "HasLSLFast", "true", 3570b57cec5SDimitry Andric "CPU has a fastpath logical shift of up to 3 places">; 3580b57cec5SDimitry Andric 3590b57cec5SDimitry Andricdef FeatureAggressiveFMA : 3600b57cec5SDimitry Andric SubtargetFeature<"aggressive-fma", 3610b57cec5SDimitry Andric "HasAggressiveFMA", 3620b57cec5SDimitry Andric "true", 3630b57cec5SDimitry Andric "Enable Aggressive FMA for floating-point.">; 3640b57cec5SDimitry Andric 3650b57cec5SDimitry Andricdef FeatureAltFPCmp : SubtargetFeature<"altnzcv", "HasAlternativeNZCV", "true", 3660b57cec5SDimitry Andric "Enable alternative NZCV format for floating point comparisons">; 3670b57cec5SDimitry Andric 3680b57cec5SDimitry Andricdef FeatureFRInt3264 : SubtargetFeature<"fptoint", "HasFRInt3264", "true", 3690b57cec5SDimitry Andric "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to " 3700b57cec5SDimitry Andric "an integer (in FP format) forcing it to fit into a 32- or 64-bit int" >; 3710b57cec5SDimitry Andric 3720b57cec5SDimitry Andricdef FeatureSpecRestrict : SubtargetFeature<"specrestrict", "HasSpecRestrict", 3730b57cec5SDimitry Andric "true", "Enable architectural speculation restriction" >; 3740b57cec5SDimitry Andric 3750b57cec5SDimitry Andricdef FeatureSB : SubtargetFeature<"sb", "HasSB", 3760b57cec5SDimitry Andric "true", "Enable v8.5 Speculation Barrier" >; 3770b57cec5SDimitry Andric 3780b57cec5SDimitry Andricdef FeatureSSBS : SubtargetFeature<"ssbs", "HasSSBS", 3790b57cec5SDimitry Andric "true", "Enable Speculative Store Bypass Safe bit" >; 3800b57cec5SDimitry Andric 3810b57cec5SDimitry Andricdef FeaturePredRes : SubtargetFeature<"predres", "HasPredRes", "true", 3820b57cec5SDimitry Andric "Enable v8.5a execution and data prediction invalidation instructions" >; 3830b57cec5SDimitry Andric 3840b57cec5SDimitry Andricdef FeatureCacheDeepPersist : SubtargetFeature<"ccdp", "HasCCDP", 3850b57cec5SDimitry Andric "true", "Enable v8.5 Cache Clean to Point of Deep Persistence" >; 3860b57cec5SDimitry Andric 3870b57cec5SDimitry Andricdef FeatureBranchTargetId : SubtargetFeature<"bti", "HasBTI", 3880b57cec5SDimitry Andric "true", "Enable Branch Target Identification" >; 3890b57cec5SDimitry Andric 3900b57cec5SDimitry Andricdef FeatureRandGen : SubtargetFeature<"rand", "HasRandGen", 3910b57cec5SDimitry Andric "true", "Enable Random Number generation instructions" >; 3920b57cec5SDimitry Andric 3930b57cec5SDimitry Andricdef FeatureMTE : SubtargetFeature<"mte", "HasMTE", 3940b57cec5SDimitry Andric "true", "Enable Memory Tagging Extension" >; 3950b57cec5SDimitry Andric 3968bcb0991SDimitry Andricdef FeatureTRBE : SubtargetFeature<"trbe", "HasTRBE", 3978bcb0991SDimitry Andric "true", "Enable Trace Buffer Extension">; 3988bcb0991SDimitry Andric 3998bcb0991SDimitry Andricdef FeatureETE : SubtargetFeature<"ete", "HasETE", 4008bcb0991SDimitry Andric "true", "Enable Embedded Trace Extension", 4018bcb0991SDimitry Andric [FeatureTRBE]>; 4028bcb0991SDimitry Andric 4038bcb0991SDimitry Andricdef FeatureTME : SubtargetFeature<"tme", "HasTME", 4048bcb0991SDimitry Andric "true", "Enable Transactional Memory Extension" >; 4058bcb0991SDimitry Andric 4068bcb0991SDimitry Andricdef FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", 4078bcb0991SDimitry Andric "AllowTaggedGlobals", 4088bcb0991SDimitry Andric "true", "Use an instruction sequence for taking the address of a global " 4098bcb0991SDimitry Andric "that allows a memory tag in the upper address bits">; 4108bcb0991SDimitry Andric 4115ffd83dbSDimitry Andricdef FeatureBF16 : SubtargetFeature<"bf16", "HasBF16", 4125ffd83dbSDimitry Andric "true", "Enable BFloat16 Extension" >; 4135ffd83dbSDimitry Andric 4145ffd83dbSDimitry Andricdef FeatureMatMulInt8 : SubtargetFeature<"i8mm", "HasMatMulInt8", 4155ffd83dbSDimitry Andric "true", "Enable Matrix Multiply Int8 Extension">; 4165ffd83dbSDimitry Andric 4175ffd83dbSDimitry Andricdef FeatureMatMulFP32 : SubtargetFeature<"f32mm", "HasMatMulFP32", 4185ffd83dbSDimitry Andric "true", "Enable Matrix Multiply FP32 Extension", [FeatureSVE]>; 4195ffd83dbSDimitry Andric 4205ffd83dbSDimitry Andricdef FeatureMatMulFP64 : SubtargetFeature<"f64mm", "HasMatMulFP64", 4215ffd83dbSDimitry Andric "true", "Enable Matrix Multiply FP64 Extension", [FeatureSVE]>; 4225ffd83dbSDimitry Andric 423e8d8bef9SDimitry Andricdef FeatureXS : SubtargetFeature<"xs", "HasXS", 424e8d8bef9SDimitry Andric "true", "Enable Armv8.7-A limited-TLB-maintenance instruction">; 425e8d8bef9SDimitry Andric 426e8d8bef9SDimitry Andricdef FeatureWFxT : SubtargetFeature<"wfxt", "HasWFxT", 427e8d8bef9SDimitry Andric "true", "Enable Armv8.7-A WFET and WFIT instruction">; 428e8d8bef9SDimitry Andric 429e8d8bef9SDimitry Andricdef FeatureHCX : SubtargetFeature< 430e8d8bef9SDimitry Andric "hcx", "HasHCX", "true", "Enable Armv8.7-A HCRX_EL2 system register">; 431e8d8bef9SDimitry Andric 432e8d8bef9SDimitry Andricdef FeatureLS64 : SubtargetFeature<"ls64", "HasLS64", 433e8d8bef9SDimitry Andric "true", "Enable Armv8.7-A LD64B/ST64B Accelerator Extension">; 434e8d8bef9SDimitry Andric 43504eeddc0SDimitry Andricdef FeatureHBC : SubtargetFeature<"hbc", "HasHBC", 43604eeddc0SDimitry Andric "true", "Enable Armv8.8-A Hinted Conditional Branches Extension">; 43704eeddc0SDimitry Andric 43804eeddc0SDimitry Andricdef FeatureMOPS : SubtargetFeature<"mops", "HasMOPS", 43904eeddc0SDimitry Andric "true", "Enable Armv8.8-A memcpy and memset acceleration instructions">; 44004eeddc0SDimitry Andric 441e8d8bef9SDimitry Andricdef FeatureBRBE : SubtargetFeature<"brbe", "HasBRBE", 442e8d8bef9SDimitry Andric "true", "Enable Branch Record Buffer Extension">; 443e8d8bef9SDimitry Andric 444e8d8bef9SDimitry Andricdef FeatureSPE_EEF : SubtargetFeature<"spe-eef", "HasSPE_EEF", 445e8d8bef9SDimitry Andric "true", "Enable extra register in the Statistical Profiling Extension">; 446e8d8bef9SDimitry Andric 4475ffd83dbSDimitry Andricdef FeatureFineGrainedTraps : SubtargetFeature<"fgt", "HasFineGrainedTraps", 4485ffd83dbSDimitry Andric "true", "Enable fine grained virtualization traps extension">; 4495ffd83dbSDimitry Andric 4505ffd83dbSDimitry Andricdef FeatureEnhancedCounterVirtualization : 4515ffd83dbSDimitry Andric SubtargetFeature<"ecv", "HasEnhancedCounterVirtualization", 4525ffd83dbSDimitry Andric "true", "Enable enhanced counter virtualization extension">; 4535ffd83dbSDimitry Andric 454fe6060f1SDimitry Andricdef FeatureRME : SubtargetFeature<"rme", "HasRME", 455fe6060f1SDimitry Andric "true", "Enable Realm Management Extension">; 456fe6060f1SDimitry Andric 457fe6060f1SDimitry Andricdef FeatureSME : SubtargetFeature<"sme", "HasSME", "true", 458*81ad6265SDimitry Andric "Enable Scalable Matrix Extension (SME)", [FeatureBF16, FeatureUseScalarIncVL]>; 459fe6060f1SDimitry Andric 460fe6060f1SDimitry Andricdef FeatureSMEF64 : SubtargetFeature<"sme-f64", "HasSMEF64", "true", 461fe6060f1SDimitry Andric "Enable Scalable Matrix Extension (SME) F64F64 instructions", [FeatureSME]>; 462fe6060f1SDimitry Andric 463fe6060f1SDimitry Andricdef FeatureSMEI64 : SubtargetFeature<"sme-i64", "HasSMEI64", "true", 464fe6060f1SDimitry Andric "Enable Scalable Matrix Extension (SME) I16I64 instructions", [FeatureSME]>; 465fe6060f1SDimitry Andric 466349cc55cSDimitry Andricdef FeatureAppleA7SysReg : SubtargetFeature<"apple-a7-sysreg", "HasAppleA7SysReg", "true", 467349cc55cSDimitry Andric "Apple A7 (the CPU formerly known as Cyclone)">; 468349cc55cSDimitry Andric 469349cc55cSDimitry Andricdef FeatureEL2VMSA : SubtargetFeature<"el2vmsa", "HasEL2VMSA", "true", 470349cc55cSDimitry Andric "Enable Exception Level 2 Virtual Memory System Architecture">; 471349cc55cSDimitry Andric 472349cc55cSDimitry Andricdef FeatureEL3 : SubtargetFeature<"el3", "HasEL3", "true", 473349cc55cSDimitry Andric "Enable Exception Level 3">; 474349cc55cSDimitry Andric 4750eae32dcSDimitry Andricdef FeatureFixCortexA53_835769 : SubtargetFeature<"fix-cortex-a53-835769", 4760eae32dcSDimitry Andric "FixCortexA53_835769", "true", "Mitigate Cortex-A53 Erratum 835769">; 4770eae32dcSDimitry Andric 4783a9a9c0cSDimitry Andricdef FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice", 4793a9a9c0cSDimitry Andric "NoBTIAtReturnTwice", "true", 4803a9a9c0cSDimitry Andric "Don't place a BTI instruction " 4813a9a9c0cSDimitry Andric "after a return-twice">; 4823a9a9c0cSDimitry Andric 4830b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4840b57cec5SDimitry Andric// Architectures. 4850b57cec5SDimitry Andric// 486349cc55cSDimitry Andricdef HasV8_0aOps : SubtargetFeature<"v8a", "HasV8_0aOps", "true", 487349cc55cSDimitry Andric "Support ARM v8.0a instructions", [FeatureEL2VMSA, FeatureEL3]>; 4880b57cec5SDimitry Andric 4890b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true", 490349cc55cSDimitry Andric "Support ARM v8.1a instructions", [HasV8_0aOps, FeatureCRC, FeatureLSE, 491349cc55cSDimitry Andric FeatureRDM, FeaturePAN, FeatureLOR, FeatureVH]>; 4920b57cec5SDimitry Andric 4930b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true", 4940b57cec5SDimitry Andric "Support ARM v8.2a instructions", [HasV8_1aOps, FeaturePsUAO, 4950b57cec5SDimitry Andric FeaturePAN_RWV, FeatureRAS, FeatureCCPP]>; 4960b57cec5SDimitry Andric 4970b57cec5SDimitry Andricdef HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true", 498e8d8bef9SDimitry Andric "Support ARM v8.3a instructions", [HasV8_2aOps, FeatureRCPC, FeaturePAuth, 4990b57cec5SDimitry Andric FeatureJS, FeatureCCIDX, FeatureComplxNum]>; 5000b57cec5SDimitry Andric 5010b57cec5SDimitry Andricdef HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true", 5020b57cec5SDimitry Andric "Support ARM v8.4a instructions", [HasV8_3aOps, FeatureDotProd, 503e8d8bef9SDimitry Andric FeatureNV, FeatureMPAM, FeatureDIT, 504349cc55cSDimitry Andric FeatureTRACEV8_4, FeatureAM, FeatureSEL2, FeatureTLB_RMI, 505349cc55cSDimitry Andric FeatureFlagM, FeatureRCPC_IMMO, FeatureLSE2]>; 5060b57cec5SDimitry Andric 5070b57cec5SDimitry Andricdef HasV8_5aOps : SubtargetFeature< 5080b57cec5SDimitry Andric "v8.5a", "HasV8_5aOps", "true", "Support ARM v8.5a instructions", 5090b57cec5SDimitry Andric [HasV8_4aOps, FeatureAltFPCmp, FeatureFRInt3264, FeatureSpecRestrict, 5100b57cec5SDimitry Andric FeatureSSBS, FeatureSB, FeaturePredRes, FeatureCacheDeepPersist, 5115ffd83dbSDimitry Andric FeatureBranchTargetId]>; 5125ffd83dbSDimitry Andric 5135ffd83dbSDimitry Andricdef HasV8_6aOps : SubtargetFeature< 5145ffd83dbSDimitry Andric "v8.6a", "HasV8_6aOps", "true", "Support ARM v8.6a instructions", 5155ffd83dbSDimitry Andric [HasV8_5aOps, FeatureAMVS, FeatureBF16, FeatureFineGrainedTraps, 5165ffd83dbSDimitry Andric FeatureEnhancedCounterVirtualization, FeatureMatMulInt8]>; 5170b57cec5SDimitry Andric 518e8d8bef9SDimitry Andricdef HasV8_7aOps : SubtargetFeature< 519e8d8bef9SDimitry Andric "v8.7a", "HasV8_7aOps", "true", "Support ARM v8.7a instructions", 520e8d8bef9SDimitry Andric [HasV8_6aOps, FeatureXS, FeatureWFxT, FeatureHCX]>; 521e8d8bef9SDimitry Andric 52204eeddc0SDimitry Andricdef HasV8_8aOps : SubtargetFeature< 52304eeddc0SDimitry Andric "v8.8a", "HasV8_8aOps", "true", "Support ARM v8.8a instructions", 52404eeddc0SDimitry Andric [HasV8_7aOps, FeatureHBC, FeatureMOPS]>; 52504eeddc0SDimitry Andric 526349cc55cSDimitry Andricdef HasV9_0aOps : SubtargetFeature< 527349cc55cSDimitry Andric "v9a", "HasV9_0aOps", "true", "Support ARM v9a instructions", 528349cc55cSDimitry Andric [HasV8_5aOps, FeatureSVE2]>; 529349cc55cSDimitry Andric 530349cc55cSDimitry Andricdef HasV9_1aOps : SubtargetFeature< 531349cc55cSDimitry Andric "v9.1a", "HasV9_1aOps", "true", "Support ARM v9.1a instructions", 532349cc55cSDimitry Andric [HasV8_6aOps, HasV9_0aOps]>; 533349cc55cSDimitry Andric 534349cc55cSDimitry Andricdef HasV9_2aOps : SubtargetFeature< 535349cc55cSDimitry Andric "v9.2a", "HasV9_2aOps", "true", "Support ARM v9.2a instructions", 536349cc55cSDimitry Andric [HasV8_7aOps, HasV9_1aOps]>; 537349cc55cSDimitry Andric 53804eeddc0SDimitry Andricdef HasV9_3aOps : SubtargetFeature< 53904eeddc0SDimitry Andric "v9.3a", "HasV9_3aOps", "true", "Support ARM v9.3a instructions", 54004eeddc0SDimitry Andric [HasV8_8aOps, HasV9_2aOps]>; 54104eeddc0SDimitry Andric 542e8d8bef9SDimitry Andricdef HasV8_0rOps : SubtargetFeature< 543e8d8bef9SDimitry Andric "v8r", "HasV8_0rOps", "true", "Support ARM v8r instructions", 544e8d8bef9SDimitry Andric [//v8.1 545e8d8bef9SDimitry Andric FeatureCRC, FeaturePAN, FeatureRDM, FeatureLSE, FeatureCONTEXTIDREL2, 546e8d8bef9SDimitry Andric //v8.2 54704eeddc0SDimitry Andric FeatureRAS, FeaturePsUAO, FeatureCCPP, FeaturePAN_RWV, 548e8d8bef9SDimitry Andric //v8.3 549e8d8bef9SDimitry Andric FeatureComplxNum, FeatureCCIDX, FeatureJS, 550e8d8bef9SDimitry Andric FeaturePAuth, FeatureRCPC, 551e8d8bef9SDimitry Andric //v8.4 55204eeddc0SDimitry Andric FeatureDotProd, FeatureTRACEV8_4, FeatureTLB_RMI, 553*81ad6265SDimitry Andric FeatureFlagM, FeatureDIT, FeatureSEL2, FeatureRCPC_IMMO, 554*81ad6265SDimitry Andric // Not mandatory in v8.0-R, but included here on the grounds that it 555*81ad6265SDimitry Andric // only enables names of system registers 556*81ad6265SDimitry Andric FeatureSpecRestrict 557*81ad6265SDimitry Andric ]>; 558*81ad6265SDimitry Andric 559*81ad6265SDimitry Andric// Only intended to be used by disassemblers. 560*81ad6265SDimitry Andricdef FeatureAll 561*81ad6265SDimitry Andric : SubtargetFeature<"all", "IsAll", "true", "Enable all instructions", []>; 562*81ad6265SDimitry Andric 563*81ad6265SDimitry Andricclass AssemblerPredicateWithAll<dag cond, string name=""> 564*81ad6265SDimitry Andric : AssemblerPredicate<(any_of FeatureAll, cond), name>; 565e8d8bef9SDimitry Andric 5660b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5670b57cec5SDimitry Andric// Register File Description 5680b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5690b57cec5SDimitry Andric 5700b57cec5SDimitry Andricinclude "AArch64RegisterInfo.td" 5710b57cec5SDimitry Andricinclude "AArch64RegisterBanks.td" 5720b57cec5SDimitry Andricinclude "AArch64CallingConvention.td" 5730b57cec5SDimitry Andric 5740b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5750b57cec5SDimitry Andric// Instruction Descriptions 5760b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5770b57cec5SDimitry Andric 5780b57cec5SDimitry Andricinclude "AArch64Schedule.td" 5790b57cec5SDimitry Andricinclude "AArch64InstrInfo.td" 5800b57cec5SDimitry Andricinclude "AArch64SchedPredicates.td" 5810b57cec5SDimitry Andricinclude "AArch64SchedPredExynos.td" 5822a66634dSDimitry Andricinclude "AArch64SchedPredAmpere.td" 5838bcb0991SDimitry Andricinclude "AArch64Combine.td" 5840b57cec5SDimitry Andric 5850b57cec5SDimitry Andricdef AArch64InstrInfo : InstrInfo; 5860b57cec5SDimitry Andric 5870b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5880b57cec5SDimitry Andric// Named operands for MRS/MSR/TLBI/... 5890b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5900b57cec5SDimitry Andric 5910b57cec5SDimitry Andricinclude "AArch64SystemOperands.td" 5920b57cec5SDimitry Andric 5930b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5940b57cec5SDimitry Andric// Access to privileged registers 5950b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5960b57cec5SDimitry Andric 5970b57cec5SDimitry Andricforeach i = 1-3 in 5980b57cec5SDimitry Andricdef FeatureUseEL#i#ForTP : SubtargetFeature<"tpidr-el"#i, "UseEL"#i#"ForTP", 5990b57cec5SDimitry Andric "true", "Permit use of TPIDR_EL"#i#" for the TLS base">; 6000b57cec5SDimitry Andric 6010b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 6025ffd83dbSDimitry Andric// Control codegen mitigation against Straight Line Speculation vulnerability. 6035ffd83dbSDimitry Andric//===----------------------------------------------------------------------===// 6045ffd83dbSDimitry Andric 6055ffd83dbSDimitry Andricdef FeatureHardenSlsRetBr : SubtargetFeature<"harden-sls-retbr", 6065ffd83dbSDimitry Andric "HardenSlsRetBr", "true", 6075ffd83dbSDimitry Andric "Harden against straight line speculation across RET and BR instructions">; 6085ffd83dbSDimitry Andricdef FeatureHardenSlsBlr : SubtargetFeature<"harden-sls-blr", 6095ffd83dbSDimitry Andric "HardenSlsBlr", "true", 6105ffd83dbSDimitry Andric "Harden against straight line speculation across BLR instructions">; 611fe6060f1SDimitry Andricdef FeatureHardenSlsNoComdat : SubtargetFeature<"harden-sls-nocomdat", 612fe6060f1SDimitry Andric "HardenSlsNoComdat", "true", 613fe6060f1SDimitry Andric "Generate thunk code for SLS mitigation in the normal text section">; 6145ffd83dbSDimitry Andric 6155ffd83dbSDimitry Andric//===----------------------------------------------------------------------===// 6160b57cec5SDimitry Andric// AArch64 Processors supported. 6170b57cec5SDimitry Andric// 6180b57cec5SDimitry Andric 6190b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 6200b57cec5SDimitry Andric// Unsupported features to disable for scheduling models 6210b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 6220b57cec5SDimitry Andric 6230b57cec5SDimitry Andricclass AArch64Unsupported { list<Predicate> F; } 6240b57cec5SDimitry Andric 6250b57cec5SDimitry Andricdef SVEUnsupported : AArch64Unsupported { 6260b57cec5SDimitry Andric let F = [HasSVE, HasSVE2, HasSVE2AES, HasSVE2SM4, HasSVE2SHA3, 627*81ad6265SDimitry Andric HasSVE2BitPerm, HasSVEorSME, HasSVE2orSME]; 6280b57cec5SDimitry Andric} 6290b57cec5SDimitry Andric 630e837bb5cSDimitry Andricdef PAUnsupported : AArch64Unsupported { 631e8d8bef9SDimitry Andric let F = [HasPAuth]; 632e837bb5cSDimitry Andric} 633e837bb5cSDimitry Andric 634fe6060f1SDimitry Andricdef SMEUnsupported : AArch64Unsupported { 635fe6060f1SDimitry Andric let F = [HasSME, HasSMEF64, HasSMEI64]; 636fe6060f1SDimitry Andric} 637fe6060f1SDimitry Andric 6380b57cec5SDimitry Andricinclude "AArch64SchedA53.td" 639e8d8bef9SDimitry Andricinclude "AArch64SchedA55.td" 6400b57cec5SDimitry Andricinclude "AArch64SchedA57.td" 6410b57cec5SDimitry Andricinclude "AArch64SchedCyclone.td" 6420b57cec5SDimitry Andricinclude "AArch64SchedFalkor.td" 6430b57cec5SDimitry Andricinclude "AArch64SchedKryo.td" 6440b57cec5SDimitry Andricinclude "AArch64SchedExynosM3.td" 6450b57cec5SDimitry Andricinclude "AArch64SchedExynosM4.td" 646480093f4SDimitry Andricinclude "AArch64SchedExynosM5.td" 6470b57cec5SDimitry Andricinclude "AArch64SchedThunderX.td" 6480b57cec5SDimitry Andricinclude "AArch64SchedThunderX2T99.td" 649e8d8bef9SDimitry Andricinclude "AArch64SchedA64FX.td" 650e837bb5cSDimitry Andricinclude "AArch64SchedThunderX3T110.td" 651e8d8bef9SDimitry Andricinclude "AArch64SchedTSV110.td" 6522a66634dSDimitry Andricinclude "AArch64SchedAmpere1.td" 6530b57cec5SDimitry Andric 654349cc55cSDimitry Andricdef TuneA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", 655349cc55cSDimitry Andric "Cortex-A35 ARM processors">; 6560b57cec5SDimitry Andric 657349cc55cSDimitry Andricdef TuneA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53", 6580b57cec5SDimitry Andric "Cortex-A53 ARM processors", [ 6590b57cec5SDimitry Andric FeatureFuseAES, 660349cc55cSDimitry Andric FeatureBalanceFPOps, 661349cc55cSDimitry Andric FeatureCustomCheapAsMoveHandling, 662349cc55cSDimitry Andric FeaturePostRAScheduler]>; 6630b57cec5SDimitry Andric 664349cc55cSDimitry Andricdef TuneA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55", 6650b57cec5SDimitry Andric "Cortex-A55 ARM processors", [ 6660b57cec5SDimitry Andric FeatureFuseAES, 667fe6060f1SDimitry Andric FeaturePostRAScheduler, 668349cc55cSDimitry Andric FeatureFuseAddress]>; 669349cc55cSDimitry Andric 670349cc55cSDimitry Andricdef TuneA510 : SubtargetFeature<"a510", "ARMProcFamily", "CortexA510", 671349cc55cSDimitry Andric "Cortex-A510 ARM processors", [ 672349cc55cSDimitry Andric FeatureFuseAES, 673349cc55cSDimitry Andric FeaturePostRAScheduler 6740b57cec5SDimitry Andric ]>; 6750b57cec5SDimitry Andric 676349cc55cSDimitry Andricdef TuneA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57", 6770b57cec5SDimitry Andric "Cortex-A57 ARM processors", [ 678349cc55cSDimitry Andric FeatureFuseAES, 6790b57cec5SDimitry Andric FeatureBalanceFPOps, 6800b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 681*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 6820b57cec5SDimitry Andric FeatureFuseLiterals, 6830b57cec5SDimitry Andric FeaturePostRAScheduler, 684349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 6850b57cec5SDimitry Andric 686349cc55cSDimitry Andricdef TuneA65 : SubtargetFeature<"a65", "ARMProcFamily", "CortexA65", 6878bcb0991SDimitry Andric "Cortex-A65 ARM processors", [ 688349cc55cSDimitry Andric FeatureFuseAES, 689e8d8bef9SDimitry Andric FeatureFuseAddress, 690*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 691349cc55cSDimitry Andric FeatureFuseLiterals]>; 6928bcb0991SDimitry Andric 693349cc55cSDimitry Andricdef TuneA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72", 6940b57cec5SDimitry Andric "Cortex-A72 ARM processors", [ 6950b57cec5SDimitry Andric FeatureFuseAES, 696*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 697349cc55cSDimitry Andric FeatureFuseLiterals]>; 6980b57cec5SDimitry Andric 699349cc55cSDimitry Andricdef TuneA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73", 7000b57cec5SDimitry Andric "Cortex-A73 ARM processors", [ 701349cc55cSDimitry Andric FeatureFuseAES]>; 7020b57cec5SDimitry Andric 703349cc55cSDimitry Andricdef TuneA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75", 7040b57cec5SDimitry Andric "Cortex-A75 ARM processors", [ 705349cc55cSDimitry Andric FeatureFuseAES]>; 7060b57cec5SDimitry Andric 707349cc55cSDimitry Andricdef TuneA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76", 7080b57cec5SDimitry Andric "Cortex-A76 ARM processors", [ 709349cc55cSDimitry Andric FeatureFuseAES]>; 7100b57cec5SDimitry Andric 711349cc55cSDimitry Andricdef TuneA77 : SubtargetFeature<"a77", "ARMProcFamily", "CortexA77", 7125ffd83dbSDimitry Andric "Cortex-A77 ARM processors", [ 713e8d8bef9SDimitry Andric FeatureCmpBccFusion, 714349cc55cSDimitry Andric FeatureFuseAES]>; 7155ffd83dbSDimitry Andric 716349cc55cSDimitry Andricdef TuneA78 : SubtargetFeature<"a78", "ARMProcFamily", "CortexA78", 7175ffd83dbSDimitry Andric "Cortex-A78 ARM processors", [ 718e8d8bef9SDimitry Andric FeatureCmpBccFusion, 7195ffd83dbSDimitry Andric FeatureFuseAES, 720349cc55cSDimitry Andric FeaturePostRAScheduler]>; 7215ffd83dbSDimitry Andric 722349cc55cSDimitry Andricdef TuneA78C : SubtargetFeature<"a78c", "ARMProcFamily", 723e8d8bef9SDimitry Andric "CortexA78C", 724e8d8bef9SDimitry Andric "Cortex-A78C ARM processors", [ 725e8d8bef9SDimitry Andric FeatureCmpBccFusion, 726e8d8bef9SDimitry Andric FeatureFuseAES, 727349cc55cSDimitry Andric FeaturePostRAScheduler]>; 728e8d8bef9SDimitry Andric 729349cc55cSDimitry Andricdef TuneA710 : SubtargetFeature<"a710", "ARMProcFamily", "CortexA710", 730349cc55cSDimitry Andric "Cortex-A710 ARM processors", [ 731349cc55cSDimitry Andric FeatureFuseAES, 732349cc55cSDimitry Andric FeaturePostRAScheduler, 733349cc55cSDimitry Andric FeatureCmpBccFusion]>; 734349cc55cSDimitry Andric 735349cc55cSDimitry Andricdef TuneR82 : SubtargetFeature<"cortex-r82", "ARMProcFamily", 736e8d8bef9SDimitry Andric "CortexR82", 737349cc55cSDimitry Andric "Cortex-R82 ARM processors", [ 738349cc55cSDimitry Andric FeaturePostRAScheduler]>; 739e8d8bef9SDimitry Andric 740349cc55cSDimitry Andricdef TuneX1 : SubtargetFeature<"cortex-x1", "ARMProcFamily", "CortexX1", 7415ffd83dbSDimitry Andric "Cortex-X1 ARM processors", [ 742e8d8bef9SDimitry Andric FeatureCmpBccFusion, 7435ffd83dbSDimitry Andric FeatureFuseAES, 744349cc55cSDimitry Andric FeaturePostRAScheduler]>; 7455ffd83dbSDimitry Andric 746349cc55cSDimitry Andricdef TuneX2 : SubtargetFeature<"cortex-x2", "ARMProcFamily", "CortexX2", 747349cc55cSDimitry Andric "Cortex-X2 ARM processors", [ 748349cc55cSDimitry Andric FeatureFuseAES, 7495ffd83dbSDimitry Andric FeaturePostRAScheduler, 750349cc55cSDimitry Andric FeatureCmpBccFusion]>; 751349cc55cSDimitry Andric 752349cc55cSDimitry Andricdef TuneA64FX : SubtargetFeature<"a64fx", "ARMProcFamily", "A64FX", 753349cc55cSDimitry Andric "Fujitsu A64FX processors", [ 754349cc55cSDimitry Andric FeaturePostRAScheduler, 755e8d8bef9SDimitry Andric FeatureAggressiveFMA, 756e8d8bef9SDimitry Andric FeatureArithmeticBccFusion, 757e8d8bef9SDimitry Andric FeaturePredictableSelectIsExpensive 7585ffd83dbSDimitry Andric ]>; 7595ffd83dbSDimitry Andric 760349cc55cSDimitry Andricdef TuneCarmel : SubtargetFeature<"carmel", "ARMProcFamily", "Carmel", 761349cc55cSDimitry Andric "Nvidia Carmel processors">; 7625ffd83dbSDimitry Andric 7630b57cec5SDimitry Andric// Note that cyclone does not fuse AES instructions, but newer apple chips do 7640b57cec5SDimitry Andric// perform the fusion and cyclone is used by default when targetting apple OSes. 765349cc55cSDimitry Andricdef TuneAppleA7 : SubtargetFeature<"apple-a7", "ARMProcFamily", "AppleA7", 766480093f4SDimitry Andric "Apple A7 (the CPU formerly known as Cyclone)", [ 7670b57cec5SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 7680b57cec5SDimitry Andric FeatureArithmeticBccFusion, 7690b57cec5SDimitry Andric FeatureArithmeticCbzFusion, 7700b57cec5SDimitry Andric FeatureDisableLatencySchedHeuristic, 771349cc55cSDimitry Andric FeatureFuseAES, FeatureFuseCryptoEOR, 7720b57cec5SDimitry Andric FeatureZCRegMove, 7730b57cec5SDimitry Andric FeatureZCZeroing, 774349cc55cSDimitry Andric FeatureZCZeroingFPWorkaround] 775349cc55cSDimitry Andric >; 7760b57cec5SDimitry Andric 777349cc55cSDimitry Andricdef TuneAppleA10 : SubtargetFeature<"apple-a10", "ARMProcFamily", "AppleA10", 778480093f4SDimitry Andric "Apple A10", [ 779480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 780480093f4SDimitry Andric FeatureArithmeticBccFusion, 781480093f4SDimitry Andric FeatureArithmeticCbzFusion, 782480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 7830b57cec5SDimitry Andric FeatureFuseAES, 784480093f4SDimitry Andric FeatureFuseCryptoEOR, 785480093f4SDimitry Andric FeatureZCRegMove, 786349cc55cSDimitry Andric FeatureZCZeroing] 787349cc55cSDimitry Andric >; 7880b57cec5SDimitry Andric 789349cc55cSDimitry Andricdef TuneAppleA11 : SubtargetFeature<"apple-a11", "ARMProcFamily", "AppleA11", 790480093f4SDimitry Andric "Apple A11", [ 791480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 792480093f4SDimitry Andric FeatureArithmeticBccFusion, 793480093f4SDimitry Andric FeatureArithmeticCbzFusion, 794480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 7950b57cec5SDimitry Andric FeatureFuseAES, 796480093f4SDimitry Andric FeatureFuseCryptoEOR, 797480093f4SDimitry Andric FeatureZCRegMove, 798349cc55cSDimitry Andric FeatureZCZeroing] 799349cc55cSDimitry Andric >; 800480093f4SDimitry Andric 801349cc55cSDimitry Andricdef TuneAppleA12 : SubtargetFeature<"apple-a12", "ARMProcFamily", "AppleA12", 802480093f4SDimitry Andric "Apple A12", [ 803480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 804480093f4SDimitry Andric FeatureArithmeticBccFusion, 805480093f4SDimitry Andric FeatureArithmeticCbzFusion, 806480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 807480093f4SDimitry Andric FeatureFuseAES, 808480093f4SDimitry Andric FeatureFuseCryptoEOR, 809480093f4SDimitry Andric FeatureZCRegMove, 810349cc55cSDimitry Andric FeatureZCZeroing] 811349cc55cSDimitry Andric >; 812480093f4SDimitry Andric 813349cc55cSDimitry Andricdef TuneAppleA13 : SubtargetFeature<"apple-a13", "ARMProcFamily", "AppleA13", 814480093f4SDimitry Andric "Apple A13", [ 815480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 816480093f4SDimitry Andric FeatureArithmeticBccFusion, 817480093f4SDimitry Andric FeatureArithmeticCbzFusion, 818480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 819480093f4SDimitry Andric FeatureFuseAES, 820480093f4SDimitry Andric FeatureFuseCryptoEOR, 821480093f4SDimitry Andric FeatureZCRegMove, 822349cc55cSDimitry Andric FeatureZCZeroing] 823349cc55cSDimitry Andric >; 8240b57cec5SDimitry Andric 825349cc55cSDimitry Andricdef TuneAppleA14 : SubtargetFeature<"apple-a14", "ARMProcFamily", "AppleA14", 826e8d8bef9SDimitry Andric "Apple A14", [ 827e8d8bef9SDimitry Andric FeatureAggressiveFMA, 828e8d8bef9SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 829e8d8bef9SDimitry Andric FeatureArithmeticBccFusion, 830e8d8bef9SDimitry Andric FeatureArithmeticCbzFusion, 831e8d8bef9SDimitry Andric FeatureDisableLatencySchedHeuristic, 832e8d8bef9SDimitry Andric FeatureFuseAddress, 833e8d8bef9SDimitry Andric FeatureFuseAES, 834e8d8bef9SDimitry Andric FeatureFuseArithmeticLogic, 835e8d8bef9SDimitry Andric FeatureFuseCCSelect, 836e8d8bef9SDimitry Andric FeatureFuseCryptoEOR, 837*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 838e8d8bef9SDimitry Andric FeatureFuseLiterals, 839e8d8bef9SDimitry Andric FeatureZCRegMove, 840349cc55cSDimitry Andric FeatureZCZeroing]>; 841e8d8bef9SDimitry Andric 842349cc55cSDimitry Andricdef TuneExynosM3 : SubtargetFeature<"exynosm3", "ARMProcFamily", "ExynosM3", 8430b57cec5SDimitry Andric "Samsung Exynos-M3 processors", 844349cc55cSDimitry Andric [FeatureExynosCheapAsMoveHandling, 8450b57cec5SDimitry Andric FeatureForce32BitJumpTables, 8460b57cec5SDimitry Andric FeatureFuseAddress, 8470b57cec5SDimitry Andric FeatureFuseAES, 8480b57cec5SDimitry Andric FeatureFuseCCSelect, 849*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 8500b57cec5SDimitry Andric FeatureFuseLiterals, 8510b57cec5SDimitry Andric FeatureLSLFast, 8520b57cec5SDimitry Andric FeaturePostRAScheduler, 853fe6060f1SDimitry Andric FeaturePredictableSelectIsExpensive]>; 8540b57cec5SDimitry Andric 855*81ad6265SDimitry Andric// Re-uses some scheduling and tunings from the ExynosM3 proc family. 856*81ad6265SDimitry Andricdef TuneExynosM4 : SubtargetFeature<"exynosm4", "ARMProcFamily", "ExynosM3", 857*81ad6265SDimitry Andric "Samsung Exynos-M4 processors", 858349cc55cSDimitry Andric [FeatureArithmeticBccFusion, 8590b57cec5SDimitry Andric FeatureArithmeticCbzFusion, 8600b57cec5SDimitry Andric FeatureExynosCheapAsMoveHandling, 8610b57cec5SDimitry Andric FeatureForce32BitJumpTables, 8620b57cec5SDimitry Andric FeatureFuseAddress, 8630b57cec5SDimitry Andric FeatureFuseAES, 8640b57cec5SDimitry Andric FeatureFuseArithmeticLogic, 8650b57cec5SDimitry Andric FeatureFuseCCSelect, 866*81ad6265SDimitry Andric FeatureFuseAdrpAdd, 8670b57cec5SDimitry Andric FeatureFuseLiterals, 8680b57cec5SDimitry Andric FeatureLSLFast, 8690b57cec5SDimitry Andric FeaturePostRAScheduler, 8700b57cec5SDimitry Andric FeatureZCZeroing]>; 8710b57cec5SDimitry Andric 872349cc55cSDimitry Andricdef TuneKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo", 8730b57cec5SDimitry Andric "Qualcomm Kryo processors", [ 8740b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 8750b57cec5SDimitry Andric FeaturePostRAScheduler, 8760b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 8770b57cec5SDimitry Andric FeatureZCZeroing, 878349cc55cSDimitry Andric FeatureLSLFast] 879349cc55cSDimitry Andric >; 8800b57cec5SDimitry Andric 881349cc55cSDimitry Andricdef TuneFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor", 8820b57cec5SDimitry Andric "Qualcomm Falkor processors", [ 8830b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 8840b57cec5SDimitry Andric FeaturePostRAScheduler, 8850b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 8860b57cec5SDimitry Andric FeatureZCZeroing, 8870b57cec5SDimitry Andric FeatureLSLFast, 8880b57cec5SDimitry Andric FeatureSlowSTRQro 8890b57cec5SDimitry Andric ]>; 8900b57cec5SDimitry Andric 891349cc55cSDimitry Andricdef TuneNeoverseE1 : SubtargetFeature<"neoversee1", "ARMProcFamily", "NeoverseE1", 8928bcb0991SDimitry Andric "Neoverse E1 ARM processors", [ 893fe6060f1SDimitry Andric FeaturePostRAScheduler, 894349cc55cSDimitry Andric FeatureFuseAES 8958bcb0991SDimitry Andric ]>; 8968bcb0991SDimitry Andric 897349cc55cSDimitry Andricdef TuneNeoverseN1 : SubtargetFeature<"neoversen1", "ARMProcFamily", "NeoverseN1", 8988bcb0991SDimitry Andric "Neoverse N1 ARM processors", [ 899fe6060f1SDimitry Andric FeaturePostRAScheduler, 900349cc55cSDimitry Andric FeatureFuseAES 9018bcb0991SDimitry Andric ]>; 9028bcb0991SDimitry Andric 903349cc55cSDimitry Andricdef TuneNeoverseN2 : SubtargetFeature<"neoversen2", "ARMProcFamily", "NeoverseN2", 904e8d8bef9SDimitry Andric "Neoverse N2 ARM processors", [ 905fe6060f1SDimitry Andric FeaturePostRAScheduler, 906349cc55cSDimitry Andric FeatureFuseAES 907349cc55cSDimitry Andric ]>; 908349cc55cSDimitry Andricdef TuneNeoverse512TVB : SubtargetFeature<"neoverse512tvb", "ARMProcFamily", "Neoverse512TVB", 909349cc55cSDimitry Andric "Neoverse 512-TVB ARM processors", [ 910349cc55cSDimitry Andric FeaturePostRAScheduler, 911349cc55cSDimitry Andric FeatureFuseAES 912fe6060f1SDimitry Andric ]>; 913e8d8bef9SDimitry Andric 914349cc55cSDimitry Andricdef TuneNeoverseV1 : SubtargetFeature<"neoversev1", "ARMProcFamily", "NeoverseV1", 915e8d8bef9SDimitry Andric "Neoverse V1 ARM processors", [ 916e8d8bef9SDimitry Andric FeatureFuseAES, 917349cc55cSDimitry Andric FeaturePostRAScheduler]>; 918e8d8bef9SDimitry Andric 919349cc55cSDimitry Andricdef TuneSaphira : SubtargetFeature<"saphira", "ARMProcFamily", "Saphira", 9200b57cec5SDimitry Andric "Qualcomm Saphira processors", [ 9210b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 9220b57cec5SDimitry Andric FeaturePostRAScheduler, 9230b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 9240b57cec5SDimitry Andric FeatureZCZeroing, 925349cc55cSDimitry Andric FeatureLSLFast]>; 9260b57cec5SDimitry Andric 927349cc55cSDimitry Andricdef TuneThunderX2T99 : SubtargetFeature<"thunderx2t99", "ARMProcFamily", "ThunderX2T99", 9280b57cec5SDimitry Andric "Cavium ThunderX2 processors", [ 9290b57cec5SDimitry Andric FeatureAggressiveFMA, 9300b57cec5SDimitry Andric FeatureArithmeticBccFusion, 9310b57cec5SDimitry Andric FeaturePostRAScheduler, 932349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 9330b57cec5SDimitry Andric 934349cc55cSDimitry Andricdef TuneThunderX3T110 : SubtargetFeature<"thunderx3t110", "ARMProcFamily", 935e837bb5cSDimitry Andric "ThunderX3T110", 936e837bb5cSDimitry Andric "Marvell ThunderX3 processors", [ 937e837bb5cSDimitry Andric FeatureAggressiveFMA, 938e837bb5cSDimitry Andric FeatureArithmeticBccFusion, 939e837bb5cSDimitry Andric FeaturePostRAScheduler, 940e837bb5cSDimitry Andric FeaturePredictableSelectIsExpensive, 941e837bb5cSDimitry Andric FeatureBalanceFPOps, 942349cc55cSDimitry Andric FeatureStrictAlign]>; 943e837bb5cSDimitry Andric 944349cc55cSDimitry Andricdef TuneThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX", 9450b57cec5SDimitry Andric "Cavium ThunderX processors", [ 9460b57cec5SDimitry Andric FeaturePostRAScheduler, 947349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 9480b57cec5SDimitry Andric 949349cc55cSDimitry Andricdef TuneThunderXT88 : SubtargetFeature<"thunderxt88", "ARMProcFamily", 9500b57cec5SDimitry Andric "ThunderXT88", 9510b57cec5SDimitry Andric "Cavium ThunderX processors", [ 9520b57cec5SDimitry Andric FeaturePostRAScheduler, 953349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 9540b57cec5SDimitry Andric 955349cc55cSDimitry Andricdef TuneThunderXT81 : SubtargetFeature<"thunderxt81", "ARMProcFamily", 9560b57cec5SDimitry Andric "ThunderXT81", 9570b57cec5SDimitry Andric "Cavium ThunderX processors", [ 9580b57cec5SDimitry Andric FeaturePostRAScheduler, 959349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 9600b57cec5SDimitry Andric 961349cc55cSDimitry Andricdef TuneThunderXT83 : SubtargetFeature<"thunderxt83", "ARMProcFamily", 9620b57cec5SDimitry Andric "ThunderXT83", 9630b57cec5SDimitry Andric "Cavium ThunderX processors", [ 9640b57cec5SDimitry Andric FeaturePostRAScheduler, 965349cc55cSDimitry Andric FeaturePredictableSelectIsExpensive]>; 9660b57cec5SDimitry Andric 967349cc55cSDimitry Andricdef TuneTSV110 : SubtargetFeature<"tsv110", "ARMProcFamily", "TSV110", 9680b57cec5SDimitry Andric "HiSilicon TS-V110 processors", [ 9690b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 9700b57cec5SDimitry Andric FeatureFuseAES, 971349cc55cSDimitry Andric FeaturePostRAScheduler]>; 9720b57cec5SDimitry Andric 9732a66634dSDimitry Andricdef TuneAmpere1 : SubtargetFeature<"ampere1", "ARMProcFamily", "Ampere1", 9742a66634dSDimitry Andric "Ampere Computing Ampere-1 processors", [ 9752a66634dSDimitry Andric FeaturePostRAScheduler, 9762a66634dSDimitry Andric FeatureFuseAES, 9772a66634dSDimitry Andric FeatureLSLFast, 9782a66634dSDimitry Andric FeatureAggressiveFMA, 9792a66634dSDimitry Andric FeatureArithmeticBccFusion, 9802a66634dSDimitry Andric FeatureCmpBccFusion, 9812a66634dSDimitry Andric FeatureFuseAddress, 9822a66634dSDimitry Andric FeatureFuseLiterals]>; 983349cc55cSDimitry Andric 984349cc55cSDimitry Andricdef ProcessorFeatures { 985349cc55cSDimitry Andric list<SubtargetFeature> A53 = [HasV8_0aOps, FeatureCRC, FeatureCrypto, 986349cc55cSDimitry Andric FeatureFPARMv8, FeatureNEON, FeaturePerfMon]; 987349cc55cSDimitry Andric list<SubtargetFeature> A55 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 988349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 989349cc55cSDimitry Andric FeatureRCPC, FeaturePerfMon]; 990349cc55cSDimitry Andric list<SubtargetFeature> A510 = [HasV9_0aOps, FeatureNEON, FeaturePerfMon, 991349cc55cSDimitry Andric FeatureMatMulInt8, FeatureBF16, FeatureAM, 992349cc55cSDimitry Andric FeatureMTE, FeatureETE, FeatureSVE2BitPerm, 993349cc55cSDimitry Andric FeatureFP16FML]; 994349cc55cSDimitry Andric list<SubtargetFeature> A65 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 995349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 996*81ad6265SDimitry Andric FeatureRCPC, FeatureSSBS, FeatureRAS, 997*81ad6265SDimitry Andric FeaturePerfMon]; 998349cc55cSDimitry Andric list<SubtargetFeature> A76 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 999349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 1000*81ad6265SDimitry Andric FeatureRCPC, FeatureSSBS, FeaturePerfMon]; 1001349cc55cSDimitry Andric list<SubtargetFeature> A77 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1002349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 1003*81ad6265SDimitry Andric FeatureRCPC, FeaturePerfMon, FeatureSSBS]; 1004349cc55cSDimitry Andric list<SubtargetFeature> A78 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1005349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 1006349cc55cSDimitry Andric FeatureRCPC, FeaturePerfMon, FeatureSPE, 1007349cc55cSDimitry Andric FeatureSSBS]; 1008349cc55cSDimitry Andric list<SubtargetFeature> A78C = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1009349cc55cSDimitry Andric FeatureNEON, FeatureFullFP16, FeatureDotProd, 1010349cc55cSDimitry Andric FeatureFlagM, FeatureFP16FML, FeaturePAuth, 1011349cc55cSDimitry Andric FeaturePerfMon, FeatureRCPC, FeatureSPE, 1012349cc55cSDimitry Andric FeatureSSBS]; 1013349cc55cSDimitry Andric list<SubtargetFeature> A710 = [HasV9_0aOps, FeatureNEON, FeaturePerfMon, 1014349cc55cSDimitry Andric FeatureETE, FeatureMTE, FeatureFP16FML, 1015349cc55cSDimitry Andric FeatureSVE2BitPerm, FeatureBF16, FeatureMatMulInt8]; 101604eeddc0SDimitry Andric list<SubtargetFeature> R82 = [HasV8_0rOps, FeaturePerfMon, FeatureFullFP16, 101704eeddc0SDimitry Andric FeatureFP16FML, FeatureSSBS, FeaturePredRes, 1018*81ad6265SDimitry Andric FeatureSB]; 1019349cc55cSDimitry Andric list<SubtargetFeature> X1 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1020349cc55cSDimitry Andric FeatureNEON, FeatureRCPC, FeaturePerfMon, 10213a9a9c0cSDimitry Andric FeatureSPE, FeatureFullFP16, FeatureDotProd, 10223a9a9c0cSDimitry Andric FeatureSSBS]; 10231fd87a68SDimitry Andric list<SubtargetFeature> X1C = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 10241fd87a68SDimitry Andric FeatureNEON, FeatureRCPC, FeaturePerfMon, 10251fd87a68SDimitry Andric FeatureSPE, FeatureFullFP16, FeatureDotProd, 10263a9a9c0cSDimitry Andric FeaturePAuth, FeatureSSBS]; 1027349cc55cSDimitry Andric list<SubtargetFeature> X2 = [HasV9_0aOps, FeatureNEON, FeaturePerfMon, 1028349cc55cSDimitry Andric FeatureMatMulInt8, FeatureBF16, FeatureAM, 1029349cc55cSDimitry Andric FeatureMTE, FeatureETE, FeatureSVE2BitPerm, 1030349cc55cSDimitry Andric FeatureFP16FML]; 1031349cc55cSDimitry Andric list<SubtargetFeature> A64FX = [HasV8_2aOps, FeatureFPARMv8, FeatureNEON, 1032349cc55cSDimitry Andric FeatureSHA2, FeaturePerfMon, FeatureFullFP16, 1033349cc55cSDimitry Andric FeatureSVE, FeatureComplxNum]; 1034349cc55cSDimitry Andric list<SubtargetFeature> Carmel = [HasV8_2aOps, FeatureNEON, FeatureCrypto, 1035349cc55cSDimitry Andric FeatureFullFP16]; 1036349cc55cSDimitry Andric list<SubtargetFeature> AppleA7 = [HasV8_0aOps, FeatureCrypto, FeatureFPARMv8, 1037349cc55cSDimitry Andric FeatureNEON,FeaturePerfMon, FeatureAppleA7SysReg]; 1038349cc55cSDimitry Andric list<SubtargetFeature> AppleA10 = [HasV8_0aOps, FeatureCrypto, FeatureFPARMv8, 1039349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureCRC, 1040349cc55cSDimitry Andric FeatureRDM, FeaturePAN, FeatureLOR, FeatureVH]; 1041349cc55cSDimitry Andric list<SubtargetFeature> AppleA11 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1042349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureFullFP16]; 1043349cc55cSDimitry Andric list<SubtargetFeature> AppleA12 = [HasV8_3aOps, FeatureCrypto, FeatureFPARMv8, 1044349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureFullFP16]; 1045349cc55cSDimitry Andric list<SubtargetFeature> AppleA13 = [HasV8_4aOps, FeatureCrypto, FeatureFPARMv8, 1046349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureFullFP16, 1047349cc55cSDimitry Andric FeatureFP16FML, FeatureSHA3]; 1048349cc55cSDimitry Andric list<SubtargetFeature> AppleA14 = [HasV8_4aOps, FeatureCrypto, FeatureFPARMv8, 1049349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureFRInt3264, 1050349cc55cSDimitry Andric FeatureSpecRestrict, FeatureSSBS, FeatureSB, 1051349cc55cSDimitry Andric FeaturePredRes, FeatureCacheDeepPersist, 1052349cc55cSDimitry Andric FeatureFullFP16, FeatureFP16FML, FeatureSHA3, 1053349cc55cSDimitry Andric FeatureAltFPCmp]; 1054349cc55cSDimitry Andric list<SubtargetFeature> ExynosM3 = [HasV8_0aOps, FeatureCRC, FeatureCrypto, 1055349cc55cSDimitry Andric FeaturePerfMon]; 1056349cc55cSDimitry Andric list<SubtargetFeature> ExynosM4 = [HasV8_2aOps, FeatureCrypto, FeatureDotProd, 1057349cc55cSDimitry Andric FeatureFullFP16, FeaturePerfMon]; 1058349cc55cSDimitry Andric list<SubtargetFeature> Falkor = [HasV8_0aOps, FeatureCRC, FeatureCrypto, 1059349cc55cSDimitry Andric FeatureFPARMv8, FeatureNEON, FeaturePerfMon, 1060349cc55cSDimitry Andric FeatureRDM]; 1061349cc55cSDimitry Andric list<SubtargetFeature> NeoverseE1 = [HasV8_2aOps, FeatureCrypto, FeatureDotProd, 1062349cc55cSDimitry Andric FeatureFPARMv8, FeatureFullFP16, FeatureNEON, 1063*81ad6265SDimitry Andric FeatureRCPC, FeatureSSBS, FeaturePerfMon]; 1064349cc55cSDimitry Andric list<SubtargetFeature> NeoverseN1 = [HasV8_2aOps, FeatureCrypto, FeatureDotProd, 1065349cc55cSDimitry Andric FeatureFPARMv8, FeatureFullFP16, FeatureNEON, 1066*81ad6265SDimitry Andric FeatureRCPC, FeatureSPE, FeatureSSBS, 1067*81ad6265SDimitry Andric FeaturePerfMon]; 1068349cc55cSDimitry Andric list<SubtargetFeature> NeoverseN2 = [HasV8_5aOps, FeatureBF16, FeatureETE, 1069349cc55cSDimitry Andric FeatureMatMulInt8, FeatureMTE, FeatureSVE2, 1070*81ad6265SDimitry Andric FeatureSVE2BitPerm, FeatureTRBE, FeatureCrypto, 1071*81ad6265SDimitry Andric FeaturePerfMon]; 1072349cc55cSDimitry Andric list<SubtargetFeature> Neoverse512TVB = [HasV8_4aOps, FeatureBF16, FeatureCacheDeepPersist, 1073349cc55cSDimitry Andric FeatureCrypto, FeatureFPARMv8, FeatureFP16FML, 1074349cc55cSDimitry Andric FeatureFullFP16, FeatureMatMulInt8, FeatureNEON, 1075349cc55cSDimitry Andric FeaturePerfMon, FeatureRandGen, FeatureSPE, 1076349cc55cSDimitry Andric FeatureSSBS, FeatureSVE]; 1077349cc55cSDimitry Andric list<SubtargetFeature> NeoverseV1 = [HasV8_4aOps, FeatureBF16, FeatureCacheDeepPersist, 1078349cc55cSDimitry Andric FeatureCrypto, FeatureFPARMv8, FeatureFP16FML, 1079349cc55cSDimitry Andric FeatureFullFP16, FeatureMatMulInt8, FeatureNEON, 1080349cc55cSDimitry Andric FeaturePerfMon, FeatureRandGen, FeatureSPE, 1081349cc55cSDimitry Andric FeatureSSBS, FeatureSVE]; 1082349cc55cSDimitry Andric list<SubtargetFeature> Saphira = [HasV8_4aOps, FeatureCrypto, FeatureFPARMv8, 1083349cc55cSDimitry Andric FeatureNEON, FeatureSPE, FeaturePerfMon]; 1084349cc55cSDimitry Andric list<SubtargetFeature> ThunderX = [HasV8_0aOps, FeatureCRC, FeatureCrypto, 1085349cc55cSDimitry Andric FeatureFPARMv8, FeaturePerfMon, FeatureNEON]; 1086349cc55cSDimitry Andric list<SubtargetFeature> ThunderX2T99 = [HasV8_1aOps, FeatureCRC, FeatureCrypto, 1087349cc55cSDimitry Andric FeatureFPARMv8, FeatureNEON, FeatureLSE]; 1088349cc55cSDimitry Andric list<SubtargetFeature> ThunderX3T110 = [HasV8_3aOps, FeatureCRC, FeatureCrypto, 1089349cc55cSDimitry Andric FeatureFPARMv8, FeatureNEON, FeatureLSE, 1090349cc55cSDimitry Andric FeaturePAuth, FeaturePerfMon]; 1091349cc55cSDimitry Andric list<SubtargetFeature> TSV110 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8, 1092349cc55cSDimitry Andric FeatureNEON, FeaturePerfMon, FeatureSPE, 1093349cc55cSDimitry Andric FeatureFullFP16, FeatureFP16FML, FeatureDotProd]; 10942a66634dSDimitry Andric list<SubtargetFeature> Ampere1 = [HasV8_6aOps, FeatureNEON, FeaturePerfMon, 10952a66634dSDimitry Andric FeatureMTE, FeatureSSBS]; 1096349cc55cSDimitry Andric 10975ffd83dbSDimitry Andric // ETE and TRBE are future architecture extensions. We temporarily enable them 1098349cc55cSDimitry Andric // by default for users targeting generic AArch64. The extensions do not 10998bcb0991SDimitry Andric // affect code generated by the compiler and can be used only by explicitly 11008bcb0991SDimitry Andric // mentioning the new system register names in assembly. 1101*81ad6265SDimitry Andric list<SubtargetFeature> Generic = [FeatureFPARMv8, FeatureNEON, FeatureETE]; 1102349cc55cSDimitry Andric} 11030b57cec5SDimitry Andric 1104*81ad6265SDimitry Andric// FeatureFuseAdrpAdd is enabled under Generic to allow linker merging 1105*81ad6265SDimitry Andric// optimizations. 1106349cc55cSDimitry Andricdef : ProcessorModel<"generic", CortexA55Model, ProcessorFeatures.Generic, 1107*81ad6265SDimitry Andric [FeatureFuseAES, FeatureFuseAdrpAdd, FeaturePostRAScheduler]>; 1108349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a35", CortexA53Model, ProcessorFeatures.A53, 1109349cc55cSDimitry Andric [TuneA35]>; 1110349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a34", CortexA53Model, ProcessorFeatures.A53, 1111349cc55cSDimitry Andric [TuneA35]>; 1112349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a53", CortexA53Model, ProcessorFeatures.A53, 1113349cc55cSDimitry Andric [TuneA53]>; 1114349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a55", CortexA55Model, ProcessorFeatures.A55, 1115349cc55cSDimitry Andric [TuneA55]>; 1116349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a510", CortexA55Model, ProcessorFeatures.A510, 1117349cc55cSDimitry Andric [TuneA510]>; 1118349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a57", CortexA57Model, ProcessorFeatures.A53, 1119349cc55cSDimitry Andric [TuneA57]>; 1120349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a65", CortexA53Model, ProcessorFeatures.A65, 1121349cc55cSDimitry Andric [TuneA65]>; 1122349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a65ae", CortexA53Model, ProcessorFeatures.A65, 1123349cc55cSDimitry Andric [TuneA65]>; 1124349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a72", CortexA57Model, ProcessorFeatures.A53, 1125349cc55cSDimitry Andric [TuneA72]>; 1126349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a73", CortexA57Model, ProcessorFeatures.A53, 1127349cc55cSDimitry Andric [TuneA73]>; 1128349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a75", CortexA57Model, ProcessorFeatures.A55, 1129349cc55cSDimitry Andric [TuneA75]>; 1130349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a76", CortexA57Model, ProcessorFeatures.A76, 1131349cc55cSDimitry Andric [TuneA76]>; 1132349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a76ae", CortexA57Model, ProcessorFeatures.A76, 1133349cc55cSDimitry Andric [TuneA76]>; 1134349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a77", CortexA57Model, ProcessorFeatures.A77, 1135349cc55cSDimitry Andric [TuneA77]>; 1136349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a78", CortexA57Model, ProcessorFeatures.A78, 1137349cc55cSDimitry Andric [TuneA78]>; 1138349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a78c", CortexA57Model, ProcessorFeatures.A78C, 1139349cc55cSDimitry Andric [TuneA78C]>; 1140349cc55cSDimitry Andricdef : ProcessorModel<"cortex-a710", CortexA57Model, ProcessorFeatures.A710, 1141349cc55cSDimitry Andric [TuneA710]>; 1142349cc55cSDimitry Andricdef : ProcessorModel<"cortex-r82", CortexA55Model, ProcessorFeatures.R82, 1143349cc55cSDimitry Andric [TuneR82]>; 1144349cc55cSDimitry Andricdef : ProcessorModel<"cortex-x1", CortexA57Model, ProcessorFeatures.X1, 1145349cc55cSDimitry Andric [TuneX1]>; 11461fd87a68SDimitry Andricdef : ProcessorModel<"cortex-x1c", CortexA57Model, ProcessorFeatures.X1C, 11471fd87a68SDimitry Andric [TuneX1]>; 1148349cc55cSDimitry Andricdef : ProcessorModel<"cortex-x2", CortexA57Model, ProcessorFeatures.X2, 1149349cc55cSDimitry Andric [TuneX2]>; 1150349cc55cSDimitry Andricdef : ProcessorModel<"neoverse-e1", CortexA53Model, 1151349cc55cSDimitry Andric ProcessorFeatures.NeoverseE1, [TuneNeoverseE1]>; 1152349cc55cSDimitry Andricdef : ProcessorModel<"neoverse-n1", CortexA57Model, 1153349cc55cSDimitry Andric ProcessorFeatures.NeoverseN1, [TuneNeoverseN1]>; 1154349cc55cSDimitry Andricdef : ProcessorModel<"neoverse-n2", CortexA57Model, 1155349cc55cSDimitry Andric ProcessorFeatures.NeoverseN2, [TuneNeoverseN2]>; 1156349cc55cSDimitry Andricdef : ProcessorModel<"neoverse-512tvb", CortexA57Model, 1157349cc55cSDimitry Andric ProcessorFeatures.Neoverse512TVB, [TuneNeoverse512TVB]>; 1158349cc55cSDimitry Andricdef : ProcessorModel<"neoverse-v1", CortexA57Model, 1159349cc55cSDimitry Andric ProcessorFeatures.NeoverseV1, [TuneNeoverseV1]>; 1160349cc55cSDimitry Andricdef : ProcessorModel<"exynos-m3", ExynosM3Model, ProcessorFeatures.ExynosM3, 1161349cc55cSDimitry Andric [TuneExynosM3]>; 1162349cc55cSDimitry Andricdef : ProcessorModel<"exynos-m4", ExynosM4Model, ProcessorFeatures.ExynosM4, 1163349cc55cSDimitry Andric [TuneExynosM4]>; 1164349cc55cSDimitry Andricdef : ProcessorModel<"exynos-m5", ExynosM5Model, ProcessorFeatures.ExynosM4, 1165349cc55cSDimitry Andric [TuneExynosM4]>; 1166349cc55cSDimitry Andricdef : ProcessorModel<"falkor", FalkorModel, ProcessorFeatures.Falkor, 1167349cc55cSDimitry Andric [TuneFalkor]>; 1168349cc55cSDimitry Andricdef : ProcessorModel<"saphira", FalkorModel, ProcessorFeatures.Saphira, 1169349cc55cSDimitry Andric [TuneSaphira]>; 1170349cc55cSDimitry Andricdef : ProcessorModel<"kryo", KryoModel, ProcessorFeatures.A53, [TuneKryo]>; 1171349cc55cSDimitry Andric 11720b57cec5SDimitry Andric// Cavium ThunderX/ThunderX T8X Processors 1173349cc55cSDimitry Andricdef : ProcessorModel<"thunderx", ThunderXT8XModel, ProcessorFeatures.ThunderX, 1174349cc55cSDimitry Andric [TuneThunderX]>; 1175349cc55cSDimitry Andricdef : ProcessorModel<"thunderxt88", ThunderXT8XModel, 1176349cc55cSDimitry Andric ProcessorFeatures.ThunderX, [TuneThunderXT88]>; 1177349cc55cSDimitry Andricdef : ProcessorModel<"thunderxt81", ThunderXT8XModel, 1178349cc55cSDimitry Andric ProcessorFeatures.ThunderX, [TuneThunderXT81]>; 1179349cc55cSDimitry Andricdef : ProcessorModel<"thunderxt83", ThunderXT8XModel, 1180349cc55cSDimitry Andric ProcessorFeatures.ThunderX, [TuneThunderXT83]>; 11810b57cec5SDimitry Andric// Cavium ThunderX2T9X Processors. Formerly Broadcom Vulcan. 1182349cc55cSDimitry Andricdef : ProcessorModel<"thunderx2t99", ThunderX2T99Model, 1183349cc55cSDimitry Andric ProcessorFeatures.ThunderX2T99, [TuneThunderX2T99]>; 1184e837bb5cSDimitry Andric// Marvell ThunderX3T110 Processors. 1185349cc55cSDimitry Andricdef : ProcessorModel<"thunderx3t110", ThunderX3T110Model, 1186349cc55cSDimitry Andric ProcessorFeatures.ThunderX3T110, [TuneThunderX3T110]>; 1187349cc55cSDimitry Andricdef : ProcessorModel<"tsv110", TSV110Model, ProcessorFeatures.TSV110, 1188349cc55cSDimitry Andric [TuneTSV110]>; 11890b57cec5SDimitry Andric 1190480093f4SDimitry Andric// Support cyclone as an alias for apple-a7 so we can still LTO old bitcode. 1191349cc55cSDimitry Andricdef : ProcessorModel<"cyclone", CycloneModel, ProcessorFeatures.AppleA7, 1192349cc55cSDimitry Andric [TuneAppleA7]>; 1193480093f4SDimitry Andric 1194480093f4SDimitry Andric// iPhone and iPad CPUs 1195349cc55cSDimitry Andricdef : ProcessorModel<"apple-a7", CycloneModel, ProcessorFeatures.AppleA7, 1196349cc55cSDimitry Andric [TuneAppleA7]>; 1197349cc55cSDimitry Andricdef : ProcessorModel<"apple-a8", CycloneModel, ProcessorFeatures.AppleA7, 1198349cc55cSDimitry Andric [TuneAppleA7]>; 1199349cc55cSDimitry Andricdef : ProcessorModel<"apple-a9", CycloneModel, ProcessorFeatures.AppleA7, 1200349cc55cSDimitry Andric [TuneAppleA7]>; 1201349cc55cSDimitry Andricdef : ProcessorModel<"apple-a10", CycloneModel, ProcessorFeatures.AppleA10, 1202349cc55cSDimitry Andric [TuneAppleA10]>; 1203349cc55cSDimitry Andricdef : ProcessorModel<"apple-a11", CycloneModel, ProcessorFeatures.AppleA11, 1204349cc55cSDimitry Andric [TuneAppleA11]>; 1205349cc55cSDimitry Andricdef : ProcessorModel<"apple-a12", CycloneModel, ProcessorFeatures.AppleA12, 1206349cc55cSDimitry Andric [TuneAppleA12]>; 1207349cc55cSDimitry Andricdef : ProcessorModel<"apple-a13", CycloneModel, ProcessorFeatures.AppleA13, 1208349cc55cSDimitry Andric [TuneAppleA13]>; 1209349cc55cSDimitry Andricdef : ProcessorModel<"apple-a14", CycloneModel, ProcessorFeatures.AppleA14, 1210349cc55cSDimitry Andric [TuneAppleA14]>; 1211480093f4SDimitry Andric 1212fe6060f1SDimitry Andric// Mac CPUs 1213349cc55cSDimitry Andricdef : ProcessorModel<"apple-m1", CycloneModel, ProcessorFeatures.AppleA14, 1214349cc55cSDimitry Andric [TuneAppleA14]>; 1215fe6060f1SDimitry Andric 1216480093f4SDimitry Andric// watch CPUs. 1217349cc55cSDimitry Andricdef : ProcessorModel<"apple-s4", CycloneModel, ProcessorFeatures.AppleA12, 1218349cc55cSDimitry Andric [TuneAppleA12]>; 1219349cc55cSDimitry Andricdef : ProcessorModel<"apple-s5", CycloneModel, ProcessorFeatures.AppleA12, 1220349cc55cSDimitry Andric [TuneAppleA12]>; 1221480093f4SDimitry Andric 12220b57cec5SDimitry Andric// Alias for the latest Apple processor model supported by LLVM. 1223349cc55cSDimitry Andricdef : ProcessorModel<"apple-latest", CycloneModel, ProcessorFeatures.AppleA14, 1224349cc55cSDimitry Andric [TuneAppleA14]>; 12250b57cec5SDimitry Andric 12265ffd83dbSDimitry Andric// Fujitsu A64FX 1227349cc55cSDimitry Andricdef : ProcessorModel<"a64fx", A64FXModel, ProcessorFeatures.A64FX, 1228349cc55cSDimitry Andric [TuneA64FX]>; 12295ffd83dbSDimitry Andric 12305ffd83dbSDimitry Andric// Nvidia Carmel 1231349cc55cSDimitry Andricdef : ProcessorModel<"carmel", NoSchedModel, ProcessorFeatures.Carmel, 1232349cc55cSDimitry Andric [TuneCarmel]>; 12335ffd83dbSDimitry Andric 12342a66634dSDimitry Andric// Ampere Computing 12352a66634dSDimitry Andricdef : ProcessorModel<"ampere1", Ampere1Model, ProcessorFeatures.Ampere1, 12362a66634dSDimitry Andric [TuneAmpere1]>; 12372a66634dSDimitry Andric 12380b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12390b57cec5SDimitry Andric// Assembly parser 12400b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12410b57cec5SDimitry Andric 12420b57cec5SDimitry Andricdef GenericAsmParserVariant : AsmParserVariant { 12430b57cec5SDimitry Andric int Variant = 0; 12440b57cec5SDimitry Andric string Name = "generic"; 12450b57cec5SDimitry Andric string BreakCharacters = "."; 12460b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 12470b57cec5SDimitry Andric} 12480b57cec5SDimitry Andric 12490b57cec5SDimitry Andricdef AppleAsmParserVariant : AsmParserVariant { 12500b57cec5SDimitry Andric int Variant = 1; 12510b57cec5SDimitry Andric string Name = "apple-neon"; 12520b57cec5SDimitry Andric string BreakCharacters = "."; 12530b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 12540b57cec5SDimitry Andric} 12550b57cec5SDimitry Andric 12560b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12570b57cec5SDimitry Andric// Assembly printer 12580b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12590b57cec5SDimitry Andric// AArch64 Uses the MC printer for asm output, so make sure the TableGen 12600b57cec5SDimitry Andric// AsmWriter bits get associated with the correct class. 12610b57cec5SDimitry Andricdef GenericAsmWriter : AsmWriter { 12620b57cec5SDimitry Andric string AsmWriterClassName = "InstPrinter"; 12630b57cec5SDimitry Andric int PassSubtarget = 1; 12640b57cec5SDimitry Andric int Variant = 0; 12650b57cec5SDimitry Andric bit isMCAsmWriter = 1; 12660b57cec5SDimitry Andric} 12670b57cec5SDimitry Andric 12680b57cec5SDimitry Andricdef AppleAsmWriter : AsmWriter { 12690b57cec5SDimitry Andric let AsmWriterClassName = "AppleInstPrinter"; 12700b57cec5SDimitry Andric int PassSubtarget = 1; 12710b57cec5SDimitry Andric int Variant = 1; 12720b57cec5SDimitry Andric int isMCAsmWriter = 1; 12730b57cec5SDimitry Andric} 12740b57cec5SDimitry Andric 12750b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12760b57cec5SDimitry Andric// Target Declaration 12770b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12780b57cec5SDimitry Andric 12790b57cec5SDimitry Andricdef AArch64 : Target { 12800b57cec5SDimitry Andric let InstructionSet = AArch64InstrInfo; 12810b57cec5SDimitry Andric let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant]; 12820b57cec5SDimitry Andric let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter]; 12830b57cec5SDimitry Andric let AllowRegisterRenaming = 1; 12840b57cec5SDimitry Andric} 12850b57cec5SDimitry Andric 12860b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12870b57cec5SDimitry Andric// Pfm Counters 12880b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12890b57cec5SDimitry Andric 12900b57cec5SDimitry Andricinclude "AArch64PfmCounters.td" 1291