1 //===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===//
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 //===----------------------------------------------------------------------===//
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 //===----------------------------------------------------------------------===//
37 // New features added in the Ninth Edition of the z/Architecture
39 //===----------------------------------------------------------------------===//
41 def FeatureDistinctOps : SystemZFeature<
42 "distinct-ops", "DistinctOps", (all_of FeatureDistinctOps),
43 "Assume that the distinct-operands facility is installed"
46 def FeatureFastSerialization : SystemZFeature<
47 "fast-serialization", "FastSerialization", (all_of FeatureFastSerialization),
48 "Assume that the fast-serialization facility is installed"
51 def FeatureFPExtension : SystemZFeature<
52 "fp-extension", "FPExtension", (all_of FeatureFPExtension),
53 "Assume that the floating-point extension facility is installed"
56 def FeatureHighWord : SystemZFeature<
57 "high-word", "HighWord", (all_of FeatureHighWord),
58 "Assume that the high-word facility is installed"
61 def FeatureInterlockedAccess1 : SystemZFeature<
62 "interlocked-access1", "InterlockedAccess1", (all_of FeatureInterlockedAccess1),
63 "Assume that interlocked-access facility 1 is installed"
65 def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;
67 def FeatureLoadStoreOnCond : SystemZFeature<
68 "load-store-on-cond", "LoadStoreOnCond", (all_of FeatureLoadStoreOnCond),
69 "Assume that the load/store-on-condition facility is installed"
71 def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">;
73 def FeaturePopulationCount : SystemZFeature<
74 "population-count", "PopulationCount", (all_of FeaturePopulationCount),
75 "Assume that the population-count facility is installed"
78 def FeatureMessageSecurityAssist3 : SystemZFeature<
79 "message-security-assist-extension3", "MessageSecurityAssist3", (all_of FeatureMessageSecurityAssist3),
80 "Assume that the message-security-assist extension facility 3 is installed"
83 def FeatureMessageSecurityAssist4 : SystemZFeature<
84 "message-security-assist-extension4", "MessageSecurityAssist4", (all_of FeatureMessageSecurityAssist4),
85 "Assume that the message-security-assist extension facility 4 is installed"
88 def FeatureResetReferenceBitsMultiple : SystemZFeature<
89 "reset-reference-bits-multiple", "ResetReferenceBitsMultiple", (all_of FeatureResetReferenceBitsMultiple),
90 "Assume that the reset-reference-bits-multiple facility is installed"
93 def Arch9NewFeatures : SystemZFeatureList<[
95 FeatureFastSerialization,
98 FeatureInterlockedAccess1,
99 FeatureLoadStoreOnCond,
100 FeaturePopulationCount,
101 FeatureMessageSecurityAssist3,
102 FeatureMessageSecurityAssist4,
103 FeatureResetReferenceBitsMultiple
106 //===----------------------------------------------------------------------===//
108 // New features added in the Tenth Edition of the z/Architecture
110 //===----------------------------------------------------------------------===//
112 def FeatureExecutionHint : SystemZFeature<
113 "execution-hint", "ExecutionHint", (all_of FeatureExecutionHint),
114 "Assume that the execution-hint facility is installed"
117 def FeatureLoadAndTrap : SystemZFeature<
118 "load-and-trap", "LoadAndTrap", (all_of FeatureLoadAndTrap),
119 "Assume that the load-and-trap facility is installed"
122 def FeatureMiscellaneousExtensions : SystemZFeature<
123 "miscellaneous-extensions", "MiscellaneousExtensions", (all_of FeatureMiscellaneousExtensions),
124 "Assume that the miscellaneous-extensions facility is installed"
127 def FeatureProcessorAssist : SystemZFeature<
128 "processor-assist", "ProcessorAssist", (all_of FeatureProcessorAssist),
129 "Assume that the processor-assist facility is installed"
132 def FeatureTransactionalExecution : SystemZFeature<
133 "transactional-execution", "TransactionalExecution", (all_of FeatureTransactionalExecution),
134 "Assume that the transactional-execution facility is installed"
137 def FeatureDFPZonedConversion : SystemZFeature<
138 "dfp-zoned-conversion", "DFPZonedConversion", (all_of FeatureDFPZonedConversion),
139 "Assume that the DFP zoned-conversion facility is installed"
142 def FeatureEnhancedDAT2 : SystemZFeature<
143 "enhanced-dat-2", "EnhancedDAT2", (all_of FeatureEnhancedDAT2),
144 "Assume that the enhanced-DAT facility 2 is installed"
147 def Arch10NewFeatures : SystemZFeatureList<[
148 FeatureExecutionHint,
150 FeatureMiscellaneousExtensions,
151 FeatureProcessorAssist,
152 FeatureTransactionalExecution,
153 FeatureDFPZonedConversion,
157 //===----------------------------------------------------------------------===//
159 // New features added in the Eleventh Edition of the z/Architecture
161 //===----------------------------------------------------------------------===//
163 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
164 "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", (all_of FeatureLoadAndZeroRightmostByte),
165 "Assume that the load-and-zero-rightmost-byte facility is installed"
168 def FeatureLoadStoreOnCond2 : SystemZFeature<
169 "load-store-on-cond-2", "LoadStoreOnCond2", (all_of FeatureLoadStoreOnCond2),
170 "Assume that the load/store-on-condition facility 2 is installed"
173 def FeatureMessageSecurityAssist5 : SystemZFeature<
174 "message-security-assist-extension5", "MessageSecurityAssist5", (all_of FeatureMessageSecurityAssist5),
175 "Assume that the message-security-assist extension facility 5 is installed"
178 def FeatureDFPPackedConversion : SystemZFeature<
179 "dfp-packed-conversion", "DFPPackedConversion", (all_of FeatureDFPPackedConversion),
180 "Assume that the DFP packed-conversion facility is installed"
183 def FeatureVector : SystemZFeature<
184 "vector", "Vector", (all_of FeatureVector),
185 "Assume that the vectory facility is installed"
187 def FeatureNoVector : SystemZMissingFeature<"Vector">;
189 def Arch11NewFeatures : SystemZFeatureList<[
190 FeatureLoadAndZeroRightmostByte,
191 FeatureLoadStoreOnCond2,
192 FeatureMessageSecurityAssist5,
193 FeatureDFPPackedConversion,
197 //===----------------------------------------------------------------------===//
199 // New features added in the Twelfth Edition of the z/Architecture
201 //===----------------------------------------------------------------------===//
203 def FeatureMiscellaneousExtensions2 : SystemZFeature<
204 "miscellaneous-extensions-2", "MiscellaneousExtensions2", (all_of FeatureMiscellaneousExtensions2),
205 "Assume that the miscellaneous-extensions facility 2 is installed"
208 def FeatureGuardedStorage : SystemZFeature<
209 "guarded-storage", "GuardedStorage", (all_of FeatureGuardedStorage),
210 "Assume that the guarded-storage facility is installed"
213 def FeatureMessageSecurityAssist7 : SystemZFeature<
214 "message-security-assist-extension7", "MessageSecurityAssist7", (all_of FeatureMessageSecurityAssist7),
215 "Assume that the message-security-assist extension facility 7 is installed"
218 def FeatureMessageSecurityAssist8 : SystemZFeature<
219 "message-security-assist-extension8", "MessageSecurityAssist8", (all_of FeatureMessageSecurityAssist8),
220 "Assume that the message-security-assist extension facility 8 is installed"
223 def FeatureVectorEnhancements1 : SystemZFeature<
224 "vector-enhancements-1", "VectorEnhancements1", (all_of FeatureVectorEnhancements1),
225 "Assume that the vector enhancements facility 1 is installed"
227 def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">;
229 def FeatureVectorPackedDecimal : SystemZFeature<
230 "vector-packed-decimal", "VectorPackedDecimal", (all_of FeatureVectorPackedDecimal),
231 "Assume that the vector packed decimal facility is installed"
234 def FeatureInsertReferenceBitsMultiple : SystemZFeature<
235 "insert-reference-bits-multiple", "InsertReferenceBitsMultiple", (all_of FeatureInsertReferenceBitsMultiple),
236 "Assume that the insert-reference-bits-multiple facility is installed"
239 def Arch12NewFeatures : SystemZFeatureList<[
240 FeatureMiscellaneousExtensions2,
241 FeatureGuardedStorage,
242 FeatureMessageSecurityAssist7,
243 FeatureMessageSecurityAssist8,
244 FeatureVectorEnhancements1,
245 FeatureVectorPackedDecimal,
246 FeatureInsertReferenceBitsMultiple
249 //===----------------------------------------------------------------------===//
251 // New features added in the Thirteenth Edition of the z/Architecture
253 //===----------------------------------------------------------------------===//
255 def FeatureMiscellaneousExtensions3 : SystemZFeature<
256 "miscellaneous-extensions-3", "MiscellaneousExtensions3", (all_of FeatureMiscellaneousExtensions3),
257 "Assume that the miscellaneous-extensions facility 3 is installed"
260 def FeatureMessageSecurityAssist9 : SystemZFeature<
261 "message-security-assist-extension9", "MessageSecurityAssist9", (all_of FeatureMessageSecurityAssist9),
262 "Assume that the message-security-assist extension facility 9 is installed"
265 def FeatureVectorEnhancements2 : SystemZFeature<
266 "vector-enhancements-2", "VectorEnhancements2", (all_of FeatureVectorEnhancements2),
267 "Assume that the vector enhancements facility 2 is installed"
270 def FeatureVectorPackedDecimalEnhancement : SystemZFeature<
271 "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement", (all_of FeatureVectorPackedDecimalEnhancement),
272 "Assume that the vector packed decimal enhancement facility is installed"
275 def FeatureEnhancedSort : SystemZFeature<
276 "enhanced-sort", "EnhancedSort", (all_of FeatureEnhancedSort),
277 "Assume that the enhanced-sort facility is installed"
280 def FeatureDeflateConversion : SystemZFeature<
281 "deflate-conversion", "DeflateConversion", (all_of FeatureDeflateConversion),
282 "Assume that the deflate-conversion facility is installed"
285 def Arch13NewFeatures : SystemZFeatureList<[
286 FeatureMiscellaneousExtensions3,
287 FeatureMessageSecurityAssist9,
288 FeatureVectorEnhancements2,
289 FeatureVectorPackedDecimalEnhancement,
291 FeatureDeflateConversion
294 //===----------------------------------------------------------------------===//
296 // New features added in the Fourteenth Edition of the z/Architecture
298 //===----------------------------------------------------------------------===//
300 def FeatureVectorPackedDecimalEnhancement2 : SystemZFeature<
301 "vector-packed-decimal-enhancement-2", "VectorPackedDecimalEnhancement2", (all_of FeatureVectorPackedDecimalEnhancement2),
302 "Assume that the vector packed decimal enhancement facility 2 is installed"
305 def FeatureNNPAssist : SystemZFeature<
306 "nnp-assist", "NNPAssist", (all_of FeatureNNPAssist),
307 "Assume that the NNP-assist facility is installed"
310 def FeatureBEAREnhancement : SystemZFeature<
311 "bear-enhancement", "BEAREnhancement", (all_of FeatureBEAREnhancement),
312 "Assume that the BEAR-enhancement facility is installed"
315 def FeatureResetDATProtection : SystemZFeature<
316 "reset-dat-protection", "ResetDATProtection", (all_of FeatureResetDATProtection),
317 "Assume that the reset-DAT-protection facility is installed"
320 def FeatureProcessorActivityInstrumentation : SystemZFeature<
321 "processor-activity-instrumentation", "ProcessorActivityInstrumentation", (all_of FeatureProcessorActivityInstrumentation),
322 "Assume that the processor-activity-instrumentation facility is installed"
325 def Arch14NewFeatures : SystemZFeatureList<[
326 FeatureVectorPackedDecimalEnhancement2,
328 FeatureBEAREnhancement,
329 FeatureResetDATProtection,
330 FeatureProcessorActivityInstrumentation
333 //===----------------------------------------------------------------------===//
335 // Cumulative supported and unsupported feature sets
337 //===----------------------------------------------------------------------===//
339 def Arch8SupportedFeatures
340 : SystemZFeatureList<[]>;
341 def Arch9SupportedFeatures
342 : SystemZFeatureAdd<Arch8SupportedFeatures.List, Arch9NewFeatures.List>;
343 def Arch10SupportedFeatures
344 : SystemZFeatureAdd<Arch9SupportedFeatures.List, Arch10NewFeatures.List>;
345 def Arch11SupportedFeatures
346 : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
347 def Arch12SupportedFeatures
348 : SystemZFeatureAdd<Arch11SupportedFeatures.List, Arch12NewFeatures.List>;
349 def Arch13SupportedFeatures
350 : SystemZFeatureAdd<Arch12SupportedFeatures.List, Arch13NewFeatures.List>;
351 def Arch14SupportedFeatures
352 : SystemZFeatureAdd<Arch13SupportedFeatures.List, Arch14NewFeatures.List>;
354 def Arch14UnsupportedFeatures
355 : SystemZFeatureList<[]>;
356 def Arch13UnsupportedFeatures
357 : SystemZFeatureAdd<Arch14UnsupportedFeatures.List, Arch14NewFeatures.List>;
358 def Arch12UnsupportedFeatures
359 : SystemZFeatureAdd<Arch13UnsupportedFeatures.List, Arch13NewFeatures.List>;
360 def Arch11UnsupportedFeatures
361 : SystemZFeatureAdd<Arch12UnsupportedFeatures.List, Arch12NewFeatures.List>;
362 def Arch10UnsupportedFeatures
363 : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
364 def Arch9UnsupportedFeatures
365 : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
366 def Arch8UnsupportedFeatures
367 : SystemZFeatureAdd<Arch9UnsupportedFeatures.List, Arch9NewFeatures.List>;