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 450b57cec5SDimitry Andric// crypto defintions 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 490b57cec5SDimitry Andric// meaning anymore. We kept the Crypto defintion 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 640b57cec5SDimitry Andricdef FeatureRDM : SubtargetFeature<"rdm", "HasRDM", "true", 650b57cec5SDimitry Andric "Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions">; 660b57cec5SDimitry Andric 670b57cec5SDimitry Andricdef FeaturePAN : SubtargetFeature< 680b57cec5SDimitry Andric "pan", "HasPAN", "true", 690b57cec5SDimitry Andric "Enables ARM v8.1 Privileged Access-Never extension">; 700b57cec5SDimitry Andric 710b57cec5SDimitry Andricdef FeatureLOR : SubtargetFeature< 720b57cec5SDimitry Andric "lor", "HasLOR", "true", 730b57cec5SDimitry Andric "Enables ARM v8.1 Limited Ordering Regions extension">; 740b57cec5SDimitry Andric 750b57cec5SDimitry Andricdef FeatureVH : SubtargetFeature< 760b57cec5SDimitry Andric "vh", "HasVH", "true", 770b57cec5SDimitry Andric "Enables ARM v8.1 Virtual Host extension">; 780b57cec5SDimitry Andric 790b57cec5SDimitry Andricdef FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true", 800b57cec5SDimitry Andric "Enable ARMv8 PMUv3 Performance Monitors extension">; 810b57cec5SDimitry Andric 820b57cec5SDimitry Andricdef FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true", 830b57cec5SDimitry Andric "Full FP16", [FeatureFPARMv8]>; 840b57cec5SDimitry Andric 850b57cec5SDimitry Andricdef FeatureFP16FML : SubtargetFeature<"fp16fml", "HasFP16FML", "true", 860b57cec5SDimitry Andric "Enable FP16 FML instructions", [FeatureFullFP16]>; 870b57cec5SDimitry Andric 880b57cec5SDimitry Andricdef FeatureSPE : SubtargetFeature<"spe", "HasSPE", "true", 890b57cec5SDimitry Andric "Enable Statistical Profiling extension">; 900b57cec5SDimitry Andric 910b57cec5SDimitry Andricdef FeaturePAN_RWV : SubtargetFeature< 920b57cec5SDimitry Andric "pan-rwv", "HasPAN_RWV", "true", 930b57cec5SDimitry Andric "Enable v8.2 PAN s1e1R and s1e1W Variants", 940b57cec5SDimitry Andric [FeaturePAN]>; 950b57cec5SDimitry Andric 960b57cec5SDimitry Andric// UAO PState 970b57cec5SDimitry Andricdef FeaturePsUAO : SubtargetFeature< "uaops", "HasPsUAO", "true", 980b57cec5SDimitry Andric "Enable v8.2 UAO PState">; 990b57cec5SDimitry Andric 1000b57cec5SDimitry Andricdef FeatureCCPP : SubtargetFeature<"ccpp", "HasCCPP", 1010b57cec5SDimitry Andric "true", "Enable v8.2 data Cache Clean to Point of Persistence" >; 1020b57cec5SDimitry Andric 1030b57cec5SDimitry Andricdef FeatureSVE : SubtargetFeature<"sve", "HasSVE", "true", 1040b57cec5SDimitry Andric "Enable Scalable Vector Extension (SVE) instructions">; 1050b57cec5SDimitry Andric 1060b57cec5SDimitry Andricdef FeatureSVE2 : SubtargetFeature<"sve2", "HasSVE2", "true", 1070b57cec5SDimitry Andric "Enable Scalable Vector Extension 2 (SVE2) instructions", [FeatureSVE]>; 1080b57cec5SDimitry Andric 1090b57cec5SDimitry Andricdef FeatureSVE2AES : SubtargetFeature<"sve2-aes", "HasSVE2AES", "true", 1100b57cec5SDimitry Andric "Enable AES SVE2 instructions", [FeatureSVE2, FeatureAES]>; 1110b57cec5SDimitry Andric 1120b57cec5SDimitry Andricdef FeatureSVE2SM4 : SubtargetFeature<"sve2-sm4", "HasSVE2SM4", "true", 1130b57cec5SDimitry Andric "Enable SM4 SVE2 instructions", [FeatureSVE2, FeatureSM4]>; 1140b57cec5SDimitry Andric 1150b57cec5SDimitry Andricdef FeatureSVE2SHA3 : SubtargetFeature<"sve2-sha3", "HasSVE2SHA3", "true", 1160b57cec5SDimitry Andric "Enable SHA3 SVE2 instructions", [FeatureSVE2, FeatureSHA3]>; 1170b57cec5SDimitry Andric 1180b57cec5SDimitry Andricdef FeatureSVE2BitPerm : SubtargetFeature<"sve2-bitperm", "HasSVE2BitPerm", "true", 1190b57cec5SDimitry Andric "Enable bit permutation SVE2 instructions", [FeatureSVE2]>; 1200b57cec5SDimitry Andric 1210b57cec5SDimitry Andricdef FeatureZCRegMove : SubtargetFeature<"zcm", "HasZeroCycleRegMove", "true", 1220b57cec5SDimitry Andric "Has zero-cycle register moves">; 1238bcb0991SDimitry Andric 1240b57cec5SDimitry Andricdef FeatureZCZeroingGP : SubtargetFeature<"zcz-gp", "HasZeroCycleZeroingGP", "true", 1250b57cec5SDimitry Andric "Has zero-cycle zeroing instructions for generic registers">; 1260b57cec5SDimitry Andric 1270b57cec5SDimitry Andricdef FeatureZCZeroingFP : SubtargetFeature<"zcz-fp", "HasZeroCycleZeroingFP", "true", 1280b57cec5SDimitry Andric "Has zero-cycle zeroing instructions for FP registers">; 1290b57cec5SDimitry Andric 1300b57cec5SDimitry Andricdef FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true", 1310b57cec5SDimitry Andric "Has zero-cycle zeroing instructions", 1320b57cec5SDimitry Andric [FeatureZCZeroingGP, FeatureZCZeroingFP]>; 1330b57cec5SDimitry Andric 1340b57cec5SDimitry Andric/// ... but the floating-point version doesn't quite work in rare cases on older 1350b57cec5SDimitry Andric/// CPUs. 1360b57cec5SDimitry Andricdef FeatureZCZeroingFPWorkaround : SubtargetFeature<"zcz-fp-workaround", 1370b57cec5SDimitry Andric "HasZeroCycleZeroingFPWorkaround", "true", 1380b57cec5SDimitry Andric "The zero-cycle floating-point zeroing instruction has a bug">; 1390b57cec5SDimitry Andric 1400b57cec5SDimitry Andricdef FeatureStrictAlign : SubtargetFeature<"strict-align", 1410b57cec5SDimitry Andric "StrictAlign", "true", 1420b57cec5SDimitry Andric "Disallow all unaligned memory " 1430b57cec5SDimitry Andric "access">; 1440b57cec5SDimitry Andric 1450b57cec5SDimitry Andricforeach i = {1-7,9-15,18,20-28} in 1460b57cec5SDimitry Andric def FeatureReserveX#i : SubtargetFeature<"reserve-x"#i, "ReserveXRegister["#i#"]", "true", 1470b57cec5SDimitry Andric "Reserve X"#i#", making it unavailable " 1480b57cec5SDimitry Andric "as a GPR">; 1490b57cec5SDimitry Andric 1500b57cec5SDimitry Andricforeach i = {8-15,18} in 1510b57cec5SDimitry Andric def FeatureCallSavedX#i : SubtargetFeature<"call-saved-x"#i, 1520b57cec5SDimitry Andric "CustomCallSavedXRegs["#i#"]", "true", "Make X"#i#" callee saved.">; 1530b57cec5SDimitry Andric 1540b57cec5SDimitry Andricdef FeatureUseAA : SubtargetFeature<"use-aa", "UseAA", "true", 1550b57cec5SDimitry Andric "Use alias analysis during codegen">; 1560b57cec5SDimitry Andric 1570b57cec5SDimitry Andricdef FeatureBalanceFPOps : SubtargetFeature<"balance-fp-ops", "BalanceFPOps", 1580b57cec5SDimitry Andric "true", 1590b57cec5SDimitry Andric "balance mix of odd and even D-registers for fp multiply(-accumulate) ops">; 1600b57cec5SDimitry Andric 1610b57cec5SDimitry Andricdef FeaturePredictableSelectIsExpensive : SubtargetFeature< 1620b57cec5SDimitry Andric "predictable-select-expensive", "PredictableSelectIsExpensive", "true", 1630b57cec5SDimitry Andric "Prefer likely predicted branches over selects">; 1640b57cec5SDimitry Andric 1650b57cec5SDimitry Andricdef FeatureCustomCheapAsMoveHandling : SubtargetFeature<"custom-cheap-as-move", 1660b57cec5SDimitry Andric "CustomAsCheapAsMove", "true", 1670b57cec5SDimitry Andric "Use custom handling of cheap instructions">; 1680b57cec5SDimitry Andric 1690b57cec5SDimitry Andricdef FeatureExynosCheapAsMoveHandling : SubtargetFeature<"exynos-cheap-as-move", 1700b57cec5SDimitry Andric "ExynosAsCheapAsMove", "true", 1710b57cec5SDimitry Andric "Use Exynos specific handling of cheap instructions", 1720b57cec5SDimitry Andric [FeatureCustomCheapAsMoveHandling]>; 1730b57cec5SDimitry Andric 1740b57cec5SDimitry Andricdef FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler", 1750b57cec5SDimitry Andric "UsePostRAScheduler", "true", "Schedule again after register allocation">; 1760b57cec5SDimitry Andric 1770b57cec5SDimitry Andricdef FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store", 1780b57cec5SDimitry Andric "Misaligned128StoreIsSlow", "true", "Misaligned 128 bit stores are slow">; 1790b57cec5SDimitry Andric 1800b57cec5SDimitry Andricdef FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128", 1810b57cec5SDimitry Andric "Paired128IsSlow", "true", "Paired 128 bit loads and stores are slow">; 1820b57cec5SDimitry Andric 1830b57cec5SDimitry Andricdef FeatureSlowSTRQro : SubtargetFeature<"slow-strqro-store", "STRQroIsSlow", 1840b57cec5SDimitry Andric "true", "STR of Q register with register offset is slow">; 1850b57cec5SDimitry Andric 1860b57cec5SDimitry Andricdef FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature< 1870b57cec5SDimitry Andric "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern", 1880b57cec5SDimitry Andric "true", "Use alternative pattern for sextload convert to f32">; 1890b57cec5SDimitry Andric 1900b57cec5SDimitry Andricdef FeatureArithmeticBccFusion : SubtargetFeature< 1910b57cec5SDimitry Andric "arith-bcc-fusion", "HasArithmeticBccFusion", "true", 1920b57cec5SDimitry Andric "CPU fuses arithmetic+bcc operations">; 1930b57cec5SDimitry Andric 1940b57cec5SDimitry Andricdef FeatureArithmeticCbzFusion : SubtargetFeature< 1950b57cec5SDimitry Andric "arith-cbz-fusion", "HasArithmeticCbzFusion", "true", 1960b57cec5SDimitry Andric "CPU fuses arithmetic + cbz/cbnz operations">; 1970b57cec5SDimitry Andric 1980b57cec5SDimitry Andricdef FeatureFuseAddress : SubtargetFeature< 1990b57cec5SDimitry Andric "fuse-address", "HasFuseAddress", "true", 2000b57cec5SDimitry Andric "CPU fuses address generation and memory operations">; 2010b57cec5SDimitry Andric 2020b57cec5SDimitry Andricdef FeatureFuseAES : SubtargetFeature< 2030b57cec5SDimitry Andric "fuse-aes", "HasFuseAES", "true", 2040b57cec5SDimitry Andric "CPU fuses AES crypto operations">; 2050b57cec5SDimitry Andric 2060b57cec5SDimitry Andricdef FeatureFuseArithmeticLogic : SubtargetFeature< 2070b57cec5SDimitry Andric "fuse-arith-logic", "HasFuseArithmeticLogic", "true", 2080b57cec5SDimitry Andric "CPU fuses arithmetic and logic operations">; 2090b57cec5SDimitry Andric 2100b57cec5SDimitry Andricdef FeatureFuseCCSelect : SubtargetFeature< 2110b57cec5SDimitry Andric "fuse-csel", "HasFuseCCSelect", "true", 2120b57cec5SDimitry Andric "CPU fuses conditional select operations">; 2130b57cec5SDimitry Andric 2140b57cec5SDimitry Andricdef FeatureFuseCryptoEOR : SubtargetFeature< 2150b57cec5SDimitry Andric "fuse-crypto-eor", "HasFuseCryptoEOR", "true", 2160b57cec5SDimitry Andric "CPU fuses AES/PMULL and EOR operations">; 2170b57cec5SDimitry Andric 2180b57cec5SDimitry Andricdef FeatureFuseLiterals : SubtargetFeature< 2190b57cec5SDimitry Andric "fuse-literals", "HasFuseLiterals", "true", 2200b57cec5SDimitry Andric "CPU fuses literal generation operations">; 2210b57cec5SDimitry Andric 2220b57cec5SDimitry Andricdef FeatureDisableLatencySchedHeuristic : SubtargetFeature< 2230b57cec5SDimitry Andric "disable-latency-sched-heuristic", "DisableLatencySchedHeuristic", "true", 2240b57cec5SDimitry Andric "Disable latency scheduling heuristic">; 2250b57cec5SDimitry Andric 2260b57cec5SDimitry Andricdef FeatureForce32BitJumpTables 2270b57cec5SDimitry Andric : SubtargetFeature<"force-32bit-jump-tables", "Force32BitJumpTables", "true", 2280b57cec5SDimitry Andric "Force jump table entries to be 32-bits wide except at MinSize">; 2290b57cec5SDimitry Andric 2300b57cec5SDimitry Andricdef FeatureRCPC : SubtargetFeature<"rcpc", "HasRCPC", "true", 2310b57cec5SDimitry Andric "Enable support for RCPC extension">; 2320b57cec5SDimitry Andric 2330b57cec5SDimitry Andricdef FeatureUseRSqrt : SubtargetFeature< 2340b57cec5SDimitry Andric "use-reciprocal-square-root", "UseRSqrt", "true", 2350b57cec5SDimitry Andric "Use the reciprocal square root approximation">; 2360b57cec5SDimitry Andric 2370b57cec5SDimitry Andricdef FeatureDotProd : SubtargetFeature< 2380b57cec5SDimitry Andric "dotprod", "HasDotProd", "true", 2390b57cec5SDimitry Andric "Enable dot product support">; 2400b57cec5SDimitry Andric 2410b57cec5SDimitry Andricdef FeaturePA : SubtargetFeature< 2420b57cec5SDimitry Andric "pa", "HasPA", "true", 2430b57cec5SDimitry Andric "Enable v8.3-A Pointer Authentication enchancement">; 2440b57cec5SDimitry Andric 2450b57cec5SDimitry Andricdef FeatureJS : SubtargetFeature< 2460b57cec5SDimitry Andric "jsconv", "HasJS", "true", 2470b57cec5SDimitry Andric "Enable v8.3-A JavaScript FP conversion enchancement", 2480b57cec5SDimitry Andric [FeatureFPARMv8]>; 2490b57cec5SDimitry Andric 2500b57cec5SDimitry Andricdef FeatureCCIDX : SubtargetFeature< 2510b57cec5SDimitry Andric "ccidx", "HasCCIDX", "true", 2520b57cec5SDimitry Andric "Enable v8.3-A Extend of the CCSIDR number of sets">; 2530b57cec5SDimitry Andric 2540b57cec5SDimitry Andricdef FeatureComplxNum : SubtargetFeature< 2550b57cec5SDimitry Andric "complxnum", "HasComplxNum", "true", 2560b57cec5SDimitry Andric "Enable v8.3-A Floating-point complex number support", 2570b57cec5SDimitry Andric [FeatureNEON]>; 2580b57cec5SDimitry Andric 2590b57cec5SDimitry Andricdef FeatureNV : SubtargetFeature< 2600b57cec5SDimitry Andric "nv", "HasNV", "true", 2610b57cec5SDimitry Andric "Enable v8.4-A Nested Virtualization Enchancement">; 2620b57cec5SDimitry Andric 2630b57cec5SDimitry Andricdef FeatureRASv8_4 : SubtargetFeature< 2640b57cec5SDimitry Andric "rasv8_4", "HasRASv8_4", "true", 2650b57cec5SDimitry Andric "Enable v8.4-A Reliability, Availability and Serviceability extension", 2660b57cec5SDimitry Andric [FeatureRAS]>; 2670b57cec5SDimitry Andric 2680b57cec5SDimitry Andricdef FeatureMPAM : SubtargetFeature< 2690b57cec5SDimitry Andric "mpam", "HasMPAM", "true", 2700b57cec5SDimitry Andric "Enable v8.4-A Memory system Partitioning and Monitoring extension">; 2710b57cec5SDimitry Andric 2720b57cec5SDimitry Andricdef FeatureDIT : SubtargetFeature< 2730b57cec5SDimitry Andric "dit", "HasDIT", "true", 2740b57cec5SDimitry Andric "Enable v8.4-A Data Independent Timing instructions">; 2750b57cec5SDimitry Andric 2760b57cec5SDimitry Andricdef FeatureTRACEV8_4 : SubtargetFeature< 2770b57cec5SDimitry Andric "tracev8.4", "HasTRACEV8_4", "true", 2780b57cec5SDimitry Andric "Enable v8.4-A Trace extension">; 2790b57cec5SDimitry Andric 2800b57cec5SDimitry Andricdef FeatureAM : SubtargetFeature< 2810b57cec5SDimitry Andric "am", "HasAM", "true", 2820b57cec5SDimitry Andric "Enable v8.4-A Activity Monitors extension">; 2830b57cec5SDimitry Andric 2840b57cec5SDimitry Andricdef FeatureSEL2 : SubtargetFeature< 2850b57cec5SDimitry Andric "sel2", "HasSEL2", "true", 2860b57cec5SDimitry Andric "Enable v8.4-A Secure Exception Level 2 extension">; 2870b57cec5SDimitry Andric 2888bcb0991SDimitry Andricdef FeaturePMU : SubtargetFeature< 2898bcb0991SDimitry Andric "pmu", "HasPMU", "true", 2908bcb0991SDimitry Andric "Enable v8.4-A PMU extension">; 2918bcb0991SDimitry Andric 2920b57cec5SDimitry Andricdef FeatureTLB_RMI : SubtargetFeature< 2930b57cec5SDimitry Andric "tlb-rmi", "HasTLB_RMI", "true", 2940b57cec5SDimitry Andric "Enable v8.4-A TLB Range and Maintenance Instructions">; 2950b57cec5SDimitry Andric 2960b57cec5SDimitry Andricdef FeatureFMI : SubtargetFeature< 2970b57cec5SDimitry Andric "fmi", "HasFMI", "true", 2980b57cec5SDimitry Andric "Enable v8.4-A Flag Manipulation Instructions">; 2990b57cec5SDimitry Andric 3000b57cec5SDimitry Andric// 8.4 RCPC enchancements: LDAPR & STLR instructions with Immediate Offset 3010b57cec5SDimitry Andricdef FeatureRCPC_IMMO : SubtargetFeature<"rcpc-immo", "HasRCPC_IMMO", "true", 3020b57cec5SDimitry Andric "Enable v8.4-A RCPC instructions with Immediate Offsets", 3030b57cec5SDimitry Andric [FeatureRCPC]>; 3040b57cec5SDimitry Andric 3050b57cec5SDimitry Andricdef FeatureNoNegativeImmediates : SubtargetFeature<"no-neg-immediates", 3060b57cec5SDimitry Andric "NegativeImmediates", "false", 3070b57cec5SDimitry Andric "Convert immediates and instructions " 3080b57cec5SDimitry Andric "to their negated or complemented " 3090b57cec5SDimitry Andric "equivalent when the immediate does " 3100b57cec5SDimitry Andric "not fit in the encoding.">; 3110b57cec5SDimitry Andric 3120b57cec5SDimitry Andricdef FeatureLSLFast : SubtargetFeature< 3130b57cec5SDimitry Andric "lsl-fast", "HasLSLFast", "true", 3140b57cec5SDimitry Andric "CPU has a fastpath logical shift of up to 3 places">; 3150b57cec5SDimitry Andric 3160b57cec5SDimitry Andricdef FeatureAggressiveFMA : 3170b57cec5SDimitry Andric SubtargetFeature<"aggressive-fma", 3180b57cec5SDimitry Andric "HasAggressiveFMA", 3190b57cec5SDimitry Andric "true", 3200b57cec5SDimitry Andric "Enable Aggressive FMA for floating-point.">; 3210b57cec5SDimitry Andric 3220b57cec5SDimitry Andricdef FeatureAltFPCmp : SubtargetFeature<"altnzcv", "HasAlternativeNZCV", "true", 3230b57cec5SDimitry Andric "Enable alternative NZCV format for floating point comparisons">; 3240b57cec5SDimitry Andric 3250b57cec5SDimitry Andricdef FeatureFRInt3264 : SubtargetFeature<"fptoint", "HasFRInt3264", "true", 3260b57cec5SDimitry Andric "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to " 3270b57cec5SDimitry Andric "an integer (in FP format) forcing it to fit into a 32- or 64-bit int" >; 3280b57cec5SDimitry Andric 3290b57cec5SDimitry Andricdef FeatureSpecRestrict : SubtargetFeature<"specrestrict", "HasSpecRestrict", 3300b57cec5SDimitry Andric "true", "Enable architectural speculation restriction" >; 3310b57cec5SDimitry Andric 3320b57cec5SDimitry Andricdef FeatureSB : SubtargetFeature<"sb", "HasSB", 3330b57cec5SDimitry Andric "true", "Enable v8.5 Speculation Barrier" >; 3340b57cec5SDimitry Andric 3350b57cec5SDimitry Andricdef FeatureSSBS : SubtargetFeature<"ssbs", "HasSSBS", 3360b57cec5SDimitry Andric "true", "Enable Speculative Store Bypass Safe bit" >; 3370b57cec5SDimitry Andric 3380b57cec5SDimitry Andricdef FeaturePredRes : SubtargetFeature<"predres", "HasPredRes", "true", 3390b57cec5SDimitry Andric "Enable v8.5a execution and data prediction invalidation instructions" >; 3400b57cec5SDimitry Andric 3410b57cec5SDimitry Andricdef FeatureCacheDeepPersist : SubtargetFeature<"ccdp", "HasCCDP", 3420b57cec5SDimitry Andric "true", "Enable v8.5 Cache Clean to Point of Deep Persistence" >; 3430b57cec5SDimitry Andric 3440b57cec5SDimitry Andricdef FeatureBranchTargetId : SubtargetFeature<"bti", "HasBTI", 3450b57cec5SDimitry Andric "true", "Enable Branch Target Identification" >; 3460b57cec5SDimitry Andric 3470b57cec5SDimitry Andricdef FeatureRandGen : SubtargetFeature<"rand", "HasRandGen", 3480b57cec5SDimitry Andric "true", "Enable Random Number generation instructions" >; 3490b57cec5SDimitry Andric 3500b57cec5SDimitry Andricdef FeatureMTE : SubtargetFeature<"mte", "HasMTE", 3510b57cec5SDimitry Andric "true", "Enable Memory Tagging Extension" >; 3520b57cec5SDimitry Andric 3538bcb0991SDimitry Andricdef FeatureTRBE : SubtargetFeature<"trbe", "HasTRBE", 3548bcb0991SDimitry Andric "true", "Enable Trace Buffer Extension">; 3558bcb0991SDimitry Andric 3568bcb0991SDimitry Andricdef FeatureETE : SubtargetFeature<"ete", "HasETE", 3578bcb0991SDimitry Andric "true", "Enable Embedded Trace Extension", 3588bcb0991SDimitry Andric [FeatureTRBE]>; 3598bcb0991SDimitry Andric 3608bcb0991SDimitry Andricdef FeatureTME : SubtargetFeature<"tme", "HasTME", 3618bcb0991SDimitry Andric "true", "Enable Transactional Memory Extension" >; 3628bcb0991SDimitry Andric 3638bcb0991SDimitry Andricdef FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", 3648bcb0991SDimitry Andric "AllowTaggedGlobals", 3658bcb0991SDimitry Andric "true", "Use an instruction sequence for taking the address of a global " 3668bcb0991SDimitry Andric "that allows a memory tag in the upper address bits">; 3678bcb0991SDimitry Andric 3680b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 3690b57cec5SDimitry Andric// Architectures. 3700b57cec5SDimitry Andric// 3710b57cec5SDimitry Andric 3720b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true", 3730b57cec5SDimitry Andric "Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE, FeatureRDM, 3740b57cec5SDimitry Andric FeaturePAN, FeatureLOR, FeatureVH]>; 3750b57cec5SDimitry Andric 3760b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true", 3770b57cec5SDimitry Andric "Support ARM v8.2a instructions", [HasV8_1aOps, FeaturePsUAO, 3780b57cec5SDimitry Andric FeaturePAN_RWV, FeatureRAS, FeatureCCPP]>; 3790b57cec5SDimitry Andric 3800b57cec5SDimitry Andricdef HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true", 3810b57cec5SDimitry Andric "Support ARM v8.3a instructions", [HasV8_2aOps, FeatureRCPC, FeaturePA, 3820b57cec5SDimitry Andric FeatureJS, FeatureCCIDX, FeatureComplxNum]>; 3830b57cec5SDimitry Andric 3840b57cec5SDimitry Andricdef HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true", 3850b57cec5SDimitry Andric "Support ARM v8.4a instructions", [HasV8_3aOps, FeatureDotProd, 3860b57cec5SDimitry Andric FeatureNV, FeatureRASv8_4, FeatureMPAM, FeatureDIT, 3878bcb0991SDimitry Andric FeatureTRACEV8_4, FeatureAM, FeatureSEL2, FeaturePMU, FeatureTLB_RMI, 3880b57cec5SDimitry Andric FeatureFMI, FeatureRCPC_IMMO]>; 3890b57cec5SDimitry Andric 3900b57cec5SDimitry Andricdef HasV8_5aOps : SubtargetFeature< 3910b57cec5SDimitry Andric "v8.5a", "HasV8_5aOps", "true", "Support ARM v8.5a instructions", 3920b57cec5SDimitry Andric [HasV8_4aOps, FeatureAltFPCmp, FeatureFRInt3264, FeatureSpecRestrict, 3930b57cec5SDimitry Andric FeatureSSBS, FeatureSB, FeaturePredRes, FeatureCacheDeepPersist, 3940b57cec5SDimitry Andric FeatureBranchTargetId] 3950b57cec5SDimitry Andric>; 3960b57cec5SDimitry Andric 3970b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 3980b57cec5SDimitry Andric// Register File Description 3990b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4000b57cec5SDimitry Andric 4010b57cec5SDimitry Andricinclude "AArch64RegisterInfo.td" 4020b57cec5SDimitry Andricinclude "AArch64RegisterBanks.td" 4030b57cec5SDimitry Andricinclude "AArch64CallingConvention.td" 4040b57cec5SDimitry Andric 4050b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4060b57cec5SDimitry Andric// Instruction Descriptions 4070b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4080b57cec5SDimitry Andric 4090b57cec5SDimitry Andricinclude "AArch64Schedule.td" 4100b57cec5SDimitry Andricinclude "AArch64InstrInfo.td" 4110b57cec5SDimitry Andricinclude "AArch64SchedPredicates.td" 4120b57cec5SDimitry Andricinclude "AArch64SchedPredExynos.td" 4138bcb0991SDimitry Andricinclude "AArch64Combine.td" 4140b57cec5SDimitry Andric 4150b57cec5SDimitry Andricdef AArch64InstrInfo : InstrInfo; 4160b57cec5SDimitry Andric 4170b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4180b57cec5SDimitry Andric// Named operands for MRS/MSR/TLBI/... 4190b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4200b57cec5SDimitry Andric 4210b57cec5SDimitry Andricinclude "AArch64SystemOperands.td" 4220b57cec5SDimitry Andric 4230b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4240b57cec5SDimitry Andric// Access to privileged registers 4250b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4260b57cec5SDimitry Andric 4270b57cec5SDimitry Andricforeach i = 1-3 in 4280b57cec5SDimitry Andricdef FeatureUseEL#i#ForTP : SubtargetFeature<"tpidr-el"#i, "UseEL"#i#"ForTP", 4290b57cec5SDimitry Andric "true", "Permit use of TPIDR_EL"#i#" for the TLS base">; 4300b57cec5SDimitry Andric 4310b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4320b57cec5SDimitry Andric// AArch64 Processors supported. 4330b57cec5SDimitry Andric// 4340b57cec5SDimitry Andric 4350b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4360b57cec5SDimitry Andric// Unsupported features to disable for scheduling models 4370b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4380b57cec5SDimitry Andric 4390b57cec5SDimitry Andricclass AArch64Unsupported { list<Predicate> F; } 4400b57cec5SDimitry Andric 4410b57cec5SDimitry Andricdef SVEUnsupported : AArch64Unsupported { 4420b57cec5SDimitry Andric let F = [HasSVE, HasSVE2, HasSVE2AES, HasSVE2SM4, HasSVE2SHA3, 4430b57cec5SDimitry Andric HasSVE2BitPerm]; 4440b57cec5SDimitry Andric} 4450b57cec5SDimitry Andric 4460b57cec5SDimitry Andricinclude "AArch64SchedA53.td" 4470b57cec5SDimitry Andricinclude "AArch64SchedA57.td" 4480b57cec5SDimitry Andricinclude "AArch64SchedCyclone.td" 4490b57cec5SDimitry Andricinclude "AArch64SchedFalkor.td" 4500b57cec5SDimitry Andricinclude "AArch64SchedKryo.td" 4510b57cec5SDimitry Andricinclude "AArch64SchedExynosM3.td" 4520b57cec5SDimitry Andricinclude "AArch64SchedExynosM4.td" 453*480093f4SDimitry Andricinclude "AArch64SchedExynosM5.td" 4540b57cec5SDimitry Andricinclude "AArch64SchedThunderX.td" 4550b57cec5SDimitry Andricinclude "AArch64SchedThunderX2T99.td" 4560b57cec5SDimitry Andric 4570b57cec5SDimitry Andricdef ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", 4580b57cec5SDimitry Andric "Cortex-A35 ARM processors", [ 4590b57cec5SDimitry Andric FeatureCRC, 4600b57cec5SDimitry Andric FeatureCrypto, 4610b57cec5SDimitry Andric FeatureFPARMv8, 4620b57cec5SDimitry Andric FeatureNEON, 4630b57cec5SDimitry Andric FeaturePerfMon 4640b57cec5SDimitry Andric ]>; 4650b57cec5SDimitry Andric 4660b57cec5SDimitry Andricdef ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53", 4670b57cec5SDimitry Andric "Cortex-A53 ARM processors", [ 4680b57cec5SDimitry Andric FeatureBalanceFPOps, 4690b57cec5SDimitry Andric FeatureCRC, 4700b57cec5SDimitry Andric FeatureCrypto, 4710b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 4720b57cec5SDimitry Andric FeatureFPARMv8, 4730b57cec5SDimitry Andric FeatureFuseAES, 4740b57cec5SDimitry Andric FeatureNEON, 4750b57cec5SDimitry Andric FeaturePerfMon, 4760b57cec5SDimitry Andric FeaturePostRAScheduler, 4770b57cec5SDimitry Andric FeatureUseAA 4780b57cec5SDimitry Andric ]>; 4790b57cec5SDimitry Andric 4800b57cec5SDimitry Andricdef ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55", 4810b57cec5SDimitry Andric "Cortex-A55 ARM processors", [ 4820b57cec5SDimitry Andric HasV8_2aOps, 4830b57cec5SDimitry Andric FeatureCrypto, 4840b57cec5SDimitry Andric FeatureFPARMv8, 4850b57cec5SDimitry Andric FeatureFuseAES, 4860b57cec5SDimitry Andric FeatureNEON, 4870b57cec5SDimitry Andric FeatureFullFP16, 4880b57cec5SDimitry Andric FeatureDotProd, 4890b57cec5SDimitry Andric FeatureRCPC, 4900b57cec5SDimitry Andric FeaturePerfMon 4910b57cec5SDimitry Andric ]>; 4920b57cec5SDimitry Andric 4930b57cec5SDimitry Andricdef ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57", 4940b57cec5SDimitry Andric "Cortex-A57 ARM processors", [ 4950b57cec5SDimitry Andric FeatureBalanceFPOps, 4960b57cec5SDimitry Andric FeatureCRC, 4970b57cec5SDimitry Andric FeatureCrypto, 4980b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 4990b57cec5SDimitry Andric FeatureFPARMv8, 5000b57cec5SDimitry Andric FeatureFuseAES, 5010b57cec5SDimitry Andric FeatureFuseLiterals, 5020b57cec5SDimitry Andric FeatureNEON, 5030b57cec5SDimitry Andric FeaturePerfMon, 5040b57cec5SDimitry Andric FeaturePostRAScheduler, 5050b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive 5060b57cec5SDimitry Andric ]>; 5070b57cec5SDimitry Andric 5088bcb0991SDimitry Andricdef ProcA65 : SubtargetFeature<"a65", "ARMProcFamily", "CortexA65", 5098bcb0991SDimitry Andric "Cortex-A65 ARM processors", [ 5108bcb0991SDimitry Andric HasV8_2aOps, 5118bcb0991SDimitry Andric FeatureCrypto, 5128bcb0991SDimitry Andric FeatureDotProd, 5138bcb0991SDimitry Andric FeatureFPARMv8, 5148bcb0991SDimitry Andric FeatureFullFP16, 5158bcb0991SDimitry Andric FeatureNEON, 5168bcb0991SDimitry Andric FeatureRAS, 5178bcb0991SDimitry Andric FeatureRCPC, 5188bcb0991SDimitry Andric FeatureSSBS, 5198bcb0991SDimitry Andric ]>; 5208bcb0991SDimitry Andric 5210b57cec5SDimitry Andricdef ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72", 5220b57cec5SDimitry Andric "Cortex-A72 ARM processors", [ 5230b57cec5SDimitry Andric FeatureCRC, 5240b57cec5SDimitry Andric FeatureCrypto, 5250b57cec5SDimitry Andric FeatureFPARMv8, 5260b57cec5SDimitry Andric FeatureFuseAES, 5270b57cec5SDimitry Andric FeatureNEON, 5280b57cec5SDimitry Andric FeaturePerfMon 5290b57cec5SDimitry Andric ]>; 5300b57cec5SDimitry Andric 5310b57cec5SDimitry Andricdef ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73", 5320b57cec5SDimitry Andric "Cortex-A73 ARM processors", [ 5330b57cec5SDimitry Andric FeatureCRC, 5340b57cec5SDimitry Andric FeatureCrypto, 5350b57cec5SDimitry Andric FeatureFPARMv8, 5360b57cec5SDimitry Andric FeatureFuseAES, 5370b57cec5SDimitry Andric FeatureNEON, 5380b57cec5SDimitry Andric FeaturePerfMon 5390b57cec5SDimitry Andric ]>; 5400b57cec5SDimitry Andric 5410b57cec5SDimitry Andricdef ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75", 5420b57cec5SDimitry Andric "Cortex-A75 ARM processors", [ 5430b57cec5SDimitry Andric HasV8_2aOps, 5440b57cec5SDimitry Andric FeatureCrypto, 5450b57cec5SDimitry Andric FeatureFPARMv8, 5460b57cec5SDimitry Andric FeatureFuseAES, 5470b57cec5SDimitry Andric FeatureNEON, 5480b57cec5SDimitry Andric FeatureFullFP16, 5490b57cec5SDimitry Andric FeatureDotProd, 5500b57cec5SDimitry Andric FeatureRCPC, 5510b57cec5SDimitry Andric FeaturePerfMon 5520b57cec5SDimitry Andric ]>; 5530b57cec5SDimitry Andric 5540b57cec5SDimitry Andricdef ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76", 5550b57cec5SDimitry Andric "Cortex-A76 ARM processors", [ 5560b57cec5SDimitry Andric HasV8_2aOps, 5570b57cec5SDimitry Andric FeatureFPARMv8, 5580b57cec5SDimitry Andric FeatureNEON, 5590b57cec5SDimitry Andric FeatureRCPC, 5600b57cec5SDimitry Andric FeatureCrypto, 5610b57cec5SDimitry Andric FeatureFullFP16, 5620b57cec5SDimitry Andric FeatureDotProd, 5630b57cec5SDimitry Andric FeatureSSBS 5640b57cec5SDimitry Andric ]>; 5650b57cec5SDimitry Andric 5660b57cec5SDimitry Andric// Note that cyclone does not fuse AES instructions, but newer apple chips do 5670b57cec5SDimitry Andric// perform the fusion and cyclone is used by default when targetting apple OSes. 568*480093f4SDimitry Andricdef ProcAppleA7 : SubtargetFeature<"apple-a7", "ARMProcFamily", "AppleA7", 569*480093f4SDimitry Andric "Apple A7 (the CPU formerly known as Cyclone)", [ 5700b57cec5SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 5710b57cec5SDimitry Andric FeatureArithmeticBccFusion, 5720b57cec5SDimitry Andric FeatureArithmeticCbzFusion, 5730b57cec5SDimitry Andric FeatureCrypto, 5740b57cec5SDimitry Andric FeatureDisableLatencySchedHeuristic, 5750b57cec5SDimitry Andric FeatureFPARMv8, 5760b57cec5SDimitry Andric FeatureFuseAES, 5770b57cec5SDimitry Andric FeatureFuseCryptoEOR, 5780b57cec5SDimitry Andric FeatureNEON, 5790b57cec5SDimitry Andric FeaturePerfMon, 5800b57cec5SDimitry Andric FeatureZCRegMove, 5810b57cec5SDimitry Andric FeatureZCZeroing, 5820b57cec5SDimitry Andric FeatureZCZeroingFPWorkaround 5830b57cec5SDimitry Andric ]>; 5840b57cec5SDimitry Andric 585*480093f4SDimitry Andricdef ProcAppleA10 : SubtargetFeature<"apple-a10", "ARMProcFamily", "AppleA10", 586*480093f4SDimitry Andric "Apple A10", [ 587*480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 588*480093f4SDimitry Andric FeatureArithmeticBccFusion, 589*480093f4SDimitry Andric FeatureArithmeticCbzFusion, 5900b57cec5SDimitry Andric FeatureCrypto, 591*480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 592*480093f4SDimitry Andric FeatureFPARMv8, 5930b57cec5SDimitry Andric FeatureFuseAES, 594*480093f4SDimitry Andric FeatureFuseCryptoEOR, 595*480093f4SDimitry Andric FeatureNEON, 5960b57cec5SDimitry Andric FeaturePerfMon, 597*480093f4SDimitry Andric FeatureZCRegMove, 598*480093f4SDimitry Andric FeatureZCZeroing, 599*480093f4SDimitry Andric FeatureCRC, 600*480093f4SDimitry Andric FeatureRDM, 601*480093f4SDimitry Andric FeaturePAN, 602*480093f4SDimitry Andric FeatureLOR, 603*480093f4SDimitry Andric FeatureVH, 604*480093f4SDimitry Andric ]>; 6050b57cec5SDimitry Andric 606*480093f4SDimitry Andricdef ProcAppleA11 : SubtargetFeature<"apple-a11", "ARMProcFamily", "AppleA11", 607*480093f4SDimitry Andric "Apple A11", [ 608*480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 609*480093f4SDimitry Andric FeatureArithmeticBccFusion, 610*480093f4SDimitry Andric FeatureArithmeticCbzFusion, 6110b57cec5SDimitry Andric FeatureCrypto, 612*480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 613*480093f4SDimitry Andric FeatureFPARMv8, 6140b57cec5SDimitry Andric FeatureFuseAES, 615*480093f4SDimitry Andric FeatureFuseCryptoEOR, 616*480093f4SDimitry Andric FeatureNEON, 6170b57cec5SDimitry Andric FeaturePerfMon, 618*480093f4SDimitry Andric FeatureZCRegMove, 619*480093f4SDimitry Andric FeatureZCZeroing, 620*480093f4SDimitry Andric FeatureFullFP16, 621*480093f4SDimitry Andric HasV8_2aOps 622*480093f4SDimitry Andric ]>; 623*480093f4SDimitry Andric 624*480093f4SDimitry Andricdef ProcAppleA12 : SubtargetFeature<"apple-a12", "ARMProcFamily", "AppleA12", 625*480093f4SDimitry Andric "Apple A12", [ 626*480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 627*480093f4SDimitry Andric FeatureArithmeticBccFusion, 628*480093f4SDimitry Andric FeatureArithmeticCbzFusion, 629*480093f4SDimitry Andric FeatureCrypto, 630*480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 631*480093f4SDimitry Andric FeatureFPARMv8, 632*480093f4SDimitry Andric FeatureFuseAES, 633*480093f4SDimitry Andric FeatureFuseCryptoEOR, 634*480093f4SDimitry Andric FeatureNEON, 635*480093f4SDimitry Andric FeaturePerfMon, 636*480093f4SDimitry Andric FeatureZCRegMove, 637*480093f4SDimitry Andric FeatureZCZeroing, 638*480093f4SDimitry Andric FeatureFullFP16, 639*480093f4SDimitry Andric HasV8_3aOps 640*480093f4SDimitry Andric ]>; 641*480093f4SDimitry Andric 642*480093f4SDimitry Andricdef ProcAppleA13 : SubtargetFeature<"apple-a13", "ARMProcFamily", "AppleA13", 643*480093f4SDimitry Andric "Apple A13", [ 644*480093f4SDimitry Andric FeatureAlternateSExtLoadCVTF32Pattern, 645*480093f4SDimitry Andric FeatureArithmeticBccFusion, 646*480093f4SDimitry Andric FeatureArithmeticCbzFusion, 647*480093f4SDimitry Andric FeatureCrypto, 648*480093f4SDimitry Andric FeatureDisableLatencySchedHeuristic, 649*480093f4SDimitry Andric FeatureFPARMv8, 650*480093f4SDimitry Andric FeatureFuseAES, 651*480093f4SDimitry Andric FeatureFuseCryptoEOR, 652*480093f4SDimitry Andric FeatureNEON, 653*480093f4SDimitry Andric FeaturePerfMon, 654*480093f4SDimitry Andric FeatureZCRegMove, 655*480093f4SDimitry Andric FeatureZCZeroing, 656*480093f4SDimitry Andric FeatureFullFP16, 657*480093f4SDimitry Andric FeatureFP16FML, 658*480093f4SDimitry Andric FeatureSHA3, 659*480093f4SDimitry Andric HasV8_4aOps 660*480093f4SDimitry Andric ]>; 6610b57cec5SDimitry Andric 6620b57cec5SDimitry Andricdef ProcExynosM3 : SubtargetFeature<"exynosm3", "ARMProcFamily", "ExynosM3", 6630b57cec5SDimitry Andric "Samsung Exynos-M3 processors", 6640b57cec5SDimitry Andric [FeatureCRC, 6650b57cec5SDimitry Andric FeatureCrypto, 6660b57cec5SDimitry Andric FeatureExynosCheapAsMoveHandling, 6670b57cec5SDimitry Andric FeatureForce32BitJumpTables, 6680b57cec5SDimitry Andric FeatureFuseAddress, 6690b57cec5SDimitry Andric FeatureFuseAES, 6700b57cec5SDimitry Andric FeatureFuseCCSelect, 6710b57cec5SDimitry Andric FeatureFuseLiterals, 6720b57cec5SDimitry Andric FeatureLSLFast, 6730b57cec5SDimitry Andric FeaturePerfMon, 6740b57cec5SDimitry Andric FeaturePostRAScheduler, 6750b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 6760b57cec5SDimitry Andric FeatureZCZeroingFP]>; 6770b57cec5SDimitry Andric 6780b57cec5SDimitry Andricdef ProcExynosM4 : SubtargetFeature<"exynosm4", "ARMProcFamily", "ExynosM3", 6790b57cec5SDimitry Andric "Samsung Exynos-M4 processors", 6800b57cec5SDimitry Andric [HasV8_2aOps, 6810b57cec5SDimitry Andric FeatureArithmeticBccFusion, 6820b57cec5SDimitry Andric FeatureArithmeticCbzFusion, 6830b57cec5SDimitry Andric FeatureCrypto, 6840b57cec5SDimitry Andric FeatureDotProd, 6850b57cec5SDimitry Andric FeatureExynosCheapAsMoveHandling, 6860b57cec5SDimitry Andric FeatureForce32BitJumpTables, 6870b57cec5SDimitry Andric FeatureFullFP16, 6880b57cec5SDimitry Andric FeatureFuseAddress, 6890b57cec5SDimitry Andric FeatureFuseAES, 6900b57cec5SDimitry Andric FeatureFuseArithmeticLogic, 6910b57cec5SDimitry Andric FeatureFuseCCSelect, 6920b57cec5SDimitry Andric FeatureFuseLiterals, 6930b57cec5SDimitry Andric FeatureLSLFast, 6940b57cec5SDimitry Andric FeaturePerfMon, 6950b57cec5SDimitry Andric FeaturePostRAScheduler, 6960b57cec5SDimitry Andric FeatureZCZeroing]>; 6970b57cec5SDimitry Andric 6980b57cec5SDimitry Andricdef ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo", 6990b57cec5SDimitry Andric "Qualcomm Kryo processors", [ 7000b57cec5SDimitry Andric FeatureCRC, 7010b57cec5SDimitry Andric FeatureCrypto, 7020b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 7030b57cec5SDimitry Andric FeatureFPARMv8, 7040b57cec5SDimitry Andric FeatureNEON, 7050b57cec5SDimitry Andric FeaturePerfMon, 7060b57cec5SDimitry Andric FeaturePostRAScheduler, 7070b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 7080b57cec5SDimitry Andric FeatureZCZeroing, 7090b57cec5SDimitry Andric FeatureLSLFast 7100b57cec5SDimitry Andric ]>; 7110b57cec5SDimitry Andric 7120b57cec5SDimitry Andricdef ProcFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor", 7130b57cec5SDimitry Andric "Qualcomm Falkor processors", [ 7140b57cec5SDimitry Andric FeatureCRC, 7150b57cec5SDimitry Andric FeatureCrypto, 7160b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 7170b57cec5SDimitry Andric FeatureFPARMv8, 7180b57cec5SDimitry Andric FeatureNEON, 7190b57cec5SDimitry Andric FeaturePerfMon, 7200b57cec5SDimitry Andric FeaturePostRAScheduler, 7210b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 7220b57cec5SDimitry Andric FeatureRDM, 7230b57cec5SDimitry Andric FeatureZCZeroing, 7240b57cec5SDimitry Andric FeatureLSLFast, 7250b57cec5SDimitry Andric FeatureSlowSTRQro 7260b57cec5SDimitry Andric ]>; 7270b57cec5SDimitry Andric 7288bcb0991SDimitry Andricdef ProcNeoverseE1 : SubtargetFeature<"neoversee1", "ARMProcFamily", 7298bcb0991SDimitry Andric "NeoverseE1", 7308bcb0991SDimitry Andric "Neoverse E1 ARM processors", [ 7318bcb0991SDimitry Andric HasV8_2aOps, 7328bcb0991SDimitry Andric FeatureCrypto, 7338bcb0991SDimitry Andric FeatureDotProd, 7348bcb0991SDimitry Andric FeatureFPARMv8, 7358bcb0991SDimitry Andric FeatureFullFP16, 7368bcb0991SDimitry Andric FeatureNEON, 7378bcb0991SDimitry Andric FeatureRCPC, 7388bcb0991SDimitry Andric FeatureSSBS, 7398bcb0991SDimitry Andric ]>; 7408bcb0991SDimitry Andric 7418bcb0991SDimitry Andricdef ProcNeoverseN1 : SubtargetFeature<"neoversen1", "ARMProcFamily", 7428bcb0991SDimitry Andric "NeoverseN1", 7438bcb0991SDimitry Andric "Neoverse N1 ARM processors", [ 7448bcb0991SDimitry Andric HasV8_2aOps, 7458bcb0991SDimitry Andric FeatureCrypto, 7468bcb0991SDimitry Andric FeatureDotProd, 7478bcb0991SDimitry Andric FeatureFPARMv8, 7488bcb0991SDimitry Andric FeatureFullFP16, 7498bcb0991SDimitry Andric FeatureNEON, 7508bcb0991SDimitry Andric FeatureRCPC, 7518bcb0991SDimitry Andric FeatureSPE, 7528bcb0991SDimitry Andric FeatureSSBS, 7538bcb0991SDimitry Andric ]>; 7548bcb0991SDimitry Andric 7550b57cec5SDimitry Andricdef ProcSaphira : SubtargetFeature<"saphira", "ARMProcFamily", "Saphira", 7560b57cec5SDimitry Andric "Qualcomm Saphira processors", [ 7570b57cec5SDimitry Andric FeatureCrypto, 7580b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 7590b57cec5SDimitry Andric FeatureFPARMv8, 7600b57cec5SDimitry Andric FeatureNEON, 7610b57cec5SDimitry Andric FeatureSPE, 7620b57cec5SDimitry Andric FeaturePerfMon, 7630b57cec5SDimitry Andric FeaturePostRAScheduler, 7640b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 7650b57cec5SDimitry Andric FeatureZCZeroing, 7660b57cec5SDimitry Andric FeatureLSLFast, 7670b57cec5SDimitry Andric HasV8_4aOps]>; 7680b57cec5SDimitry Andric 7690b57cec5SDimitry Andricdef ProcThunderX2T99 : SubtargetFeature<"thunderx2t99", "ARMProcFamily", 7700b57cec5SDimitry Andric "ThunderX2T99", 7710b57cec5SDimitry Andric "Cavium ThunderX2 processors", [ 7720b57cec5SDimitry Andric FeatureAggressiveFMA, 7730b57cec5SDimitry Andric FeatureCRC, 7740b57cec5SDimitry Andric FeatureCrypto, 7750b57cec5SDimitry Andric FeatureFPARMv8, 7760b57cec5SDimitry Andric FeatureArithmeticBccFusion, 7770b57cec5SDimitry Andric FeatureNEON, 7780b57cec5SDimitry Andric FeaturePostRAScheduler, 7790b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 7800b57cec5SDimitry Andric FeatureLSE, 7810b57cec5SDimitry Andric HasV8_1aOps]>; 7820b57cec5SDimitry Andric 7830b57cec5SDimitry Andricdef ProcThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX", 7840b57cec5SDimitry Andric "Cavium ThunderX processors", [ 7850b57cec5SDimitry Andric FeatureCRC, 7860b57cec5SDimitry Andric FeatureCrypto, 7870b57cec5SDimitry Andric FeatureFPARMv8, 7880b57cec5SDimitry Andric FeaturePerfMon, 7890b57cec5SDimitry Andric FeaturePostRAScheduler, 7900b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 7910b57cec5SDimitry Andric FeatureNEON]>; 7920b57cec5SDimitry Andric 7930b57cec5SDimitry Andricdef ProcThunderXT88 : SubtargetFeature<"thunderxt88", "ARMProcFamily", 7940b57cec5SDimitry Andric "ThunderXT88", 7950b57cec5SDimitry Andric "Cavium ThunderX processors", [ 7960b57cec5SDimitry Andric FeatureCRC, 7970b57cec5SDimitry Andric FeatureCrypto, 7980b57cec5SDimitry Andric FeatureFPARMv8, 7990b57cec5SDimitry Andric FeaturePerfMon, 8000b57cec5SDimitry Andric FeaturePostRAScheduler, 8010b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 8020b57cec5SDimitry Andric FeatureNEON]>; 8030b57cec5SDimitry Andric 8040b57cec5SDimitry Andricdef ProcThunderXT81 : SubtargetFeature<"thunderxt81", "ARMProcFamily", 8050b57cec5SDimitry Andric "ThunderXT81", 8060b57cec5SDimitry Andric "Cavium ThunderX processors", [ 8070b57cec5SDimitry Andric FeatureCRC, 8080b57cec5SDimitry Andric FeatureCrypto, 8090b57cec5SDimitry Andric FeatureFPARMv8, 8100b57cec5SDimitry Andric FeaturePerfMon, 8110b57cec5SDimitry Andric FeaturePostRAScheduler, 8120b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 8130b57cec5SDimitry Andric FeatureNEON]>; 8140b57cec5SDimitry Andric 8150b57cec5SDimitry Andricdef ProcThunderXT83 : SubtargetFeature<"thunderxt83", "ARMProcFamily", 8160b57cec5SDimitry Andric "ThunderXT83", 8170b57cec5SDimitry Andric "Cavium ThunderX processors", [ 8180b57cec5SDimitry Andric FeatureCRC, 8190b57cec5SDimitry Andric FeatureCrypto, 8200b57cec5SDimitry Andric FeatureFPARMv8, 8210b57cec5SDimitry Andric FeaturePerfMon, 8220b57cec5SDimitry Andric FeaturePostRAScheduler, 8230b57cec5SDimitry Andric FeaturePredictableSelectIsExpensive, 8240b57cec5SDimitry Andric FeatureNEON]>; 8250b57cec5SDimitry Andric 8260b57cec5SDimitry Andricdef ProcTSV110 : SubtargetFeature<"tsv110", "ARMProcFamily", "TSV110", 8270b57cec5SDimitry Andric "HiSilicon TS-V110 processors", [ 8280b57cec5SDimitry Andric HasV8_2aOps, 8290b57cec5SDimitry Andric FeatureCrypto, 8300b57cec5SDimitry Andric FeatureCustomCheapAsMoveHandling, 8310b57cec5SDimitry Andric FeatureFPARMv8, 8320b57cec5SDimitry Andric FeatureFuseAES, 8330b57cec5SDimitry Andric FeatureNEON, 8340b57cec5SDimitry Andric FeaturePerfMon, 8350b57cec5SDimitry Andric FeaturePostRAScheduler, 8360b57cec5SDimitry Andric FeatureSPE, 8370b57cec5SDimitry Andric FeatureFullFP16, 8380b57cec5SDimitry Andric FeatureFP16FML, 8390b57cec5SDimitry Andric FeatureDotProd]>; 8400b57cec5SDimitry Andric 8410b57cec5SDimitry Andricdef : ProcessorModel<"generic", NoSchedModel, [ 8420b57cec5SDimitry Andric FeatureFPARMv8, 8430b57cec5SDimitry Andric FeatureFuseAES, 8440b57cec5SDimitry Andric FeatureNEON, 8450b57cec5SDimitry Andric FeaturePerfMon, 8468bcb0991SDimitry Andric FeaturePostRAScheduler, 8478bcb0991SDimitry Andric// ETE and TRBE are future architecture extensions. We temporariliy enable them 8488bcb0991SDimitry Andric// by default for users targeting generic AArch64, until it is decided in which 8498bcb0991SDimitry Andric// armv8.x-a architecture revision they will end up. The extensions do not 8508bcb0991SDimitry Andric// affect code generated by the compiler and can be used only by explicitly 8518bcb0991SDimitry Andric// mentioning the new system register names in assembly. 8528bcb0991SDimitry Andric FeatureETE 8530b57cec5SDimitry Andric ]>; 8540b57cec5SDimitry Andric 8550b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>; 8560b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>; 8570b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a55", CortexA53Model, [ProcA55]>; 8580b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>; 8598bcb0991SDimitry Andricdef : ProcessorModel<"cortex-a65", CortexA53Model, [ProcA65]>; 8608bcb0991SDimitry Andricdef : ProcessorModel<"cortex-a65ae", CortexA53Model, [ProcA65]>; 8610b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>; 8620b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>; 8630b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a75", CortexA57Model, [ProcA75]>; 8640b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a76", CortexA57Model, [ProcA76]>; 8650b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a76ae", CortexA57Model, [ProcA76]>; 8668bcb0991SDimitry Andricdef : ProcessorModel<"neoverse-e1", CortexA53Model, [ProcNeoverseE1]>; 8678bcb0991SDimitry Andricdef : ProcessorModel<"neoverse-n1", CortexA57Model, [ProcNeoverseN1]>; 8680b57cec5SDimitry Andricdef : ProcessorModel<"exynos-m3", ExynosM3Model, [ProcExynosM3]>; 8690b57cec5SDimitry Andricdef : ProcessorModel<"exynos-m4", ExynosM4Model, [ProcExynosM4]>; 870*480093f4SDimitry Andricdef : ProcessorModel<"exynos-m5", ExynosM5Model, [ProcExynosM4]>; 8710b57cec5SDimitry Andricdef : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>; 8720b57cec5SDimitry Andricdef : ProcessorModel<"saphira", FalkorModel, [ProcSaphira]>; 8730b57cec5SDimitry Andricdef : ProcessorModel<"kryo", KryoModel, [ProcKryo]>; 8740b57cec5SDimitry Andric// Cavium ThunderX/ThunderX T8X Processors 8750b57cec5SDimitry Andricdef : ProcessorModel<"thunderx", ThunderXT8XModel, [ProcThunderX]>; 8760b57cec5SDimitry Andricdef : ProcessorModel<"thunderxt88", ThunderXT8XModel, [ProcThunderXT88]>; 8770b57cec5SDimitry Andricdef : ProcessorModel<"thunderxt81", ThunderXT8XModel, [ProcThunderXT81]>; 8780b57cec5SDimitry Andricdef : ProcessorModel<"thunderxt83", ThunderXT8XModel, [ProcThunderXT83]>; 8790b57cec5SDimitry Andric// Cavium ThunderX2T9X Processors. Formerly Broadcom Vulcan. 8800b57cec5SDimitry Andricdef : ProcessorModel<"thunderx2t99", ThunderX2T99Model, [ProcThunderX2T99]>; 8810b57cec5SDimitry Andric// FIXME: HiSilicon TSV110 is currently modeled as a Cortex-A57. 8820b57cec5SDimitry Andricdef : ProcessorModel<"tsv110", CortexA57Model, [ProcTSV110]>; 8830b57cec5SDimitry Andric 884*480093f4SDimitry Andric// Support cyclone as an alias for apple-a7 so we can still LTO old bitcode. 885*480093f4SDimitry Andricdef : ProcessorModel<"cyclone", CycloneModel, [ProcAppleA7]>; 886*480093f4SDimitry Andric 887*480093f4SDimitry Andric// iPhone and iPad CPUs 888*480093f4SDimitry Andricdef : ProcessorModel<"apple-a7", CycloneModel, [ProcAppleA7]>; 889*480093f4SDimitry Andricdef : ProcessorModel<"apple-a8", CycloneModel, [ProcAppleA7]>; 890*480093f4SDimitry Andricdef : ProcessorModel<"apple-a9", CycloneModel, [ProcAppleA7]>; 891*480093f4SDimitry Andricdef : ProcessorModel<"apple-a10", CycloneModel, [ProcAppleA10]>; 892*480093f4SDimitry Andricdef : ProcessorModel<"apple-a11", CycloneModel, [ProcAppleA11]>; 893*480093f4SDimitry Andricdef : ProcessorModel<"apple-a12", CycloneModel, [ProcAppleA12]>; 894*480093f4SDimitry Andricdef : ProcessorModel<"apple-a13", CycloneModel, [ProcAppleA13]>; 895*480093f4SDimitry Andric 896*480093f4SDimitry Andric// watch CPUs. 897*480093f4SDimitry Andricdef : ProcessorModel<"apple-s4", CycloneModel, [ProcAppleA12]>; 898*480093f4SDimitry Andricdef : ProcessorModel<"apple-s5", CycloneModel, [ProcAppleA12]>; 899*480093f4SDimitry Andric 9000b57cec5SDimitry Andric// Alias for the latest Apple processor model supported by LLVM. 901*480093f4SDimitry Andricdef : ProcessorModel<"apple-latest", CycloneModel, [ProcAppleA13]>; 9020b57cec5SDimitry Andric 9030b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9040b57cec5SDimitry Andric// Assembly parser 9050b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9060b57cec5SDimitry Andric 9070b57cec5SDimitry Andricdef GenericAsmParserVariant : AsmParserVariant { 9080b57cec5SDimitry Andric int Variant = 0; 9090b57cec5SDimitry Andric string Name = "generic"; 9100b57cec5SDimitry Andric string BreakCharacters = "."; 9110b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 9120b57cec5SDimitry Andric} 9130b57cec5SDimitry Andric 9140b57cec5SDimitry Andricdef AppleAsmParserVariant : AsmParserVariant { 9150b57cec5SDimitry Andric int Variant = 1; 9160b57cec5SDimitry Andric string Name = "apple-neon"; 9170b57cec5SDimitry Andric string BreakCharacters = "."; 9180b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 9190b57cec5SDimitry Andric} 9200b57cec5SDimitry Andric 9210b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9220b57cec5SDimitry Andric// Assembly printer 9230b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9240b57cec5SDimitry Andric// AArch64 Uses the MC printer for asm output, so make sure the TableGen 9250b57cec5SDimitry Andric// AsmWriter bits get associated with the correct class. 9260b57cec5SDimitry Andricdef GenericAsmWriter : AsmWriter { 9270b57cec5SDimitry Andric string AsmWriterClassName = "InstPrinter"; 9280b57cec5SDimitry Andric int PassSubtarget = 1; 9290b57cec5SDimitry Andric int Variant = 0; 9300b57cec5SDimitry Andric bit isMCAsmWriter = 1; 9310b57cec5SDimitry Andric} 9320b57cec5SDimitry Andric 9330b57cec5SDimitry Andricdef AppleAsmWriter : AsmWriter { 9340b57cec5SDimitry Andric let AsmWriterClassName = "AppleInstPrinter"; 9350b57cec5SDimitry Andric int PassSubtarget = 1; 9360b57cec5SDimitry Andric int Variant = 1; 9370b57cec5SDimitry Andric int isMCAsmWriter = 1; 9380b57cec5SDimitry Andric} 9390b57cec5SDimitry Andric 9400b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9410b57cec5SDimitry Andric// Target Declaration 9420b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9430b57cec5SDimitry Andric 9440b57cec5SDimitry Andricdef AArch64 : Target { 9450b57cec5SDimitry Andric let InstructionSet = AArch64InstrInfo; 9460b57cec5SDimitry Andric let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant]; 9470b57cec5SDimitry Andric let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter]; 9480b57cec5SDimitry Andric let AllowRegisterRenaming = 1; 9490b57cec5SDimitry Andric} 9500b57cec5SDimitry Andric 9510b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9520b57cec5SDimitry Andric// Pfm Counters 9530b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9540b57cec5SDimitry Andric 9550b57cec5SDimitry Andricinclude "AArch64PfmCounters.td" 956