blob: 09897104f32325b0db205cbf7b3d4e22fe2bacfd [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">;
Sanne Woudad4658ee2017-03-28 10:02:56 +0000121
122def FeatureNoNegativeImmediates : SubtargetFeature<"no-neg-immediates",
123 "NegativeImmediates", "false",
124 "Convert immediates and instructions "
125 "to their negated or complemented "
126 "equivalent when the immediate does "
127 "not fit in the encoding.">;
128
Tim Northover3b0846e2014-05-24 12:50:23 +0000129//===----------------------------------------------------------------------===//
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000130// Architectures.
131//
132
133def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
Chad Rosier58fb5f52017-01-16 16:28:43 +0000134 "Support ARM v8.1a instructions", [FeatureCRC, FeatureLSE, FeatureRDM]>;
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000135
Oliver Stannard7cc0c4e2015-11-26 15:23:32 +0000136def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
Sjoerd Meijerd906bf12016-06-03 14:03:27 +0000137 "Support ARM v8.2a instructions", [HasV8_1aOps, FeatureRAS]>;
Oliver Stannard7cc0c4e2015-11-26 15:23:32 +0000138
Vladimir Sukharev439328e2015-04-01 14:49:29 +0000139//===----------------------------------------------------------------------===//
Tim Northover3b0846e2014-05-24 12:50:23 +0000140// Register File Description
141//===----------------------------------------------------------------------===//
142
143include "AArch64RegisterInfo.td"
Daniel Sandersd64d50242017-01-19 11:15:55 +0000144include "AArch64RegisterBanks.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000145include "AArch64CallingConvention.td"
146
147//===----------------------------------------------------------------------===//
148// Instruction Descriptions
149//===----------------------------------------------------------------------===//
150
151include "AArch64Schedule.td"
152include "AArch64InstrInfo.td"
153
154def AArch64InstrInfo : InstrInfo;
155
156//===----------------------------------------------------------------------===//
Tim Northovere6ae6762016-07-05 21:23:04 +0000157// Named operands for MRS/MSR/TLBI/...
158//===----------------------------------------------------------------------===//
159
160include "AArch64SystemOperands.td"
161
162//===----------------------------------------------------------------------===//
Tim Northover3b0846e2014-05-24 12:50:23 +0000163// AArch64 Processors supported.
164//
165include "AArch64SchedA53.td"
Chad Rosier2205d4e2014-06-11 21:06:56 +0000166include "AArch64SchedA57.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000167include "AArch64SchedCyclone.td"
Chad Rosierd34c26e2016-11-29 20:00:27 +0000168include "AArch64SchedFalkor.td"
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000169include "AArch64SchedKryo.td"
Chad Rosierd34c26e2016-11-29 20:00:27 +0000170include "AArch64SchedM1.td"
Joel Jonesab0f3b42017-02-17 18:34:24 +0000171include "AArch64SchedThunderX.td"
Joel Jones28520882017-03-07 19:42:40 +0000172include "AArch64SchedThunderX2T99.td"
Tim Northover3b0846e2014-05-24 12:50:23 +0000173
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000174def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35",
Matthias Braun651cff42016-06-02 18:03:53 +0000175 "Cortex-A35 ARM processors", [
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000176 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000177 FeatureCrypto,
178 FeatureFPARMv8,
179 FeatureNEON,
180 FeaturePerfMon
181 ]>;
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000182
Tim Northover3b0846e2014-05-24 12:50:23 +0000183def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53",
Matthias Braun651cff42016-06-02 18:03:53 +0000184 "Cortex-A53 ARM processors", [
185 FeatureBalanceFPOps,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000186 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000187 FeatureCrypto,
188 FeatureCustomCheapAsMoveHandling,
189 FeatureFPARMv8,
190 FeatureNEON,
191 FeaturePerfMon,
192 FeaturePostRAScheduler,
193 FeatureUseAA
194 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000195
196def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57",
Matthias Braun651cff42016-06-02 18:03:53 +0000197 "Cortex-A57 ARM processors", [
198 FeatureBalanceFPOps,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000199 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000200 FeatureCrypto,
201 FeatureCustomCheapAsMoveHandling,
202 FeatureFPARMv8,
Evandro Menezesb21fb292017-02-01 02:54:39 +0000203 FeatureFuseAES,
Evandro Menezes455382e2017-02-01 02:54:42 +0000204 FeatureFuseLiterals,
Matthias Braun651cff42016-06-02 18:03:53 +0000205 FeatureNEON,
206 FeaturePerfMon,
207 FeaturePostRAScheduler,
208 FeaturePredictableSelectIsExpensive
209 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000210
Silviu Barangaaee40fc2016-06-21 15:53:54 +0000211def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72",
212 "Cortex-A72 ARM processors", [
213 FeatureCRC,
214 FeatureCrypto,
215 FeatureFPARMv8,
216 FeatureNEON,
217 FeaturePerfMon
218 ]>;
219
220def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73",
221 "Cortex-A73 ARM processors", [
222 FeatureCRC,
223 FeatureCrypto,
224 FeatureFPARMv8,
225 FeatureNEON,
226 FeaturePerfMon
227 ]>;
228
Tim Northover3b0846e2014-05-24 12:50:23 +0000229def ProcCyclone : SubtargetFeature<"cyclone", "ARMProcFamily", "Cyclone",
Matthias Braun651cff42016-06-02 18:03:53 +0000230 "Cyclone", [
231 FeatureAlternateSExtLoadCVTF32Pattern,
Tim Northover3b0846e2014-05-24 12:50:23 +0000232 FeatureCrypto,
Matthias Braun651cff42016-06-02 18:03:53 +0000233 FeatureDisableLatencySchedHeuristic,
234 FeatureFPARMv8,
Matthias Braun46a52382016-10-04 19:28:21 +0000235 FeatureArithmeticBccFusion,
236 FeatureArithmeticCbzFusion,
Matthias Braun651cff42016-06-02 18:03:53 +0000237 FeatureNEON,
Ahmed Bougachab0ff6432015-09-01 16:23:45 +0000238 FeaturePerfMon,
Matthias Braun651cff42016-06-02 18:03:53 +0000239 FeatureSlowMisaligned128Store,
240 FeatureZCRegMove,
241 FeatureZCZeroing
242 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000243
MinSeong Kima7385eb2016-01-05 12:51:59 +0000244def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1",
Evandro Menezesca837032016-10-26 22:06:20 +0000245 "Samsung Exynos-M1 processors",
Evandro Menezes7784cac2017-01-24 17:34:31 +0000246 [FeatureSlowPaired128,
Evandro Menezesca837032016-10-26 22:06:20 +0000247 FeatureCRC,
248 FeatureCrypto,
249 FeatureCustomCheapAsMoveHandling,
250 FeatureFPARMv8,
Evandro Menezesb21fb292017-02-01 02:54:39 +0000251 FeatureFuseAES,
Evandro Menezesca837032016-10-26 22:06:20 +0000252 FeatureNEON,
253 FeaturePerfMon,
254 FeaturePostRAScheduler,
Evandro Menezes1b48bac2016-12-16 00:18:00 +0000255 FeatureSlowMisaligned128Store,
Evandro Menezesca837032016-10-26 22:06:20 +0000256 FeatureUseRSqrt,
257 FeatureZCZeroing]>;
258
259def ProcExynosM2 : SubtargetFeature<"exynosm2", "ARMProcFamily", "ExynosM1",
Evandro Menezesaeec7802016-12-13 23:31:41 +0000260 "Samsung Exynos-M2/M3 processors",
Evandro Menezes7784cac2017-01-24 17:34:31 +0000261 [FeatureSlowPaired128,
Evandro Menezesca837032016-10-26 22:06:20 +0000262 FeatureCRC,
263 FeatureCrypto,
264 FeatureCustomCheapAsMoveHandling,
265 FeatureFPARMv8,
266 FeatureNEON,
267 FeaturePerfMon,
268 FeaturePostRAScheduler,
Evandro Menezes1b48bac2016-12-16 00:18:00 +0000269 FeatureSlowMisaligned128Store,
Evandro Menezesca837032016-10-26 22:06:20 +0000270 FeatureZCZeroing]>;
MinSeong Kima7385eb2016-01-05 12:51:59 +0000271
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000272def ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
Matthias Braun651cff42016-06-02 18:03:53 +0000273 "Qualcomm Kryo processors", [
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000274 FeatureCRC,
Matthias Braun651cff42016-06-02 18:03:53 +0000275 FeatureCrypto,
276 FeatureCustomCheapAsMoveHandling,
277 FeatureFPARMv8,
Matthias Braun651cff42016-06-02 18:03:53 +0000278 FeatureNEON,
279 FeaturePerfMon,
280 FeaturePostRAScheduler,
Haicheng Wu1e395742016-07-12 02:04:01 +0000281 FeaturePredictableSelectIsExpensive,
282 FeatureZCZeroing
Matthias Braun651cff42016-06-02 18:03:53 +0000283 ]>;
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000284
Chad Rosier201fc1e2016-11-15 21:34:12 +0000285def ProcFalkor : SubtargetFeature<"falkor", "ARMProcFamily", "Falkor",
286 "Qualcomm Falkor processors", [
287 FeatureCRC,
288 FeatureCrypto,
Chad Rosier63687e402017-01-04 21:26:23 +0000289 FeatureCustomCheapAsMoveHandling,
Chad Rosier201fc1e2016-11-15 21:34:12 +0000290 FeatureFPARMv8,
291 FeatureNEON,
Chad Rosier63687e402017-01-04 21:26:23 +0000292 FeaturePerfMon,
293 FeaturePostRAScheduler,
294 FeaturePredictableSelectIsExpensive,
Chad Rosier58fb5f52017-01-16 16:28:43 +0000295 FeatureRDM,
Chad Rosier63687e402017-01-04 21:26:23 +0000296 FeatureZCZeroing
Chad Rosier201fc1e2016-11-15 21:34:12 +0000297 ]>;
298
Joel Jones28520882017-03-07 19:42:40 +0000299def ProcThunderX2T99 : SubtargetFeature<"thunderx2t99", "ARMProcFamily",
300 "ThunderX2T99",
301 "Cavium ThunderX2 processors", [
302 FeatureCRC,
303 FeatureCrypto,
304 FeatureFPARMv8,
305 FeatureArithmeticBccFusion,
306 FeatureNEON,
307 FeaturePostRAScheduler,
308 FeaturePredictableSelectIsExpensive,
309 FeatureLSE,
310 HasV8_1aOps]>;
Pankaj Gode0aab2e32016-06-20 11:13:31 +0000311
Joel Jonesab0f3b42017-02-17 18:34:24 +0000312def ProcThunderX : SubtargetFeature<"thunderx", "ARMProcFamily", "ThunderX",
313 "Cavium ThunderX processors", [
314 FeatureCRC,
315 FeatureCrypto,
316 FeatureFPARMv8,
317 FeaturePerfMon,
318 FeaturePostRAScheduler,
319 FeaturePredictableSelectIsExpensive,
320 FeatureNEON]>;
321
322def ProcThunderXT88 : SubtargetFeature<"thunderxt88", "ARMProcFamily",
323 "ThunderXT88",
324 "Cavium ThunderX processors", [
325 FeatureCRC,
326 FeatureCrypto,
327 FeatureFPARMv8,
328 FeaturePerfMon,
329 FeaturePostRAScheduler,
330 FeaturePredictableSelectIsExpensive,
331 FeatureNEON]>;
332
333def ProcThunderXT81 : SubtargetFeature<"thunderxt81", "ARMProcFamily",
334 "ThunderXT81",
335 "Cavium ThunderX processors", [
336 FeatureCRC,
337 FeatureCrypto,
338 FeatureFPARMv8,
339 FeaturePerfMon,
340 FeaturePostRAScheduler,
341 FeaturePredictableSelectIsExpensive,
342 FeatureNEON]>;
343
344def ProcThunderXT83 : SubtargetFeature<"thunderxt83", "ARMProcFamily",
345 "ThunderXT83",
346 "Cavium ThunderX processors", [
347 FeatureCRC,
348 FeatureCrypto,
349 FeatureFPARMv8,
350 FeaturePerfMon,
351 FeaturePostRAScheduler,
352 FeaturePredictableSelectIsExpensive,
353 FeatureNEON]>;
354
Matthias Braun651cff42016-06-02 18:03:53 +0000355def : ProcessorModel<"generic", NoSchedModel, [
356 FeatureCRC,
357 FeatureFPARMv8,
358 FeatureNEON,
359 FeaturePerfMon,
360 FeaturePostRAScheduler
361 ]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000362
Chad Rosier8e11fbd2017-01-24 18:08:10 +0000363// FIXME: Cortex-A35 is currently modeled as a Cortex-A53.
Christof Douma8b5dc2c2015-12-02 11:53:44 +0000364def : ProcessorModel<"cortex-a35", CortexA53Model, [ProcA35]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000365def : ProcessorModel<"cortex-a53", CortexA53Model, [ProcA53]>;
Chad Rosier2205d4e2014-06-11 21:06:56 +0000366def : ProcessorModel<"cortex-a57", CortexA57Model, [ProcA57]>;
Chad Rosier8e11fbd2017-01-24 18:08:10 +0000367// FIXME: Cortex-A72 and Cortex-A73 are currently modeled as a Cortex-A57.
Silviu Barangaaee40fc2016-06-21 15:53:54 +0000368def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA72]>;
369def : ProcessorModel<"cortex-a73", CortexA57Model, [ProcA73]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000370def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
Evandro Menezesd761ca22016-02-06 00:01:41 +0000371def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
Evandro Menezesca837032016-10-26 22:06:20 +0000372def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
Evandro Menezesaeec7802016-12-13 23:31:41 +0000373def : ProcessorModel<"exynos-m3", ExynosM1Model, [ProcExynosM2]>;
Chad Rosierd34c26e2016-11-29 20:00:27 +0000374def : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>;
Chad Rosiercd2be7f2016-02-12 15:51:51 +0000375def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
Joel Jonesab0f3b42017-02-17 18:34:24 +0000376// Cavium ThunderX/ThunderX T8X Processors
377def : ProcessorModel<"thunderx", ThunderXT8XModel, [ProcThunderX]>;
378def : ProcessorModel<"thunderxt88", ThunderXT8XModel, [ProcThunderXT88]>;
379def : ProcessorModel<"thunderxt81", ThunderXT8XModel, [ProcThunderXT81]>;
380def : ProcessorModel<"thunderxt83", ThunderXT8XModel, [ProcThunderXT83]>;
Joel Jones28520882017-03-07 19:42:40 +0000381// Cavium ThunderX2T9X Processors. Formerly Broadcom Vulcan.
382def : ProcessorModel<"thunderx2t99", ThunderX2T99Model, [ProcThunderX2T99]>;
Tim Northover3b0846e2014-05-24 12:50:23 +0000383
384//===----------------------------------------------------------------------===//
385// Assembly parser
386//===----------------------------------------------------------------------===//
387
388def GenericAsmParserVariant : AsmParserVariant {
389 int Variant = 0;
390 string Name = "generic";
Colin LeMahieu8a0453e2015-11-09 00:31:07 +0000391 string BreakCharacters = ".";
Tim Northover3b0846e2014-05-24 12:50:23 +0000392}
393
394def AppleAsmParserVariant : AsmParserVariant {
395 int Variant = 1;
396 string Name = "apple-neon";
Colin LeMahieu8a0453e2015-11-09 00:31:07 +0000397 string BreakCharacters = ".";
Tim Northover3b0846e2014-05-24 12:50:23 +0000398}
399
400//===----------------------------------------------------------------------===//
401// Assembly printer
402//===----------------------------------------------------------------------===//
403// AArch64 Uses the MC printer for asm output, so make sure the TableGen
404// AsmWriter bits get associated with the correct class.
405def GenericAsmWriter : AsmWriter {
406 string AsmWriterClassName = "InstPrinter";
Akira Hatanakab46d0232015-03-27 20:36:02 +0000407 int PassSubtarget = 1;
Tim Northover3b0846e2014-05-24 12:50:23 +0000408 int Variant = 0;
409 bit isMCAsmWriter = 1;
410}
411
412def AppleAsmWriter : AsmWriter {
413 let AsmWriterClassName = "AppleInstPrinter";
Akira Hatanakab46d0232015-03-27 20:36:02 +0000414 int PassSubtarget = 1;
Tim Northover3b0846e2014-05-24 12:50:23 +0000415 int Variant = 1;
416 int isMCAsmWriter = 1;
417}
418
419//===----------------------------------------------------------------------===//
420// Target Declaration
421//===----------------------------------------------------------------------===//
422
423def AArch64 : Target {
424 let InstructionSet = AArch64InstrInfo;
425 let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant];
426 let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter];
427}