Add gfx950 mfma instructions to ROCDL dialect (#123361)
[llvm-project.git] / llvm / lib / Target / SystemZ / SystemZFeatures.td
blobec1a7beeab2135a0e409bea02b857e992111d18f
1 //===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Feature definitions.
11 //===----------------------------------------------------------------------===//
13 class SystemZFeature<string extname, string intname, dag featdag, string desc>
14   : Predicate<"Subtarget->has"#intname#"()">,
15     AssemblerPredicate<featdag, extname>,
16     SubtargetFeature<extname, "Has"#intname, "true", desc>;
18 class SystemZMissingFeature<string intname>
19   : Predicate<"!Subtarget->has"#intname#"()">;
21 class SystemZFeatureList<list<SystemZFeature> x> {
22   list<SystemZFeature> List = x;
25 class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y>
26   : SystemZFeatureList<!listconcat(x, y)>;
28 // This feature is added as a subtarget feature whenever the function is
29 // compiled to use soft-float.
30 def FeatureSoftFloat : SystemZFeature<
31   "soft-float", "SoftFloat", (all_of FeatureSoftFloat),
32   "Use software emulation for floating point"
35 def FeatureBackChain : SystemZFeature<
36   "backchain", "BackChain", (all_of FeatureBackChain),
37   "Store the address of the caller's frame into the callee's stack frame"
40 def FeatureUnalignedSymbols : SystemZFeature<
41   "unaligned-symbols", "UnalignedSymbols", (all_of FeatureUnalignedSymbols),
42   "Don't apply the ABI minimum alignment to external symbols."
45 //===----------------------------------------------------------------------===//
47 // New features added in the Ninth Edition of the z/Architecture
49 //===----------------------------------------------------------------------===//
51 def FeatureDistinctOps : SystemZFeature<
52   "distinct-ops", "DistinctOps", (all_of FeatureDistinctOps),
53   "Assume that the distinct-operands facility is installed"
56 def FeatureFastSerialization : SystemZFeature<
57   "fast-serialization", "FastSerialization", (all_of FeatureFastSerialization),
58   "Assume that the fast-serialization facility is installed"
61 def FeatureFPExtension : SystemZFeature<
62   "fp-extension", "FPExtension", (all_of FeatureFPExtension),
63   "Assume that the floating-point extension facility is installed"
66 def FeatureHighWord : SystemZFeature<
67   "high-word", "HighWord", (all_of FeatureHighWord),
68   "Assume that the high-word facility is installed"
71 def FeatureInterlockedAccess1 : SystemZFeature<
72   "interlocked-access1", "InterlockedAccess1", (all_of FeatureInterlockedAccess1),
73   "Assume that interlocked-access facility 1 is installed"
75 def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;
77 def FeatureLoadStoreOnCond : SystemZFeature<
78   "load-store-on-cond", "LoadStoreOnCond", (all_of FeatureLoadStoreOnCond),
79   "Assume that the load/store-on-condition facility is installed"
81 def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">;
83 def FeaturePopulationCount : SystemZFeature<
84   "population-count", "PopulationCount", (all_of FeaturePopulationCount),
85   "Assume that the population-count facility is installed"
88 def FeatureMessageSecurityAssist3 : SystemZFeature<
89   "message-security-assist-extension3", "MessageSecurityAssist3", (all_of FeatureMessageSecurityAssist3),
90   "Assume that the message-security-assist extension facility 3 is installed"
93 def FeatureMessageSecurityAssist4 : SystemZFeature<
94   "message-security-assist-extension4", "MessageSecurityAssist4", (all_of FeatureMessageSecurityAssist4),
95   "Assume that the message-security-assist extension facility 4 is installed"
98 def FeatureResetReferenceBitsMultiple : SystemZFeature<
99   "reset-reference-bits-multiple", "ResetReferenceBitsMultiple", (all_of FeatureResetReferenceBitsMultiple),
100   "Assume that the reset-reference-bits-multiple facility is installed"
103 def Arch9NewFeatures : SystemZFeatureList<[
104     FeatureDistinctOps,
105     FeatureFastSerialization,
106     FeatureFPExtension,
107     FeatureHighWord,
108     FeatureInterlockedAccess1,
109     FeatureLoadStoreOnCond,
110     FeaturePopulationCount,
111     FeatureMessageSecurityAssist3,
112     FeatureMessageSecurityAssist4,
113     FeatureResetReferenceBitsMultiple
116 //===----------------------------------------------------------------------===//
118 // New features added in the Tenth Edition of the z/Architecture
120 //===----------------------------------------------------------------------===//
122 def FeatureExecutionHint : SystemZFeature<
123   "execution-hint", "ExecutionHint", (all_of FeatureExecutionHint),
124   "Assume that the execution-hint facility is installed"
127 def FeatureLoadAndTrap : SystemZFeature<
128   "load-and-trap", "LoadAndTrap", (all_of FeatureLoadAndTrap),
129   "Assume that the load-and-trap facility is installed"
132 def FeatureMiscellaneousExtensions : SystemZFeature<
133   "miscellaneous-extensions", "MiscellaneousExtensions", (all_of FeatureMiscellaneousExtensions),
134   "Assume that the miscellaneous-extensions facility is installed"
137 def FeatureProcessorAssist : SystemZFeature<
138   "processor-assist", "ProcessorAssist", (all_of FeatureProcessorAssist),
139   "Assume that the processor-assist facility is installed"
142 def FeatureTransactionalExecution : SystemZFeature<
143   "transactional-execution", "TransactionalExecution", (all_of FeatureTransactionalExecution),
144   "Assume that the transactional-execution facility is installed"
147 def FeatureDFPZonedConversion : SystemZFeature<
148   "dfp-zoned-conversion", "DFPZonedConversion", (all_of FeatureDFPZonedConversion),
149   "Assume that the DFP zoned-conversion facility is installed"
152 def FeatureEnhancedDAT2 : SystemZFeature<
153   "enhanced-dat-2", "EnhancedDAT2", (all_of FeatureEnhancedDAT2),
154   "Assume that the enhanced-DAT facility 2 is installed"
157 def Arch10NewFeatures : SystemZFeatureList<[
158     FeatureExecutionHint,
159     FeatureLoadAndTrap,
160     FeatureMiscellaneousExtensions,
161     FeatureProcessorAssist,
162     FeatureTransactionalExecution,
163     FeatureDFPZonedConversion,
164     FeatureEnhancedDAT2
167 //===----------------------------------------------------------------------===//
169 // New features added in the Eleventh Edition of the z/Architecture
171 //===----------------------------------------------------------------------===//
173 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
174   "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", (all_of FeatureLoadAndZeroRightmostByte),
175   "Assume that the load-and-zero-rightmost-byte facility is installed"
178 def FeatureLoadStoreOnCond2 : SystemZFeature<
179   "load-store-on-cond-2", "LoadStoreOnCond2", (all_of FeatureLoadStoreOnCond2),
180   "Assume that the load/store-on-condition facility 2 is installed"
183 def FeatureMessageSecurityAssist5 : SystemZFeature<
184   "message-security-assist-extension5", "MessageSecurityAssist5", (all_of FeatureMessageSecurityAssist5),
185   "Assume that the message-security-assist extension facility 5 is installed"
188 def FeatureDFPPackedConversion : SystemZFeature<
189   "dfp-packed-conversion", "DFPPackedConversion", (all_of FeatureDFPPackedConversion),
190   "Assume that the DFP packed-conversion facility is installed"
193 def FeatureVector : SystemZFeature<
194   "vector", "Vector", (all_of FeatureVector),
195   "Assume that the vectory facility is installed"
197 def FeatureNoVector : SystemZMissingFeature<"Vector">;
199 def Arch11NewFeatures : SystemZFeatureList<[
200     FeatureLoadAndZeroRightmostByte,
201     FeatureLoadStoreOnCond2,
202     FeatureMessageSecurityAssist5,
203     FeatureDFPPackedConversion,
204     FeatureVector
207 //===----------------------------------------------------------------------===//
209 // New features added in the Twelfth Edition of the z/Architecture
211 //===----------------------------------------------------------------------===//
213 def FeatureMiscellaneousExtensions2 : SystemZFeature<
214   "miscellaneous-extensions-2", "MiscellaneousExtensions2", (all_of FeatureMiscellaneousExtensions2),
215   "Assume that the miscellaneous-extensions facility 2 is installed"
218 def FeatureGuardedStorage : SystemZFeature<
219   "guarded-storage", "GuardedStorage", (all_of FeatureGuardedStorage),
220   "Assume that the guarded-storage facility is installed"
223 def FeatureMessageSecurityAssist7 : SystemZFeature<
224   "message-security-assist-extension7", "MessageSecurityAssist7", (all_of FeatureMessageSecurityAssist7),
225   "Assume that the message-security-assist extension facility 7 is installed"
228 def FeatureMessageSecurityAssist8 : SystemZFeature<
229   "message-security-assist-extension8", "MessageSecurityAssist8", (all_of FeatureMessageSecurityAssist8),
230   "Assume that the message-security-assist extension facility 8 is installed"
233 def FeatureVectorEnhancements1 : SystemZFeature<
234   "vector-enhancements-1", "VectorEnhancements1", (all_of FeatureVectorEnhancements1),
235   "Assume that the vector enhancements facility 1 is installed"
237 def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">;
239 def FeatureVectorPackedDecimal : SystemZFeature<
240   "vector-packed-decimal", "VectorPackedDecimal", (all_of FeatureVectorPackedDecimal),
241   "Assume that the vector packed decimal facility is installed"
244 def FeatureInsertReferenceBitsMultiple : SystemZFeature<
245   "insert-reference-bits-multiple", "InsertReferenceBitsMultiple", (all_of FeatureInsertReferenceBitsMultiple),
246   "Assume that the insert-reference-bits-multiple facility is installed"
249 def FeatureTestPendingExternalInterruption : SystemZFeature<
250   "test-pending-external-interruption", "TestPendingExternalInterruption", (all_of FeatureTestPendingExternalInterruption),
251   "Assume that the test-pending-external-interruption facility is installed"
254 def Arch12NewFeatures : SystemZFeatureList<[
255     FeatureMiscellaneousExtensions2,
256     FeatureGuardedStorage,
257     FeatureMessageSecurityAssist7,
258     FeatureMessageSecurityAssist8,
259     FeatureVectorEnhancements1,
260     FeatureVectorPackedDecimal,
261     FeatureInsertReferenceBitsMultiple,
262     FeatureTestPendingExternalInterruption
265 //===----------------------------------------------------------------------===//
267 // New features added in the Thirteenth Edition of the z/Architecture
269 //===----------------------------------------------------------------------===//
271 def FeatureMiscellaneousExtensions3 : SystemZFeature<
272   "miscellaneous-extensions-3", "MiscellaneousExtensions3", (all_of FeatureMiscellaneousExtensions3),
273   "Assume that the miscellaneous-extensions facility 3 is installed"
276 def FeatureMessageSecurityAssist9 : SystemZFeature<
277   "message-security-assist-extension9", "MessageSecurityAssist9", (all_of FeatureMessageSecurityAssist9),
278   "Assume that the message-security-assist extension facility 9 is installed"
281 def FeatureVectorEnhancements2 : SystemZFeature<
282   "vector-enhancements-2", "VectorEnhancements2", (all_of FeatureVectorEnhancements2),
283   "Assume that the vector enhancements facility 2 is installed"
286 def FeatureVectorPackedDecimalEnhancement : SystemZFeature<
287   "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement", (all_of FeatureVectorPackedDecimalEnhancement),
288   "Assume that the vector packed decimal enhancement facility is installed"
291 def FeatureEnhancedSort : SystemZFeature<
292   "enhanced-sort", "EnhancedSort", (all_of FeatureEnhancedSort),
293   "Assume that the enhanced-sort facility is installed"
296 def FeatureDeflateConversion : SystemZFeature<
297   "deflate-conversion", "DeflateConversion", (all_of FeatureDeflateConversion),
298   "Assume that the deflate-conversion facility is installed"
301 def Arch13NewFeatures : SystemZFeatureList<[
302     FeatureMiscellaneousExtensions3,
303     FeatureMessageSecurityAssist9,
304     FeatureVectorEnhancements2,
305     FeatureVectorPackedDecimalEnhancement,
306     FeatureEnhancedSort,
307     FeatureDeflateConversion
310 //===----------------------------------------------------------------------===//
312 // New features added in the Fourteenth Edition of the z/Architecture
314 //===----------------------------------------------------------------------===//
316 def FeatureVectorPackedDecimalEnhancement2 : SystemZFeature<
317   "vector-packed-decimal-enhancement-2", "VectorPackedDecimalEnhancement2", (all_of FeatureVectorPackedDecimalEnhancement2),
318   "Assume that the vector packed decimal enhancement facility 2 is installed"
321 def FeatureNNPAssist : SystemZFeature<
322   "nnp-assist", "NNPAssist", (all_of FeatureNNPAssist),
323   "Assume that the NNP-assist facility is installed"
326 def FeatureBEAREnhancement : SystemZFeature<
327   "bear-enhancement", "BEAREnhancement", (all_of FeatureBEAREnhancement),
328   "Assume that the BEAR-enhancement facility is installed"
331 def FeatureResetDATProtection : SystemZFeature<
332   "reset-dat-protection", "ResetDATProtection", (all_of FeatureResetDATProtection),
333   "Assume that the reset-DAT-protection facility is installed"
336 def FeatureProcessorActivityInstrumentation : SystemZFeature<
337   "processor-activity-instrumentation", "ProcessorActivityInstrumentation", (all_of FeatureProcessorActivityInstrumentation),
338   "Assume that the processor-activity-instrumentation facility is installed"
341 def Arch14NewFeatures : SystemZFeatureList<[
342     FeatureVectorPackedDecimalEnhancement2,
343     FeatureNNPAssist,
344     FeatureBEAREnhancement,
345     FeatureResetDATProtection,
346     FeatureProcessorActivityInstrumentation
349 //===----------------------------------------------------------------------===//
351 // New features added in the Fifteenth Edition of the z/Architecture
353 //===----------------------------------------------------------------------===//
355 def FeatureMiscellaneousExtensions4 : SystemZFeature<
356   "miscellaneous-extensions-4", "MiscellaneousExtensions4", (all_of FeatureMiscellaneousExtensions4),
357   "Assume that the miscellaneous-extensions facility 4 is installed"
360 def FeatureVectorEnhancements3 : SystemZFeature<
361   "vector-enhancements-3", "VectorEnhancements3", (all_of FeatureVectorEnhancements3),
362   "Assume that the vector enhancements facility 3 is installed"
365 def FeatureVectorPackedDecimalEnhancement3 : SystemZFeature<
366   "vector-packed-decimal-enhancement-3", "VectorPackedDecimalEnhancement3", (all_of FeatureVectorPackedDecimalEnhancement3),
367   "Assume that the vector packed decimal enhancement facility 3 is installed"
370 def FeatureMessageSecurityAssist12 : SystemZFeature<
371   "message-security-assist-extension12", "MessageSecurityAssist12", (all_of FeatureMessageSecurityAssist12),
372   "Assume that the message-security-assist extension facility 12 is installed"
375 def FeatureConcurrentFunctions : SystemZFeature<
376   "concurrent-functions", "ConcurrentFunctions", (all_of FeatureConcurrentFunctions),
377   "Assume that the concurrent-functions facility is installed"
380 def Arch15NewFeatures : SystemZFeatureList<[
381     FeatureMiscellaneousExtensions4,
382     FeatureVectorEnhancements3,
383     FeatureVectorPackedDecimalEnhancement3,
384     FeatureMessageSecurityAssist12,
385     FeatureConcurrentFunctions
388 //===----------------------------------------------------------------------===//
390 // Cumulative supported and unsupported feature sets
392 //===----------------------------------------------------------------------===//
394 def Arch8SupportedFeatures
395   : SystemZFeatureList<[]>;
396 def Arch9SupportedFeatures
397   : SystemZFeatureAdd<Arch8SupportedFeatures.List,  Arch9NewFeatures.List>;
398 def Arch10SupportedFeatures
399   : SystemZFeatureAdd<Arch9SupportedFeatures.List,  Arch10NewFeatures.List>;
400 def Arch11SupportedFeatures
401   : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
402 def Arch12SupportedFeatures
403   : SystemZFeatureAdd<Arch11SupportedFeatures.List, Arch12NewFeatures.List>;
404 def Arch13SupportedFeatures
405   : SystemZFeatureAdd<Arch12SupportedFeatures.List, Arch13NewFeatures.List>;
406 def Arch14SupportedFeatures
407   : SystemZFeatureAdd<Arch13SupportedFeatures.List, Arch14NewFeatures.List>;
408 def Arch15SupportedFeatures
409   : SystemZFeatureAdd<Arch14SupportedFeatures.List, Arch15NewFeatures.List>;
411 def Arch15UnsupportedFeatures
412   : SystemZFeatureList<[]>;
413 def Arch14UnsupportedFeatures
414   : SystemZFeatureAdd<Arch15UnsupportedFeatures.List, Arch15NewFeatures.List>;
415 def Arch13UnsupportedFeatures
416   : SystemZFeatureAdd<Arch14UnsupportedFeatures.List, Arch14NewFeatures.List>;
417 def Arch12UnsupportedFeatures
418   : SystemZFeatureAdd<Arch13UnsupportedFeatures.List, Arch13NewFeatures.List>;
419 def Arch11UnsupportedFeatures
420   : SystemZFeatureAdd<Arch12UnsupportedFeatures.List, Arch12NewFeatures.List>;
421 def Arch10UnsupportedFeatures
422   : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
423 def Arch9UnsupportedFeatures
424   : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
425 def Arch8UnsupportedFeatures
426   : SystemZFeatureAdd<Arch9UnsupportedFeatures.List,  Arch9NewFeatures.List>;