]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZFeatures.td
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / lib / Target / SystemZ / SystemZFeatures.td
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.
10 //
11 //===----------------------------------------------------------------------===//
12
13 class SystemZFeature<string extname, string intname, string desc>
14   : Predicate<"Subtarget->has"##intname##"()">,
15     AssemblerPredicate<"Feature"##intname, extname>,
16     SubtargetFeature<extname, "Has"##intname, "true", desc>;
17
18 class SystemZMissingFeature<string intname>
19   : Predicate<"!Subtarget->has"##intname##"()">;
20
21 class SystemZFeatureList<list<SystemZFeature> x> {
22   list<SystemZFeature> List = x;
23 }
24
25 class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y>
26   : SystemZFeatureList<!listconcat(x, y)>;
27
28 //===----------------------------------------------------------------------===//
29 //
30 // New features added in the Ninth Edition of the z/Architecture
31 //
32 //===----------------------------------------------------------------------===//
33
34 def FeatureDistinctOps : SystemZFeature<
35   "distinct-ops", "DistinctOps",
36   "Assume that the distinct-operands facility is installed"
37 >;
38
39 def FeatureFastSerialization : SystemZFeature<
40   "fast-serialization", "FastSerialization",
41   "Assume that the fast-serialization facility is installed"
42 >;
43
44 def FeatureFPExtension : SystemZFeature<
45   "fp-extension", "FPExtension",
46   "Assume that the floating-point extension facility is installed"
47 >;
48
49 def FeatureHighWord : SystemZFeature<
50   "high-word", "HighWord",
51   "Assume that the high-word facility is installed"
52 >;
53
54 def FeatureInterlockedAccess1 : SystemZFeature<
55   "interlocked-access1", "InterlockedAccess1",
56   "Assume that interlocked-access facility 1 is installed"
57 >;
58 def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;
59
60 def FeatureLoadStoreOnCond : SystemZFeature<
61   "load-store-on-cond", "LoadStoreOnCond",
62   "Assume that the load/store-on-condition facility is installed"
63 >;
64 def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">;
65
66 def FeaturePopulationCount : SystemZFeature<
67   "population-count", "PopulationCount",
68   "Assume that the population-count facility is installed"
69 >;
70
71 def FeatureMessageSecurityAssist3 : SystemZFeature<
72   "message-security-assist-extension3", "MessageSecurityAssist3",
73   "Assume that the message-security-assist extension facility 3 is installed"
74 >;
75
76 def FeatureMessageSecurityAssist4 : SystemZFeature<
77   "message-security-assist-extension4", "MessageSecurityAssist4",
78   "Assume that the message-security-assist extension facility 4 is installed"
79 >;
80
81 def FeatureResetReferenceBitsMultiple : SystemZFeature<
82   "reset-reference-bits-multiple", "ResetReferenceBitsMultiple",
83   "Assume that the reset-reference-bits-multiple facility is installed"
84 >;
85
86 def Arch9NewFeatures : SystemZFeatureList<[
87     FeatureDistinctOps,
88     FeatureFastSerialization,
89     FeatureFPExtension,
90     FeatureHighWord,
91     FeatureInterlockedAccess1,
92     FeatureLoadStoreOnCond,
93     FeaturePopulationCount,
94     FeatureMessageSecurityAssist3,
95     FeatureMessageSecurityAssist4,
96     FeatureResetReferenceBitsMultiple
97 ]>;
98
99 //===----------------------------------------------------------------------===//
100 //
101 // New features added in the Tenth Edition of the z/Architecture
102 //
103 //===----------------------------------------------------------------------===//
104
105 def FeatureExecutionHint : SystemZFeature<
106   "execution-hint", "ExecutionHint",
107   "Assume that the execution-hint facility is installed"
108 >;
109
110 def FeatureLoadAndTrap : SystemZFeature<
111   "load-and-trap", "LoadAndTrap",
112   "Assume that the load-and-trap facility is installed"
113 >;
114
115 def FeatureMiscellaneousExtensions : SystemZFeature<
116   "miscellaneous-extensions", "MiscellaneousExtensions",
117   "Assume that the miscellaneous-extensions facility is installed"
118 >;
119
120 def FeatureProcessorAssist : SystemZFeature<
121   "processor-assist", "ProcessorAssist",
122   "Assume that the processor-assist facility is installed"
123 >;
124
125 def FeatureTransactionalExecution : SystemZFeature<
126   "transactional-execution", "TransactionalExecution",
127   "Assume that the transactional-execution facility is installed"
128 >;
129
130 def FeatureDFPZonedConversion : SystemZFeature<
131   "dfp-zoned-conversion", "DFPZonedConversion",
132   "Assume that the DFP zoned-conversion facility is installed"
133 >;
134
135 def FeatureEnhancedDAT2 : SystemZFeature<
136   "enhanced-dat-2", "EnhancedDAT2",
137   "Assume that the enhanced-DAT facility 2 is installed"
138 >;
139
140 def Arch10NewFeatures : SystemZFeatureList<[
141     FeatureExecutionHint,
142     FeatureLoadAndTrap,
143     FeatureMiscellaneousExtensions,
144     FeatureProcessorAssist,
145     FeatureTransactionalExecution,
146     FeatureDFPZonedConversion,
147     FeatureEnhancedDAT2
148 ]>;
149
150 //===----------------------------------------------------------------------===//
151 //
152 // New features added in the Eleventh Edition of the z/Architecture
153 //
154 //===----------------------------------------------------------------------===//
155
156 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
157   "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte",
158   "Assume that the load-and-zero-rightmost-byte facility is installed"
159 >;
160
161 def FeatureLoadStoreOnCond2 : SystemZFeature<
162   "load-store-on-cond-2", "LoadStoreOnCond2",
163   "Assume that the load/store-on-condition facility 2 is installed"
164 >;
165
166 def FeatureMessageSecurityAssist5 : SystemZFeature<
167   "message-security-assist-extension5", "MessageSecurityAssist5",
168   "Assume that the message-security-assist extension facility 5 is installed"
169 >;
170
171 def FeatureDFPPackedConversion : SystemZFeature<
172   "dfp-packed-conversion", "DFPPackedConversion",
173   "Assume that the DFP packed-conversion facility is installed"
174 >;
175
176 def FeatureVector : SystemZFeature<
177   "vector", "Vector",
178   "Assume that the vectory facility is installed"
179 >;
180 def FeatureNoVector : SystemZMissingFeature<"Vector">;
181
182 def Arch11NewFeatures : SystemZFeatureList<[
183     FeatureLoadAndZeroRightmostByte,
184     FeatureLoadStoreOnCond2,
185     FeatureMessageSecurityAssist5,
186     FeatureDFPPackedConversion,
187     FeatureVector
188 ]>;
189
190 //===----------------------------------------------------------------------===//
191 //
192 // New features added in the Twelvth Edition of the z/Architecture
193 //
194 //===----------------------------------------------------------------------===//
195
196 def FeatureMiscellaneousExtensions2 : SystemZFeature<
197   "miscellaneous-extensions-2", "MiscellaneousExtensions2",
198   "Assume that the miscellaneous-extensions facility 2 is installed"
199 >;
200
201 def FeatureGuardedStorage : SystemZFeature<
202   "guarded-storage", "GuardedStorage",
203   "Assume that the guarded-storage facility is installed"
204 >;
205
206 def FeatureMessageSecurityAssist7 : SystemZFeature<
207   "message-security-assist-extension7", "MessageSecurityAssist7",
208   "Assume that the message-security-assist extension facility 7 is installed"
209 >;
210
211 def FeatureMessageSecurityAssist8 : SystemZFeature<
212   "message-security-assist-extension8", "MessageSecurityAssist8",
213   "Assume that the message-security-assist extension facility 8 is installed"
214 >;
215
216 def FeatureVectorEnhancements1 : SystemZFeature<
217   "vector-enhancements-1", "VectorEnhancements1",
218   "Assume that the vector enhancements facility 1 is installed"
219 >;
220 def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">;
221
222 def FeatureVectorPackedDecimal : SystemZFeature<
223   "vector-packed-decimal", "VectorPackedDecimal",
224   "Assume that the vector packed decimal facility is installed"
225 >;
226
227 def FeatureInsertReferenceBitsMultiple : SystemZFeature<
228   "insert-reference-bits-multiple", "InsertReferenceBitsMultiple",
229   "Assume that the insert-reference-bits-multiple facility is installed"
230 >;
231
232 def Arch12NewFeatures : SystemZFeatureList<[
233     FeatureMiscellaneousExtensions2,
234     FeatureGuardedStorage,
235     FeatureMessageSecurityAssist7,
236     FeatureMessageSecurityAssist8,
237     FeatureVectorEnhancements1,
238     FeatureVectorPackedDecimal,
239     FeatureInsertReferenceBitsMultiple
240 ]>;
241
242 //===----------------------------------------------------------------------===//
243 //
244 // New features added in the Thirteenth Edition of the z/Architecture
245 //
246 //===----------------------------------------------------------------------===//
247
248 def FeatureMiscellaneousExtensions3 : SystemZFeature<
249   "miscellaneous-extensions-3", "MiscellaneousExtensions3",
250   "Assume that the miscellaneous-extensions facility 3 is installed"
251 >;
252
253 def FeatureMessageSecurityAssist9 : SystemZFeature<
254   "message-security-assist-extension9", "MessageSecurityAssist9",
255   "Assume that the message-security-assist extension facility 9 is installed"
256 >;
257
258 def FeatureVectorEnhancements2 : SystemZFeature<
259   "vector-enhancements-2", "VectorEnhancements2",
260   "Assume that the vector enhancements facility 2 is installed"
261 >;
262
263 def FeatureVectorPackedDecimalEnhancement : SystemZFeature<
264   "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement",
265   "Assume that the vector packed decimal enhancement facility is installed"
266 >;
267
268 def FeatureEnhancedSort : SystemZFeature<
269   "enhanced-sort", "EnhancedSort",
270   "Assume that the enhanced-sort facility is installed"
271 >;
272
273 def FeatureDeflateConversion : SystemZFeature<
274   "deflate-conversion", "DeflateConversion",
275   "Assume that the deflate-conversion facility is installed"
276 >;
277
278 def Arch13NewFeatures : SystemZFeatureList<[
279     FeatureMiscellaneousExtensions3,
280     FeatureMessageSecurityAssist9,
281     FeatureVectorEnhancements2,
282     FeatureVectorPackedDecimalEnhancement,
283     FeatureEnhancedSort,
284     FeatureDeflateConversion
285 ]>;
286
287 //===----------------------------------------------------------------------===//
288 //
289 // Cumulative supported and unsupported feature sets
290 //
291 //===----------------------------------------------------------------------===//
292
293 def Arch8SupportedFeatures
294   : SystemZFeatureList<[]>;
295 def Arch9SupportedFeatures
296   : SystemZFeatureAdd<Arch8SupportedFeatures.List,  Arch9NewFeatures.List>;
297 def Arch10SupportedFeatures
298   : SystemZFeatureAdd<Arch9SupportedFeatures.List,  Arch10NewFeatures.List>;
299 def Arch11SupportedFeatures
300   : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
301 def Arch12SupportedFeatures
302   : SystemZFeatureAdd<Arch11SupportedFeatures.List, Arch12NewFeatures.List>;
303 def Arch13SupportedFeatures
304   : SystemZFeatureAdd<Arch12SupportedFeatures.List, Arch13NewFeatures.List>;
305
306 def Arch13UnsupportedFeatures
307   : SystemZFeatureList<[]>;
308 def Arch12UnsupportedFeatures
309   : SystemZFeatureAdd<Arch13UnsupportedFeatures.List, Arch13NewFeatures.List>;
310 def Arch11UnsupportedFeatures
311   : SystemZFeatureAdd<Arch12UnsupportedFeatures.List, Arch12NewFeatures.List>;
312 def Arch10UnsupportedFeatures
313   : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
314 def Arch9UnsupportedFeatures
315   : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
316 def Arch8UnsupportedFeatures
317   : SystemZFeatureAdd<Arch9UnsupportedFeatures.List,  Arch9NewFeatures.List>;
318