aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZFeatures.td
blob: dae795e845b0e3ffe5346b0970772ce42e7c2384 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
//===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Feature definitions.
//
//===----------------------------------------------------------------------===//

class SystemZFeature<string extname, string intname, string desc>
  : Predicate<"Subtarget->has"##intname##"()">,
    AssemblerPredicate<"Feature"##intname, extname>,
    SubtargetFeature<extname, "Has"##intname, "true", desc>;

class SystemZMissingFeature<string intname>
  : Predicate<"!Subtarget->has"##intname##"()">;

class SystemZFeatureList<list<SystemZFeature> x> {
  list<SystemZFeature> List = x;
}

class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y>
  : SystemZFeatureList<!listconcat(x, y)>;

//===----------------------------------------------------------------------===//
//
// New features added in the Ninth Edition of the z/Architecture
//
//===----------------------------------------------------------------------===//

def FeatureDistinctOps : SystemZFeature<
  "distinct-ops", "DistinctOps",
  "Assume that the distinct-operands facility is installed"
>;

def FeatureFastSerialization : SystemZFeature<
  "fast-serialization", "FastSerialization",
  "Assume that the fast-serialization facility is installed"
>;

def FeatureFPExtension : SystemZFeature<
  "fp-extension", "FPExtension",
  "Assume that the floating-point extension facility is installed"
>;

def FeatureHighWord : SystemZFeature<
  "high-word", "HighWord",
  "Assume that the high-word facility is installed"
>;

def FeatureInterlockedAccess1 : SystemZFeature<
  "interlocked-access1", "InterlockedAccess1",
  "Assume that interlocked-access facility 1 is installed"
>;
def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;

def FeatureLoadStoreOnCond : SystemZFeature<
  "load-store-on-cond", "LoadStoreOnCond",
  "Assume that the load/store-on-condition facility is installed"
>;
def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">;

def FeaturePopulationCount : SystemZFeature<
  "population-count", "PopulationCount",
  "Assume that the population-count facility is installed"
>;

def FeatureMessageSecurityAssist3 : SystemZFeature<
  "message-security-assist-extension3", "MessageSecurityAssist3",
  "Assume that the message-security-assist extension facility 3 is installed"
>;

def FeatureMessageSecurityAssist4 : SystemZFeature<
  "message-security-assist-extension4", "MessageSecurityAssist4",
  "Assume that the message-security-assist extension facility 4 is installed"
>;

def FeatureResetReferenceBitsMultiple : SystemZFeature<
  "reset-reference-bits-multiple", "ResetReferenceBitsMultiple",
  "Assume that the reset-reference-bits-multiple facility is installed"
>;

def Arch9NewFeatures : SystemZFeatureList<[
    FeatureDistinctOps,
    FeatureFastSerialization,
    FeatureFPExtension,
    FeatureHighWord,
    FeatureInterlockedAccess1,
    FeatureLoadStoreOnCond,
    FeaturePopulationCount,
    FeatureMessageSecurityAssist3,
    FeatureMessageSecurityAssist4,
    FeatureResetReferenceBitsMultiple
]>;

//===----------------------------------------------------------------------===//
//
// New features added in the Tenth Edition of the z/Architecture
//
//===----------------------------------------------------------------------===//

def FeatureExecutionHint : SystemZFeature<
  "execution-hint", "ExecutionHint",
  "Assume that the execution-hint facility is installed"
>;

def FeatureLoadAndTrap : SystemZFeature<
  "load-and-trap", "LoadAndTrap",
  "Assume that the load-and-trap facility is installed"
>;

def FeatureMiscellaneousExtensions : SystemZFeature<
  "miscellaneous-extensions", "MiscellaneousExtensions",
  "Assume that the miscellaneous-extensions facility is installed"
>;

def FeatureProcessorAssist : SystemZFeature<
  "processor-assist", "ProcessorAssist",
  "Assume that the processor-assist facility is installed"
>;

def FeatureTransactionalExecution : SystemZFeature<
  "transactional-execution", "TransactionalExecution",
  "Assume that the transactional-execution facility is installed"
>;

def FeatureDFPZonedConversion : SystemZFeature<
  "dfp-zoned-conversion", "DFPZonedConversion",
  "Assume that the DFP zoned-conversion facility is installed"
>;

def FeatureEnhancedDAT2 : SystemZFeature<
  "enhanced-dat-2", "EnhancedDAT2",
  "Assume that the enhanced-DAT facility 2 is installed"
>;

def Arch10NewFeatures : SystemZFeatureList<[
    FeatureExecutionHint,
    FeatureLoadAndTrap,
    FeatureMiscellaneousExtensions,
    FeatureProcessorAssist,
    FeatureTransactionalExecution,
    FeatureDFPZonedConversion,
    FeatureEnhancedDAT2
]>;

//===----------------------------------------------------------------------===//
//
// New features added in the Eleventh Edition of the z/Architecture
//
//===----------------------------------------------------------------------===//

def FeatureLoadAndZeroRightmostByte : SystemZFeature<
  "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte",
  "Assume that the load-and-zero-rightmost-byte facility is installed"
>;

def FeatureLoadStoreOnCond2 : SystemZFeature<
  "load-store-on-cond-2", "LoadStoreOnCond2",
  "Assume that the load/store-on-condition facility 2 is installed"
>;

def FeatureMessageSecurityAssist5 : SystemZFeature<
  "message-security-assist-extension5", "MessageSecurityAssist5",
  "Assume that the message-security-assist extension facility 5 is installed"
>;

def FeatureDFPPackedConversion : SystemZFeature<
  "dfp-packed-conversion", "DFPPackedConversion",
  "Assume that the DFP packed-conversion facility is installed"
>;

def FeatureVector : SystemZFeature<
  "vector", "Vector",
  "Assume that the vectory facility is installed"
>;
def FeatureNoVector : SystemZMissingFeature<"Vector">;

def Arch11NewFeatures : SystemZFeatureList<[
    FeatureLoadAndZeroRightmostByte,
    FeatureLoadStoreOnCond2,
    FeatureMessageSecurityAssist5,
    FeatureDFPPackedConversion,
    FeatureVector
]>;

//===----------------------------------------------------------------------===//
//
// New features added in the Twelvth Edition of the z/Architecture
//
//===----------------------------------------------------------------------===//

def FeatureMiscellaneousExtensions2 : SystemZFeature<
  "miscellaneous-extensions-2", "MiscellaneousExtensions2",
  "Assume that the miscellaneous-extensions facility 2 is installed"
>;

def FeatureGuardedStorage : SystemZFeature<
  "guarded-storage", "GuardedStorage",
  "Assume that the guarded-storage facility is installed"
>;

def FeatureMessageSecurityAssist7 : SystemZFeature<
  "message-security-assist-extension7", "MessageSecurityAssist7",
  "Assume that the message-security-assist extension facility 7 is installed"
>;

def FeatureMessageSecurityAssist8 : SystemZFeature<
  "message-security-assist-extension8", "MessageSecurityAssist8",
  "Assume that the message-security-assist extension facility 8 is installed"
>;

def FeatureVectorEnhancements1 : SystemZFeature<
  "vector-enhancements-1", "VectorEnhancements1",
  "Assume that the vector enhancements facility 1 is installed"
>;
def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">;

def FeatureVectorPackedDecimal : SystemZFeature<
  "vector-packed-decimal", "VectorPackedDecimal",
  "Assume that the vector packed decimal facility is installed"
>;

def FeatureInsertReferenceBitsMultiple : SystemZFeature<
  "insert-reference-bits-multiple", "InsertReferenceBitsMultiple",
  "Assume that the insert-reference-bits-multiple facility is installed"
>;

def Arch12NewFeatures : SystemZFeatureList<[
    FeatureMiscellaneousExtensions2,
    FeatureGuardedStorage,
    FeatureMessageSecurityAssist7,
    FeatureMessageSecurityAssist8,
    FeatureVectorEnhancements1,
    FeatureVectorPackedDecimal,
    FeatureInsertReferenceBitsMultiple
]>;

//===----------------------------------------------------------------------===//
//
// New features added in the Thirteenth Edition of the z/Architecture
//
//===----------------------------------------------------------------------===//

def FeatureMiscellaneousExtensions3 : SystemZFeature<
  "miscellaneous-extensions-3", "MiscellaneousExtensions3",
  "Assume that the miscellaneous-extensions facility 3 is installed"
>;

def FeatureMessageSecurityAssist9 : SystemZFeature<
  "message-security-assist-extension9", "MessageSecurityAssist9",
  "Assume that the message-security-assist extension facility 9 is installed"
>;

def FeatureVectorEnhancements2 : SystemZFeature<
  "vector-enhancements-2", "VectorEnhancements2",
  "Assume that the vector enhancements facility 2 is installed"
>;

def FeatureVectorPackedDecimalEnhancement : SystemZFeature<
  "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement",
  "Assume that the vector packed decimal enhancement facility is installed"
>;

def FeatureEnhancedSort : SystemZFeature<
  "enhanced-sort", "EnhancedSort",
  "Assume that the enhanced-sort facility is installed"
>;

def FeatureDeflateConversion : SystemZFeature<
  "deflate-conversion", "DeflateConversion",
  "Assume that the deflate-conversion facility is installed"
>;

def Arch13NewFeatures : SystemZFeatureList<[
    FeatureMiscellaneousExtensions3,
    FeatureMessageSecurityAssist9,
    FeatureVectorEnhancements2,
    FeatureVectorPackedDecimalEnhancement,
    FeatureEnhancedSort,
    FeatureDeflateConversion
]>;

//===----------------------------------------------------------------------===//
//
// Cumulative supported and unsupported feature sets
//
//===----------------------------------------------------------------------===//

def Arch8SupportedFeatures
  : SystemZFeatureList<[]>;
def Arch9SupportedFeatures
  : SystemZFeatureAdd<Arch8SupportedFeatures.List,  Arch9NewFeatures.List>;
def Arch10SupportedFeatures
  : SystemZFeatureAdd<Arch9SupportedFeatures.List,  Arch10NewFeatures.List>;
def Arch11SupportedFeatures
  : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
def Arch12SupportedFeatures
  : SystemZFeatureAdd<Arch11SupportedFeatures.List, Arch12NewFeatures.List>;
def Arch13SupportedFeatures
  : SystemZFeatureAdd<Arch12SupportedFeatures.List, Arch13NewFeatures.List>;

def Arch13UnsupportedFeatures
  : SystemZFeatureList<[]>;
def Arch12UnsupportedFeatures
  : SystemZFeatureAdd<Arch13UnsupportedFeatures.List, Arch13NewFeatures.List>;
def Arch11UnsupportedFeatures
  : SystemZFeatureAdd<Arch12UnsupportedFeatures.List, Arch12NewFeatures.List>;
def Arch10UnsupportedFeatures
  : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
def Arch9UnsupportedFeatures
  : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
def Arch8UnsupportedFeatures
  : SystemZFeatureAdd<Arch9UnsupportedFeatures.List,  Arch9NewFeatures.List>;