1 //=- AArch64.td - Describe the AArch64 Target Machine --------*- tablegen -*-=//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
13 // Target-independent interfaces which we are implementing.
14 //===----------------------------------------------------------------------===//
16 include "llvm/Target/Target.td"
18 //===----------------------------------------------------------------------===//
19 // AArch64 Subtarget features.
22 def FeatureFPARMv8 : SubtargetFeature<"fp-armv8", "HasFPARMv8", "true",
25 def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true",
26 "Enable Advanced SIMD instructions", [FeatureFPARMv8]>;
28 def FeatureSM4 : SubtargetFeature<
29 "sm4", "HasSM4", "true",
30 "Enable SM3 and SM4 support", [FeatureNEON]>;
32 def FeatureSHA2 : SubtargetFeature<
33 "sha2", "HasSHA2", "true",
34 "Enable SHA1 and SHA256 support", [FeatureNEON]>;
36 def FeatureSHA3 : SubtargetFeature<
37 "sha3", "HasSHA3", "true",
38 "Enable SHA512 and SHA3 support", [FeatureNEON, FeatureSHA2]>;
40 def FeatureAES : SubtargetFeature<
41 "aes", "HasAES", "true",
42 "Enable AES support", [FeatureNEON]>;
44 // Crypto has been split up and any combination is now valid (see the
45 // crypto defintions above). Also, crypto is now context sensitive:
46 // it has a different meaning for e.g. Armv8.4 than it has for Armv8.2.
47 // Therefore, we rely on Clang, the user interacing tool, to pass on the
48 // appropriate crypto options. But here in the backend, crypto has very little
49 // meaning anymore. We kept the Crypto defintion here for backward
50 // compatibility, and now imply features SHA2 and AES, which was the
51 // "traditional" meaning of Crypto.
52 def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true",
53 "Enable cryptographic instructions", [FeatureNEON, FeatureSHA2, FeatureAES]>;
55 def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true",
56 "Enable ARMv8 CRC-32 checksum instructions">;
58 def FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true",
59 "Enable ARMv8 Reliability, Availability and Serviceability Extensions">;
61 def FeatureLSE : SubtargetFeature<"lse", "HasLSE", "true",
62 "Enable ARMv8.1 Large System Extension (LSE) atomic instructions">;
64 def FeatureRDM : SubtargetFeature<"rdm", "HasRDM", "true",
65 "Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions">;
67 def FeaturePAN : SubtargetFeature<
68 "pan", "HasPAN", "true",
69 "Enables ARM v8.1 Privileged Access-Never extension">;
71 def FeatureLOR : SubtargetFeature<
72 "lor", "HasLOR", "true",
73 "Enables ARM v8.1 Limited Ordering Regions extension">;
75 def FeatureVH : SubtargetFeature<
76 "vh", "HasVH", "true",
77 "Enables ARM v8.1 Virtual Host extension">;
79 def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true",
80 "Enable ARMv8 PMUv3 Performance Monitors extension">;
82 def FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true",
83 "Full FP16", [FeatureFPARMv8]>;
85 def FeatureFP16FML : SubtargetFeature<"fp16fml", "HasFP16FML", "true",
86 "Enable FP16 FML instructions", [FeatureFullFP16]>;
88 def FeatureSPE : SubtargetFeature<"spe", "HasSPE", "true",
89 "Enable Statistical Profiling extension">;
91 def FeaturePAN_RWV : SubtargetFeature<
92 "pan-rwv", "HasPAN_RWV", "true",
93 "Enable v8.2 PAN s1e1R and s1e1W Variants",
97 def FeaturePsUAO : SubtargetFeature< "uaops", "HasPsUAO", "true",
98 "Enable v8.2 UAO PState">;
100 def FeatureCCPP : SubtargetFeature<"ccpp", "HasCCPP",
101 "true", "Enable v8.2 data Cache Clean to Point of Persistence" >;
103 def FeatureSVE : SubtargetFeature<"sve", "HasSVE", "true",
104 "Enable Scalable Vector Extension (SVE) instructions">;
106 def FeatureSVE2 : SubtargetFeature<"sve2", "HasSVE2", "true",
107 "Enable Scalable Vector Extension 2 (SVE2) instructions", [FeatureSVE]>;
109 def FeatureSVE2AES : SubtargetFeature<"sve2-aes", "HasSVE2AES", "true",
110 "Enable AES SVE2 instructions", [FeatureSVE2, FeatureAES]>;
112 def FeatureSVE2SM4 : SubtargetFeature<"sve2-sm4", "HasSVE2SM4", "true",
113 "Enable SM4 SVE2 instructions", [FeatureSVE2, FeatureSM4]>;
115 def FeatureSVE2SHA3 : SubtargetFeature<"sve2-sha3", "HasSVE2SHA3", "true",
116 "Enable SHA3 SVE2 instructions", [FeatureSVE2, FeatureSHA3]>;
118 def FeatureSVE2BitPerm : SubtargetFeature<"sve2-bitperm", "HasSVE2BitPerm", "true",
119 "Enable bit permutation SVE2 instructions", [FeatureSVE2]>;
121 def FeatureZCRegMove : SubtargetFeature<"zcm", "HasZeroCycleRegMove", "true",
122 "Has zero-cycle register moves">;
123 def FeatureZCZeroingGP : SubtargetFeature<"zcz-gp", "HasZeroCycleZeroingGP", "true",
124 "Has zero-cycle zeroing instructions for generic registers">;
126 def FeatureZCZeroingFP : SubtargetFeature<"zcz-fp", "HasZeroCycleZeroingFP", "true",
127 "Has zero-cycle zeroing instructions for FP registers">;
129 def FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
130 "Has zero-cycle zeroing instructions",
131 [FeatureZCZeroingGP, FeatureZCZeroingFP]>;
133 /// ... but the floating-point version doesn't quite work in rare cases on older
135 def FeatureZCZeroingFPWorkaround : SubtargetFeature<"zcz-fp-workaround",
136 "HasZeroCycleZeroingFPWorkaround", "true",
137 "The zero-cycle floating-point zeroing instruction has a bug">;
139 def FeatureStrictAlign : SubtargetFeature<"strict-align",
140 "StrictAlign", "true",
141 "Disallow all unaligned memory "
144 foreach i = {1-7,9-15,18,20-28} in
145 def FeatureReserveX#i : SubtargetFeature<"reserve-x"#i, "ReserveXRegister["#i#"]", "true",
146 "Reserve X"#i#", making it unavailable "
149 foreach i = {8-15,18} in
150 def FeatureCallSavedX#i : SubtargetFeature<"call-saved-x"#i,
151 "CustomCallSavedXRegs["#i#"]", "true", "Make X"#i#" callee saved.">;
153 def FeatureUseAA : SubtargetFeature<"use-aa", "UseAA", "true",
154 "Use alias analysis during codegen">;
156 def FeatureBalanceFPOps : SubtargetFeature<"balance-fp-ops", "BalanceFPOps",
158 "balance mix of odd and even D-registers for fp multiply(-accumulate) ops">;
160 def FeaturePredictableSelectIsExpensive : SubtargetFeature<
161 "predictable-select-expensive", "PredictableSelectIsExpensive", "true",
162 "Prefer likely predicted branches over selects">;
164 def FeatureCustomCheapAsMoveHandling : SubtargetFeature<"custom-cheap-as-move",
165 "CustomAsCheapAsMove", "true",
166 "Use custom handling of cheap instructions">;
168 def FeatureExynosCheapAsMoveHandling : SubtargetFeature<"exynos-cheap-as-move",
169 "ExynosAsCheapAsMove", "true",
170 "Use Exynos specific handling of cheap instructions",
171 [FeatureCustomCheapAsMoveHandling]>;
173 def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler",
174 "UsePostRAScheduler", "true", "Schedule again after register allocation">;
176 def FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store",
177 "Misaligned128StoreIsSlow", "true", "Misaligned 128 bit stores are slow">;
179 def FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128",
180 "Paired128IsSlow", "true", "Paired 128 bit loads and stores are slow">;
182 def FeatureSlowSTRQro : SubtargetFeature<"slow-strqro-store", "STRQroIsSlow",
183 "true", "STR of Q register with register offset is slow">;
185 def FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature<
186 "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern",
187 "true", "Use alternative pattern for sextload convert to f32">;
189 def FeatureArithmeticBccFusion : SubtargetFeature<
190 "arith-bcc-fusion", "HasArithmeticBccFusion", "true",
191 "CPU fuses arithmetic+bcc operations">;
193 def FeatureArithmeticCbzFusion : SubtargetFeature<
194 "arith-cbz-fusion", "HasArithmeticCbzFusion", "true",
195 "CPU fuses arithmetic + cbz/cbnz operations">;
197 def FeatureFuseAddress : SubtargetFeature<
198 "fuse-address", "HasFuseAddress", "true",
199 "CPU fuses address generation and memory operations">;
201 def FeatureFuseAES : SubtargetFeature<
202 "fuse-aes", "HasFuseAES", "true",
203 "CPU fuses AES crypto operations">;
205 def FeatureFuseArithmeticLogic : SubtargetFeature<
206 "fuse-arith-logic", "HasFuseArithmeticLogic", "true",
207 "CPU fuses arithmetic and logic operations">;
209 def FeatureFuseCCSelect : SubtargetFeature<
210 "fuse-csel", "HasFuseCCSelect", "true",
211 "CPU fuses conditional select operations">;
213 def FeatureFuseCryptoEOR : SubtargetFeature<
214 "fuse-crypto-eor", "HasFuseCryptoEOR", "true",
215 "CPU fuses AES/PMULL and EOR operations">;
217 def FeatureFuseLiterals : SubtargetFeature<
218 "fuse-literals", "HasFuseLiterals", "true",
219 "CPU fuses literal generation operations">;
221 def FeatureDisableLatencySchedHeuristic : SubtargetFeature<
222 "disable-latency-sched-heuristic", "DisableLatencySchedHeuristic", "true",
223 "Disable latency scheduling heuristic">;
225 def FeatureForce32BitJumpTables
226 : SubtargetFeature<"force-32bit-jump-tables", "Force32BitJumpTables", "true",
227 "Force jump table entries to be 32-bits wide except at MinSize">;
229 def FeatureRCPC : SubtargetFeature<"rcpc", "HasRCPC", "true",
230 "Enable support for RCPC extension">;
232 def FeatureUseRSqrt : SubtargetFeature<
233 "use-reciprocal-square-root", "UseRSqrt", "true",
234 "Use the reciprocal square root approximation">;
236 def FeatureDotProd : SubtargetFeature<
237 "dotprod", "HasDotProd", "true",
238 "Enable dot product support">;
240 def FeaturePA : SubtargetFeature<
241 "pa", "HasPA", "true",
242 "Enable v8.3-A Pointer Authentication enchancement">;
244 def FeatureJS : SubtargetFeature<
245 "jsconv", "HasJS", "true",
246 "Enable v8.3-A JavaScript FP conversion enchancement",
249 def FeatureCCIDX : SubtargetFeature<
250 "ccidx", "HasCCIDX", "true",
251 "Enable v8.3-A Extend of the CCSIDR number of sets">;
253 def FeatureComplxNum : SubtargetFeature<
254 "complxnum", "HasComplxNum", "true",
255 "Enable v8.3-A Floating-point complex number support",
258 def FeatureNV : SubtargetFeature<
259 "nv", "HasNV", "true",
260 "Enable v8.4-A Nested Virtualization Enchancement">;
262 def FeatureRASv8_4 : SubtargetFeature<
263 "rasv8_4", "HasRASv8_4", "true",
264 "Enable v8.4-A Reliability, Availability and Serviceability extension",
267 def FeatureMPAM : SubtargetFeature<
268 "mpam", "HasMPAM", "true",
269 "Enable v8.4-A Memory system Partitioning and Monitoring extension">;
271 def FeatureDIT : SubtargetFeature<
272 "dit", "HasDIT", "true",
273 "Enable v8.4-A Data Independent Timing instructions">;
275 def FeatureTRACEV8_4 : SubtargetFeature<
276 "tracev8.4", "HasTRACEV8_4", "true",
277 "Enable v8.4-A Trace extension">;
279 def FeatureAM : SubtargetFeature<
280 "am", "HasAM", "true",
281 "Enable v8.4-A Activity Monitors extension">;
283 def FeatureSEL2 : SubtargetFeature<
284 "sel2", "HasSEL2", "true",
285 "Enable v8.4-A Secure Exception Level 2 extension">;
287 def FeatureTLB_RMI : SubtargetFeature<
288 "tlb-rmi", "HasTLB_RMI", "true",
289 "Enable v8.4-A TLB Range and Maintenance Instructions">;
291 def FeatureFMI : SubtargetFeature<
292 "fmi", "HasFMI", "true",
293 "Enable v8.4-A Flag Manipulation Instructions">;
295 // 8.4 RCPC enchancements: LDAPR & STLR instructions with Immediate Offset
296 def FeatureRCPC_IMMO : SubtargetFeature<"rcpc-immo", "HasRCPC_IMMO", "true",
297 "Enable v8.4-A RCPC instructions with Immediate Offsets",
300 def FeatureNoNegativeImmediates : SubtargetFeature<"no-neg-immediates",
301 "NegativeImmediates", "false",
302 "Convert immediates and instructions "
303 "to their negated or complemented "
304 "equivalent when the immediate does "
305 "not fit in the encoding.">;
307 def FeatureLSLFast : SubtargetFeature<
308 "lsl-fast", "HasLSLFast", "true",
309 "CPU has a fastpath logical shift of up to 3 places">;
311 def FeatureAggressiveFMA :
312 SubtargetFeature<"aggressive-fma",
315 "Enable Aggressive FMA for floating-point.">;
317 def FeatureAltFPCmp : SubtargetFeature<"altnzcv", "HasAlternativeNZCV", "true",
318 "Enable alternative NZCV format for floating point comparisons">;
320 def FeatureFRInt3264 : SubtargetFeature<"fptoint", "HasFRInt3264", "true",
321 "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to "
322 "an integer (in FP format) forcing it to fit into a 32- or 64-bit int" >;
324 def FeatureSpecRestrict : SubtargetFeature<"specrestrict", "HasSpecRestrict",
325 "true", "Enable architectural speculation restriction" >;
327 def FeatureSB : SubtargetFeature<"sb", "HasSB",
328 "true", "Enable v8.5 Speculation Barrier" >;
330 def FeatureSSBS : SubtargetFeature<"ssbs", "HasSSBS",
331 "true", "Enable Speculative Store Bypass Safe bit" >;
333 def FeaturePredRes : SubtargetFeature<"predres", "HasPredRes", "true",
334 "Enable v8.5a execution and data prediction invalidation instructions" >;
336 def FeatureCacheDeepPersist : SubtargetFeature<"ccdp", "HasCCDP",
337 "true", "Enable v8.5 Cache Clean to Point of Deep Persistence" >;
339 def FeatureBranchTargetId : SubtargetFeature<"bti", "HasBTI",
340 "true", "Enable Branch Target Identification" >;
342 def FeatureRandGen : SubtargetFeature<"rand", "HasRandGen",
343 "true", "Enable Random Number generation instructions" >;
345 def FeatureMTE : SubtargetFeature<"mte", "HasMTE",
346 "true", "Enable Memory Tagging Extension" >;
348 //===----------------------------------------------------------------------===//
352 def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
353 "Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE, FeatureRDM,
354 FeaturePAN, FeatureLOR, FeatureVH]>;
356 def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
357 "Support ARM v8.2a instructions", [HasV8_1aOps, FeaturePsUAO,
358 FeaturePAN_RWV, FeatureRAS, FeatureCCPP]>;
360 def HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true",
361 "Support ARM v8.3a instructions", [HasV8_2aOps, FeatureRCPC, FeaturePA,
362 FeatureJS, FeatureCCIDX, FeatureComplxNum]>;
364 def HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true",
365 "Support ARM v8.4a instructions", [HasV8_3aOps, FeatureDotProd,
366 FeatureNV, FeatureRASv8_4, FeatureMPAM, FeatureDIT,
367 FeatureTRACEV8_4, FeatureAM, FeatureSEL2, FeatureTLB_RMI,
368 FeatureFMI, FeatureRCPC_IMMO]>;
370 def HasV8_5aOps : SubtargetFeature<
371 "v8.5a", "HasV8_5aOps", "true", "Support ARM v8.5a instructions",
372 [HasV8_4aOps, FeatureAltFPCmp, FeatureFRInt3264, FeatureSpecRestrict,
373 FeatureSSBS, FeatureSB, FeaturePredRes, FeatureCacheDeepPersist,
374 FeatureBranchTargetId]
377 //===----------------------------------------------------------------------===//
378 // Register File Description
379 //===----------------------------------------------------------------------===//
381 include "AArch64RegisterInfo.td"
382 include "AArch64RegisterBanks.td"
383 include "AArch64CallingConvention.td"
385 //===----------------------------------------------------------------------===//
386 // Instruction Descriptions
387 //===----------------------------------------------------------------------===//
389 include "AArch64Schedule.td"
390 include "AArch64InstrInfo.td"
391 include "AArch64SchedPredicates.td"
392 include "AArch64SchedPredExynos.td"
394 def AArch64InstrInfo : InstrInfo;
396 //===----------------------------------------------------------------------===//
397 // Named operands for MRS/MSR/TLBI/...
398 //===----------------------------------------------------------------------===//
400 include "AArch64SystemOperands.td"
402 //===----------------------------------------------------------------------===//
403 // Access to privileged registers
404 //===----------------------------------------------------------------------===//
407 def FeatureUseEL#i#ForTP : SubtargetFeature<"tpidr-el"#i, "UseEL"#i#"ForTP",
408 "true", "Permit use of TPIDR_EL"#i#" for the TLS base">;
410 //===----------------------------------------------------------------------===//
411 // AArch64 Processors supported.
414 //===----------------------------------------------------------------------===//
415 // Unsupported features to disable for scheduling models
416 //===----------------------------------------------------------------------===//
418 class AArch64Unsupported { list<Predicate> F; }
420 def SVEUnsupported : AArch64Unsupported {
421 let F = [HasSVE, HasSVE2, HasSVE2AES, HasSVE2SM4, HasSVE2SHA3,
425 include "AArch64SchedA53.td"
426 include "AArch64SchedA57.td"
427 include "AArch64SchedCyclone.td"
428 include "AArch64SchedFalkor.td"
429 include "AArch64SchedKryo.td"
430 include "AArch64SchedExynosM1.td"
431 include "AArch64SchedExynosM3.td"
432 include "AArch64SchedExynosM4.td"
433 include "AArch64SchedThunderX.td"
434 include "AArch64SchedThunderX2T99.td"
436 def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
437 "Cortex-A35 ARM processors", [
445 def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
446 "Cortex-A53 ARM processors", [
450 FeatureCustomCheapAsMoveHandling,
455 FeaturePostRAScheduler,
459 def ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55",
460 "Cortex-A55 ARM processors", [
472 def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
473 "Cortex-A57 ARM processors", [
477 FeatureCustomCheapAsMoveHandling,
483 FeaturePostRAScheduler,
484 FeaturePredictableSelectIsExpensive
487 def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
488 "Cortex-A72 ARM processors", [
497 def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
498 "Cortex-A73 ARM processors", [
507 def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75",
508 "Cortex-A75 ARM processors", [
520 def ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76",
521 "Cortex-A76 ARM processors", [
532 // Note that cyclone does not fuse AES instructions, but newer apple chips do
533 // perform the fusion and cyclone is used by default when targetting apple OSes.
534 def ProcCyclone : SubtargetFeature<"cyclone", "ARMProcFamily", "Cyclone",
536 FeatureAlternateSExtLoadCVTF32Pattern,
537 FeatureArithmeticBccFusion,
538 FeatureArithmeticCbzFusion,
540 FeatureDisableLatencySchedHeuristic,
543 FeatureFuseCryptoEOR,
548 FeatureZCZeroingFPWorkaround
551 def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1",
552 "Samsung Exynos-M1 processors",
553 [FeatureSlowPaired128,
556 FeatureExynosCheapAsMoveHandling,
557 FeatureForce32BitJumpTables,
560 FeaturePostRAScheduler,
561 FeatureSlowMisaligned128Store,
563 FeatureZCZeroingFP]>;
565 def ProcExynosM2 : SubtargetFeature<"exynosm2", "ARMProcFamily", "ExynosM1",
566 "Samsung Exynos-M2 processors",
567 [FeatureSlowPaired128,
570 FeatureExynosCheapAsMoveHandling,
571 FeatureForce32BitJumpTables,
574 FeaturePostRAScheduler,
575 FeatureSlowMisaligned128Store,
576 FeatureZCZeroingFP]>;
578 def ProcExynosM3 : SubtargetFeature<"exynosm3", "ARMProcFamily", "ExynosM3",
579 "Samsung Exynos-M3 processors",
582 FeatureExynosCheapAsMoveHandling,
583 FeatureForce32BitJumpTables,
590 FeaturePostRAScheduler,
591 FeaturePredictableSelectIsExpensive,
592 FeatureZCZeroingFP]>;
594 def ProcExynosM4 : SubtargetFeature<"exynosm4", "ARMProcFamily", "ExynosM3",
595 "Samsung Exynos-M4 processors",
597 FeatureArithmeticBccFusion,
598 FeatureArithmeticCbzFusion,
601 FeatureExynosCheapAsMoveHandling,
602 FeatureForce32BitJumpTables,
606 FeatureFuseArithmeticLogic,
611 FeaturePostRAScheduler,
614 def ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
615 "Qualcomm Kryo processors", [
618 FeatureCustomCheapAsMoveHandling,
622 FeaturePostRAScheduler,
623 FeaturePredictableSelectIsExpensive,
628 def ProcFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor",
629 "Qualcomm Falkor processors", [
632 FeatureCustomCheapAsMoveHandling,
636 FeaturePostRAScheduler,
637 FeaturePredictableSelectIsExpensive,
644 def ProcSaphira : SubtargetFeature<"saphira", "ARMProcFamily", "Saphira",
645 "Qualcomm Saphira processors", [
647 FeatureCustomCheapAsMoveHandling,
652 FeaturePostRAScheduler,
653 FeaturePredictableSelectIsExpensive,
658 def ProcThunderX2T99 : SubtargetFeature<"thunderx2t99", "ARMProcFamily",
660 "Cavium ThunderX2 processors", [
661 FeatureAggressiveFMA,
665 FeatureArithmeticBccFusion,
667 FeaturePostRAScheduler,
668 FeaturePredictableSelectIsExpensive,
672 def ProcThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX",
673 "Cavium ThunderX processors", [
678 FeaturePostRAScheduler,
679 FeaturePredictableSelectIsExpensive,
682 def ProcThunderXT88 : SubtargetFeature<"thunderxt88", "ARMProcFamily",
684 "Cavium ThunderX processors", [
689 FeaturePostRAScheduler,
690 FeaturePredictableSelectIsExpensive,
693 def ProcThunderXT81 : SubtargetFeature<"thunderxt81", "ARMProcFamily",
695 "Cavium ThunderX processors", [
700 FeaturePostRAScheduler,
701 FeaturePredictableSelectIsExpensive,
704 def ProcThunderXT83 : SubtargetFeature<"thunderxt83", "ARMProcFamily",
706 "Cavium ThunderX processors", [
711 FeaturePostRAScheduler,
712 FeaturePredictableSelectIsExpensive,
715 def ProcTSV110 : SubtargetFeature<"tsv110", "ARMProcFamily", "TSV110",
716 "HiSilicon TS-V110 processors", [
719 FeatureCustomCheapAsMoveHandling,
724 FeaturePostRAScheduler,
730 def : ProcessorModel<"generic", NoSchedModel, [
735 FeaturePostRAScheduler
738 // FIXME: Cortex-A35 and Cortex-A55 are currently modeled as a Cortex-A53.
739 def : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>;
740 def : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>;
741 def : ProcessorModel<"cortex-a55", CortexA53Model, [ProcA55]>;
742 def : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>;
743 def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
744 def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
745 def : ProcessorModel<"cortex-a75", CortexA57Model, [ProcA75]>;
746 def : ProcessorModel<"cortex-a76", CortexA57Model, [ProcA76]>;
747 def : ProcessorModel<"cortex-a76ae", CortexA57Model, [ProcA76]>;
748 def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
749 def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
750 def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
751 def : ProcessorModel<"exynos-m3", ExynosM3Model, [ProcExynosM3]>;
752 def : ProcessorModel<"exynos-m4", ExynosM4Model, [ProcExynosM4]>;
753 def : ProcessorModel<"exynos-m5", ExynosM4Model, [ProcExynosM4]>;
754 def : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>;
755 def : ProcessorModel<"saphira", FalkorModel, [ProcSaphira]>;
756 def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
757 // Cavium ThunderX/ThunderX T8X Processors
758 def : ProcessorModel<"thunderx", ThunderXT8XModel, [ProcThunderX]>;
759 def : ProcessorModel<"thunderxt88", ThunderXT8XModel, [ProcThunderXT88]>;
760 def : ProcessorModel<"thunderxt81", ThunderXT8XModel, [ProcThunderXT81]>;
761 def : ProcessorModel<"thunderxt83", ThunderXT8XModel, [ProcThunderXT83]>;
762 // Cavium ThunderX2T9X Processors. Formerly Broadcom Vulcan.
763 def : ProcessorModel<"thunderx2t99", ThunderX2T99Model, [ProcThunderX2T99]>;
764 // FIXME: HiSilicon TSV110 is currently modeled as a Cortex-A57.
765 def : ProcessorModel<"tsv110", CortexA57Model, [ProcTSV110]>;
767 // Alias for the latest Apple processor model supported by LLVM.
768 def : ProcessorModel<"apple-latest", CycloneModel, [ProcCyclone]>;
770 //===----------------------------------------------------------------------===//
772 //===----------------------------------------------------------------------===//
774 def GenericAsmParserVariant : AsmParserVariant {
776 string Name = "generic";
777 string BreakCharacters = ".";
778 string TokenizingCharacters = "[]*!/";
781 def AppleAsmParserVariant : AsmParserVariant {
783 string Name = "apple-neon";
784 string BreakCharacters = ".";
785 string TokenizingCharacters = "[]*!/";
788 //===----------------------------------------------------------------------===//
790 //===----------------------------------------------------------------------===//
791 // AArch64 Uses the MC printer for asm output, so make sure the TableGen
792 // AsmWriter bits get associated with the correct class.
793 def GenericAsmWriter : AsmWriter {
794 string AsmWriterClassName = "InstPrinter";
795 int PassSubtarget = 1;
797 bit isMCAsmWriter = 1;
800 def AppleAsmWriter : AsmWriter {
801 let AsmWriterClassName = "AppleInstPrinter";
802 int PassSubtarget = 1;
804 int isMCAsmWriter = 1;
807 //===----------------------------------------------------------------------===//
808 // Target Declaration
809 //===----------------------------------------------------------------------===//
811 def AArch64 : Target {
812 let InstructionSet = AArch64InstrInfo;
813 let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant];
814 let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter];
815 let AllowRegisterRenaming = 1;
818 //===----------------------------------------------------------------------===//
820 //===----------------------------------------------------------------------===//
822 include "AArch64PfmCounters.td"