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