blob: 3df43e225a255726b1370e3a97e7a6c5195c3769 [file] [log] [blame]
Tim Northover3b0846e2014-05-24 12:50:23 +00001//=- AArch64.td - Describe the AArch64 Target Machine --------*- tablegen -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10//
11//===----------------------------------------------------------------------===//
12
13//===----------------------------------------------------------------------===//
Pankaj Godea67fea42016-06-15 17:24:52 +000014// Target-independent interfaces which we are implementing.
Tim Northover3b0846e2014-05-24 12:50:23 +000015//===----------------------------------------------------------------------===//
16
17include "llvm/Target/Target.td"
18
19//===----------------------------------------------------------------------===//
20// AArch64 Subtarget features.
21//
22
23def FeatureFPARMv8 : SubtargetFeature<"fp-armv8", "HasFPARMv8", "true",
24 "Enable ARMv8 FP">;
25
26def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true",
27 "Enable Advanced SIMD instructions", [FeatureFPARMv8]>;
28
29def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true",
30 "Enable cryptographic instructions">;
31
32def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true",
33 "Enable ARMv8 CRC-32 checksum instructions">;
34
Sjoerd Meijerd906bf12016-06-03 14:03:27 +000035def FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true",
36 "Enable ARMv8 Reliability, Availability and Serviceability Extensions">;
37
Joel Jones75818bc2016-11-30 22:25:24 +000038def FeatureLSE : SubtargetFeature<"lse", "HasLSE", "true",
39 "Enable ARMv8.1 Large System Extension (LSE) atomic instructions">;
40
Chad Rosier58fb5f52017-01-16 16:28:43 +000041def FeatureRDM : SubtargetFeature<"rdm", "HasRDM", "true",
42 "Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions">;
43
Ahmed Bougachab0ff6432015-09-01 16:23:45 +000044def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true",
45 "Enable ARMv8 PMUv3 Performance Monitors extension">;
46
Oliver Stannard7cc0c4e2015-11-26 15:23:32 +000047def FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true",
48 "Full FP16", [FeatureFPARMv8]>;
49
Oliver Stannarda34e4702015-12-01 10:48:51 +000050def FeatureSPE : SubtargetFeature<"spe", "HasSPE", "true",
51 "Enable Statistical Profiling extension">;
52
Tim Northover3b0846e2014-05-24 12:50:23 +000053/// Cyclone has register move instructions which are "free".
54def FeatureZCRegMove : SubtargetFeature<"zcm", "HasZeroCycleRegMove", "true",
55 "Has zero-cycle register moves">;
56
57/// Cyclone has instructions which zero registers for "free".
58def FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true",
59 "Has zero-cycle zeroing instructions">;
60
Akira Hatanakaf53b0402015-07-29 14:17:26 +000061def FeatureStrictAlign : SubtargetFeature<"strict-align",
62 "StrictAlign", "true",
63 "Disallow all unaligned memory "
64 "access">;
65
Akira Hatanaka0d4c9ea2015-07-25 00:18:31 +000066def FeatureReserveX18 : SubtargetFeature<"reserve-x18", "ReserveX18", "true",
67 "Reserve X18, making it unavailable "
68 "as a GPR">;
69
Matthias Braun651cff42016-06-02 18:03:53 +000070def FeatureUseAA : SubtargetFeature<"use-aa", "UseAA", "true",
71 "Use alias analysis during codegen">;
72
73def FeatureBalanceFPOps : SubtargetFeature<"balance-fp-ops", "BalanceFPOps",
74 "true",
75 "balance mix of odd and even D-registers for fp multiply(-accumulate) ops">;
76
77def FeaturePredictableSelectIsExpensive : SubtargetFeature<
78 "predictable-select-expensive", "PredictableSelectIsExpensive", "true",
79 "Prefer likely predicted branches over selects">;
80
81def FeatureCustomCheapAsMoveHandling : SubtargetFeature<"custom-cheap-as-move",
82 "CustomAsCheapAsMove", "true",
83 "Use custom code for TargetInstrInfo::isAsCheapAsAMove()">;
84
85def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler",
86 "UsePostRAScheduler", "true", "Schedule again after register allocation">;
87
88def FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store",
89 "Misaligned128StoreIsSlow", "true", "Misaligned 128 bit stores are slow">;
90
Evandro Menezes7784cac2017-01-24 17:34:31 +000091def FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128",
92 "Paired128IsSlow", "true", "Paired 128 bit loads and stores are slow">;
Matthias Braun651cff42016-06-02 18:03:53 +000093
94def FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature<
95 "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern",
96 "true", "Use alternative pattern for sextload convert to f32">;
97
Matthias Braun46a52382016-10-04 19:28:21 +000098def FeatureArithmeticBccFusion : SubtargetFeature<
99 "arith-bcc-fusion", "HasArithmeticBccFusion", "true",
100 "CPU fuses arithmetic+bcc operations">;
101
102def FeatureArithmeticCbzFusion : SubtargetFeature<
103 "arith-cbz-fusion", "HasArithmeticCbzFusion", "true",
104 "CPU fuses arithmetic + cbz/cbnz operations">;
Matthias Braun651cff42016-06-02 18:03:53 +0000105
Evandro Menezesb21fb292017-02-01 02:54:39 +0000106def FeatureFuseAES : SubtargetFeature<
107 "fuse-aes", "HasFuseAES", "true",
108 "CPU fuses AES crypto operations">;
109
Evandro Menezes455382e2017-02-01 02:54:42 +0000110def FeatureFuseLiterals : SubtargetFeature<
111 "fuse-literals", "HasFuseLiterals", "true",
112 "CPU fuses literal generation operations">;
113
Matthias Braun651cff42016-06-02 18:03:53 +0000114def FeatureDisableLatencySchedHeuristic : SubtargetFeature<
115 "disable-latency-sched-heuristic", "DisableLatencySchedHeuristic", "true",
116 "Disable latency scheduling heuristic">;
117
Evandro Menezeseff2bd92016-10-24 16:14:58 +0000118def FeatureUseRSqrt : SubtargetFeature<
119 "use-reciprocal-square-root", "UseRSqrt", "true",
120 "Use the reciprocal square root approximation">;
Tim Northover3b0846e2014-05-24 12:50:23 +0000121//===----------------------------------------------------------------------===//
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000122// Architectures.
123//
124
125def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
Chad Rosier58fb5f52017-01-16 16:28:43 +0000126 "Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE, FeatureRDM]>;
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000127
Oliver Stannard7cc0c4e2015-11-26 15:23:32 +0000128def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
Sjoerd Meijerd906bf12016-06-03 14:03:27 +0000129 "Support ARM v8.2a instructions", [HasV8_1aOps, FeatureRAS]>;
Oliver Stannard7cc0c4e2015-11-26 15:23:32 +0000130
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000131//===----------------------------------------------------------------------===//
Tim Northover3b0846e2014-05-24 12:50:23 +0000132// Register File Description
133//===----------------------------------------------------------------------===//
134
135include "AArch64RegisterInfo.td"
Daniel Sandersd64d50242017-01-19 11:15:55 +0000136include "AArch64RegisterBanks.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000137include "AArch64CallingConvention.td"
138
139//===----------------------------------------------------------------------===//
140// Instruction Descriptions
141//===----------------------------------------------------------------------===//
142
143include "AArch64Schedule.td"
144include "AArch64InstrInfo.td"
145
146def AArch64InstrInfo : InstrInfo;
147
148//===----------------------------------------------------------------------===//
Tim Northovere6ae6762016-07-05 21:23:04 +0000149// Named operands for MRS/MSR/TLBI/...
150//===----------------------------------------------------------------------===//
151
152include "AArch64SystemOperands.td"
153
154//===----------------------------------------------------------------------===//
Tim Northover3b0846e2014-05-24 12:50:23 +0000155// AArch64 Processors supported.
156//
157include "AArch64SchedA53.td"
Chad Rosier2205d4e2014-06-11 21:06:56 +0000158include "AArch64SchedA57.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000159include "AArch64SchedCyclone.td"
Chad Rosierd34c26e2016-11-29 20:00:27 +0000160include "AArch64SchedFalkor.td"
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000161include "AArch64SchedKryo.td"
Chad Rosierd34c26e2016-11-29 20:00:27 +0000162include "AArch64SchedM1.td"
Joel Jonesab0f3b42017-02-17 18:34:24 +0000163include "AArch64SchedThunderX.td"
Pankaj Godef4b25542016-06-30 06:42:31 +0000164include "AArch64SchedVulcan.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000165
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000166def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
Matthias Braun651cff42016-06-02 18:03:53 +0000167 "Cortex-A35 ARM processors", [
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000168 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000169 FeatureCrypto,
170 FeatureFPARMv8,
171 FeatureNEON,
172 FeaturePerfMon
173 ]>;
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000174
Tim Northover3b0846e2014-05-24 12:50:23 +0000175def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
Matthias Braun651cff42016-06-02 18:03:53 +0000176 "Cortex-A53 ARM processors", [
177 FeatureBalanceFPOps,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000178 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000179 FeatureCrypto,
180 FeatureCustomCheapAsMoveHandling,
181 FeatureFPARMv8,
182 FeatureNEON,
183 FeaturePerfMon,
184 FeaturePostRAScheduler,
185 FeatureUseAA
186 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000187
188def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
Matthias Braun651cff42016-06-02 18:03:53 +0000189 "Cortex-A57 ARM processors", [
190 FeatureBalanceFPOps,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000191 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000192 FeatureCrypto,
193 FeatureCustomCheapAsMoveHandling,
194 FeatureFPARMv8,
Evandro Menezesb21fb292017-02-01 02:54:39 +0000195 FeatureFuseAES,
Evandro Menezes455382e2017-02-01 02:54:42 +0000196 FeatureFuseLiterals,
Matthias Braun651cff42016-06-02 18:03:53 +0000197 FeatureNEON,
198 FeaturePerfMon,
199 FeaturePostRAScheduler,
200 FeaturePredictableSelectIsExpensive
201 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000202
Silviu Barangaaee40fc2016-06-21 15:53:54 +0000203def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
204 "Cortex-A72 ARM processors", [
205 FeatureCRC,
206 FeatureCrypto,
207 FeatureFPARMv8,
208 FeatureNEON,
209 FeaturePerfMon
210 ]>;
211
212def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
213 "Cortex-A73 ARM processors", [
214 FeatureCRC,
215 FeatureCrypto,
216 FeatureFPARMv8,
217 FeatureNEON,
218 FeaturePerfMon
219 ]>;
220
Tim Northover3b0846e2014-05-24 12:50:23 +0000221def ProcCyclone : SubtargetFeature<"cyclone", "ARMProcFamily", "Cyclone",
Matthias Braun651cff42016-06-02 18:03:53 +0000222 "Cyclone", [
223 FeatureAlternateSExtLoadCVTF32Pattern,
Tim Northover3b0846e2014-05-24 12:50:23 +0000224 FeatureCrypto,
Matthias Braun651cff42016-06-02 18:03:53 +0000225 FeatureDisableLatencySchedHeuristic,
226 FeatureFPARMv8,
Matthias Braun46a52382016-10-04 19:28:21 +0000227 FeatureArithmeticBccFusion,
228 FeatureArithmeticCbzFusion,
Matthias Braun651cff42016-06-02 18:03:53 +0000229 FeatureNEON,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000230 FeaturePerfMon,
Matthias Braun651cff42016-06-02 18:03:53 +0000231 FeatureSlowMisaligned128Store,
232 FeatureZCRegMove,
233 FeatureZCZeroing
234 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000235
MinSeong Kima7385eb2016-01-05 12:51:59 +0000236def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1",
Evandro Menezesca837032016-10-26 22:06:20 +0000237 "Samsung Exynos-M1 processors",
Evandro Menezes7784cac2017-01-24 17:34:31 +0000238 [FeatureSlowPaired128,
Evandro Menezesca837032016-10-26 22:06:20 +0000239 FeatureCRC,
240 FeatureCrypto,
241 FeatureCustomCheapAsMoveHandling,
242 FeatureFPARMv8,
Evandro Menezesb21fb292017-02-01 02:54:39 +0000243 FeatureFuseAES,
Evandro Menezesca837032016-10-26 22:06:20 +0000244 FeatureNEON,
245 FeaturePerfMon,
246 FeaturePostRAScheduler,
Evandro Menezes1b48bac2016-12-16 00:18:00 +0000247 FeatureSlowMisaligned128Store,
Evandro Menezesca837032016-10-26 22:06:20 +0000248 FeatureUseRSqrt,
249 FeatureZCZeroing]>;
250
251def ProcExynosM2 : SubtargetFeature<"exynosm2", "ARMProcFamily", "ExynosM1",
Evandro Menezesaeec7802016-12-13 23:31:41 +0000252 "Samsung Exynos-M2/M3 processors",
Evandro Menezes7784cac2017-01-24 17:34:31 +0000253 [FeatureSlowPaired128,
Evandro Menezesca837032016-10-26 22:06:20 +0000254 FeatureCRC,
255 FeatureCrypto,
256 FeatureCustomCheapAsMoveHandling,
257 FeatureFPARMv8,
258 FeatureNEON,
259 FeaturePerfMon,
260 FeaturePostRAScheduler,
Evandro Menezes1b48bac2016-12-16 00:18:00 +0000261 FeatureSlowMisaligned128Store,
Evandro Menezesca837032016-10-26 22:06:20 +0000262 FeatureZCZeroing]>;
MinSeong Kima7385eb2016-01-05 12:51:59 +0000263
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000264def ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
Matthias Braun651cff42016-06-02 18:03:53 +0000265 "Qualcomm Kryo processors", [
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000266 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000267 FeatureCrypto,
268 FeatureCustomCheapAsMoveHandling,
269 FeatureFPARMv8,
Matthias Braun651cff42016-06-02 18:03:53 +0000270 FeatureNEON,
271 FeaturePerfMon,
272 FeaturePostRAScheduler,
Haicheng Wu1e395742016-07-12 02:04:01 +0000273 FeaturePredictableSelectIsExpensive,
274 FeatureZCZeroing
Matthias Braun651cff42016-06-02 18:03:53 +0000275 ]>;
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000276
Chad Rosier201fc1e2016-11-15 21:34:12 +0000277def ProcFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor",
278 "Qualcomm Falkor processors", [
279 FeatureCRC,
280 FeatureCrypto,
Chad Rosier63687e402017-01-04 21:26:23 +0000281 FeatureCustomCheapAsMoveHandling,
Chad Rosier201fc1e2016-11-15 21:34:12 +0000282 FeatureFPARMv8,
283 FeatureNEON,
Chad Rosier63687e402017-01-04 21:26:23 +0000284 FeaturePerfMon,
285 FeaturePostRAScheduler,
286 FeaturePredictableSelectIsExpensive,
Chad Rosier58fb5f52017-01-16 16:28:43 +0000287 FeatureRDM,
Chad Rosier63687e402017-01-04 21:26:23 +0000288 FeatureZCZeroing
Chad Rosier201fc1e2016-11-15 21:34:12 +0000289 ]>;
290
Pankaj Gode0aab2e32016-06-20 11:13:31 +0000291def ProcVulcan : SubtargetFeature<"vulcan", "ARMProcFamily", "Vulcan",
292 "Broadcom Vulcan processors", [
Pankaj Godef4b25542016-06-30 06:42:31 +0000293 FeatureCRC,
294 FeatureCrypto,
Pankaj Gode0aab2e32016-06-20 11:13:31 +0000295 FeatureFPARMv8,
Matthias Braun46a52382016-10-04 19:28:21 +0000296 FeatureArithmeticBccFusion,
Pankaj Gode0aab2e32016-06-20 11:13:31 +0000297 FeatureNEON,
Pankaj Godef4b25542016-06-30 06:42:31 +0000298 FeaturePostRAScheduler,
Pankaj Gode1bfca192016-07-19 14:30:21 +0000299 FeaturePredictableSelectIsExpensive,
Pankaj Gode0aab2e32016-06-20 11:13:31 +0000300 HasV8_1aOps]>;
301
Joel Jonesab0f3b42017-02-17 18:34:24 +0000302def ProcThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX",
303 "Cavium ThunderX processors", [
304 FeatureCRC,
305 FeatureCrypto,
306 FeatureFPARMv8,
307 FeaturePerfMon,
308 FeaturePostRAScheduler,
309 FeaturePredictableSelectIsExpensive,
310 FeatureNEON]>;
311
312def ProcThunderXT88 : SubtargetFeature<"thunderxt88", "ARMProcFamily",
313 "ThunderXT88",
314 "Cavium ThunderX processors", [
315 FeatureCRC,
316 FeatureCrypto,
317 FeatureFPARMv8,
318 FeaturePerfMon,
319 FeaturePostRAScheduler,
320 FeaturePredictableSelectIsExpensive,
321 FeatureNEON]>;
322
323def ProcThunderXT81 : SubtargetFeature<"thunderxt81", "ARMProcFamily",
324 "ThunderXT81",
325 "Cavium ThunderX processors", [
326 FeatureCRC,
327 FeatureCrypto,
328 FeatureFPARMv8,
329 FeaturePerfMon,
330 FeaturePostRAScheduler,
331 FeaturePredictableSelectIsExpensive,
332 FeatureNEON]>;
333
334def ProcThunderXT83 : SubtargetFeature<"thunderxt83", "ARMProcFamily",
335 "ThunderXT83",
336 "Cavium ThunderX processors", [
337 FeatureCRC,
338 FeatureCrypto,
339 FeatureFPARMv8,
340 FeaturePerfMon,
341 FeaturePostRAScheduler,
342 FeaturePredictableSelectIsExpensive,
343 FeatureNEON]>;
344
Matthias Braun651cff42016-06-02 18:03:53 +0000345def : ProcessorModel<"generic", NoSchedModel, [
346 FeatureCRC,
347 FeatureFPARMv8,
348 FeatureNEON,
349 FeaturePerfMon,
350 FeaturePostRAScheduler
351 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000352
Chad Rosier8e11fbd2017-01-24 18:08:10 +0000353// FIXME: Cortex-A35 is currently modeled as a Cortex-A53.
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000354def : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000355def : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>;
Chad Rosier2205d4e2014-06-11 21:06:56 +0000356def : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>;
Chad Rosier8e11fbd2017-01-24 18:08:10 +0000357// FIXME: Cortex-A72 and Cortex-A73 are currently modeled as a Cortex-A57.
Silviu Barangaaee40fc2016-06-21 15:53:54 +0000358def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
359def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000360def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
Evandro Menezesd761ca22016-02-06 00:01:41 +0000361def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
Evandro Menezesca837032016-10-26 22:06:20 +0000362def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
Evandro Menezesaeec7802016-12-13 23:31:41 +0000363def : ProcessorModel<"exynos-m3", ExynosM1Model, [ProcExynosM2]>;
Chad Rosierd34c26e2016-11-29 20:00:27 +0000364def : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>;
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000365def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
Pankaj Godef4b25542016-06-30 06:42:31 +0000366def : ProcessorModel<"vulcan", VulcanModel, [ProcVulcan]>;
Joel Jonesab0f3b42017-02-17 18:34:24 +0000367// Cavium ThunderX/ThunderX T8X Processors
368def : ProcessorModel<"thunderx", ThunderXT8XModel, [ProcThunderX]>;
369def : ProcessorModel<"thunderxt88", ThunderXT8XModel, [ProcThunderXT88]>;
370def : ProcessorModel<"thunderxt81", ThunderXT8XModel, [ProcThunderXT81]>;
371def : ProcessorModel<"thunderxt83", ThunderXT8XModel, [ProcThunderXT83]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000372
373//===----------------------------------------------------------------------===//
374// Assembly parser
375//===----------------------------------------------------------------------===//
376
377def GenericAsmParserVariant : AsmParserVariant {
378 int Variant = 0;
379 string Name = "generic";
Colin LeMahieu8a0453e2015-11-09 00:31:07 +0000380 string BreakCharacters = ".";
Tim Northover3b0846e2014-05-24 12:50:23 +0000381}
382
383def AppleAsmParserVariant : AsmParserVariant {
384 int Variant = 1;
385 string Name = "apple-neon";
Colin LeMahieu8a0453e2015-11-09 00:31:07 +0000386 string BreakCharacters = ".";
Tim Northover3b0846e2014-05-24 12:50:23 +0000387}
388
389//===----------------------------------------------------------------------===//
390// Assembly printer
391//===----------------------------------------------------------------------===//
392// AArch64 Uses the MC printer for asm output, so make sure the TableGen
393// AsmWriter bits get associated with the correct class.
394def GenericAsmWriter : AsmWriter {
395 string AsmWriterClassName = "InstPrinter";
Akira Hatanakab46d0232015-03-27 20:36:02 +0000396 int PassSubtarget = 1;
Tim Northover3b0846e2014-05-24 12:50:23 +0000397 int Variant = 0;
398 bit isMCAsmWriter = 1;
399}
400
401def AppleAsmWriter : AsmWriter {
402 let AsmWriterClassName = "AppleInstPrinter";
Akira Hatanakab46d0232015-03-27 20:36:02 +0000403 int PassSubtarget = 1;
Tim Northover3b0846e2014-05-24 12:50:23 +0000404 int Variant = 1;
405 int isMCAsmWriter = 1;
406}
407
408//===----------------------------------------------------------------------===//
409// Target Declaration
410//===----------------------------------------------------------------------===//
411
412def AArch64 : Target {
413 let InstructionSet = AArch64InstrInfo;
414 let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant];
415 let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter];
416}