1 //===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Feature definitions.
12 //===----------------------------------------------------------------------===//
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>;
19 class SystemZMissingFeature<string intname>
20 : Predicate<"!Subtarget->has"##intname##"()">;
22 class SystemZFeatureList<list<SystemZFeature> x> {
23 list<SystemZFeature> List = x;
26 class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y>
27 : SystemZFeatureList<!listconcat(x, y)>;
29 //===----------------------------------------------------------------------===//
31 // New features added in the Ninth Edition of the z/Architecture
33 //===----------------------------------------------------------------------===//
35 def FeatureDistinctOps : SystemZFeature<
36 "distinct-ops", "DistinctOps",
37 "Assume that the distinct-operands facility is installed"
40 def FeatureFastSerialization : SystemZFeature<
41 "fast-serialization", "FastSerialization",
42 "Assume that the fast-serialization facility is installed"
45 def FeatureFPExtension : SystemZFeature<
46 "fp-extension", "FPExtension",
47 "Assume that the floating-point extension facility is installed"
50 def FeatureHighWord : SystemZFeature<
51 "high-word", "HighWord",
52 "Assume that the high-word facility is installed"
55 def FeatureInterlockedAccess1 : SystemZFeature<
56 "interlocked-access1", "InterlockedAccess1",
57 "Assume that interlocked-access facility 1 is installed"
59 def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;
61 def FeatureLoadStoreOnCond : SystemZFeature<
62 "load-store-on-cond", "LoadStoreOnCond",
63 "Assume that the load/store-on-condition facility is installed"
65 def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">;
67 def FeaturePopulationCount : SystemZFeature<
68 "population-count", "PopulationCount",
69 "Assume that the population-count facility is installed"
72 def FeatureMessageSecurityAssist3 : SystemZFeature<
73 "message-security-assist-extension3", "MessageSecurityAssist3",
74 "Assume that the message-security-assist extension facility 3 is installed"
77 def FeatureMessageSecurityAssist4 : SystemZFeature<
78 "message-security-assist-extension4", "MessageSecurityAssist4",
79 "Assume that the message-security-assist extension facility 4 is installed"
82 def FeatureResetReferenceBitsMultiple : SystemZFeature<
83 "reset-reference-bits-multiple", "ResetReferenceBitsMultiple",
84 "Assume that the reset-reference-bits-multiple facility is installed"
87 def Arch9NewFeatures : SystemZFeatureList<[
89 FeatureFastSerialization,
92 FeatureInterlockedAccess1,
93 FeatureLoadStoreOnCond,
94 FeaturePopulationCount,
95 FeatureMessageSecurityAssist3,
96 FeatureMessageSecurityAssist4,
97 FeatureResetReferenceBitsMultiple
100 //===----------------------------------------------------------------------===//
102 // New features added in the Tenth Edition of the z/Architecture
104 //===----------------------------------------------------------------------===//
106 def FeatureExecutionHint : SystemZFeature<
107 "execution-hint", "ExecutionHint",
108 "Assume that the execution-hint facility is installed"
111 def FeatureLoadAndTrap : SystemZFeature<
112 "load-and-trap", "LoadAndTrap",
113 "Assume that the load-and-trap facility is installed"
116 def FeatureMiscellaneousExtensions : SystemZFeature<
117 "miscellaneous-extensions", "MiscellaneousExtensions",
118 "Assume that the miscellaneous-extensions facility is installed"
121 def FeatureProcessorAssist : SystemZFeature<
122 "processor-assist", "ProcessorAssist",
123 "Assume that the processor-assist facility is installed"
126 def FeatureTransactionalExecution : SystemZFeature<
127 "transactional-execution", "TransactionalExecution",
128 "Assume that the transactional-execution facility is installed"
131 def FeatureDFPZonedConversion : SystemZFeature<
132 "dfp-zoned-conversion", "DFPZonedConversion",
133 "Assume that the DFP zoned-conversion facility is installed"
136 def FeatureEnhancedDAT2 : SystemZFeature<
137 "enhanced-dat-2", "EnhancedDAT2",
138 "Assume that the enhanced-DAT facility 2 is installed"
141 def Arch10NewFeatures : SystemZFeatureList<[
142 FeatureExecutionHint,
144 FeatureMiscellaneousExtensions,
145 FeatureProcessorAssist,
146 FeatureTransactionalExecution,
147 FeatureDFPZonedConversion,
151 //===----------------------------------------------------------------------===//
153 // New features added in the Eleventh Edition of the z/Architecture
155 //===----------------------------------------------------------------------===//
157 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
158 "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte",
159 "Assume that the load-and-zero-rightmost-byte facility is installed"
162 def FeatureLoadStoreOnCond2 : SystemZFeature<
163 "load-store-on-cond-2", "LoadStoreOnCond2",
164 "Assume that the load/store-on-condition facility 2 is installed"
167 def FeatureMessageSecurityAssist5 : SystemZFeature<
168 "message-security-assist-extension5", "MessageSecurityAssist5",
169 "Assume that the message-security-assist extension facility 5 is installed"
172 def FeatureDFPPackedConversion : SystemZFeature<
173 "dfp-packed-conversion", "DFPPackedConversion",
174 "Assume that the DFP packed-conversion facility is installed"
177 def FeatureVector : SystemZFeature<
179 "Assume that the vectory facility is installed"
181 def FeatureNoVector : SystemZMissingFeature<"Vector">;
183 def Arch11NewFeatures : SystemZFeatureList<[
184 FeatureLoadAndZeroRightmostByte,
185 FeatureLoadStoreOnCond2,
186 FeatureMessageSecurityAssist5,
187 FeatureDFPPackedConversion,
191 //===----------------------------------------------------------------------===//
193 // New features added in the Twelvth Edition of the z/Architecture
195 //===----------------------------------------------------------------------===//
197 def FeatureMiscellaneousExtensions2 : SystemZFeature<
198 "miscellaneous-extensions-2", "MiscellaneousExtensions2",
199 "Assume that the miscellaneous-extensions facility 2 is installed"
202 def FeatureGuardedStorage : SystemZFeature<
203 "guarded-storage", "GuardedStorage",
204 "Assume that the guarded-storage facility is installed"
207 def FeatureMessageSecurityAssist7 : SystemZFeature<
208 "message-security-assist-extension7", "MessageSecurityAssist7",
209 "Assume that the message-security-assist extension facility 7 is installed"
212 def FeatureMessageSecurityAssist8 : SystemZFeature<
213 "message-security-assist-extension8", "MessageSecurityAssist8",
214 "Assume that the message-security-assist extension facility 8 is installed"
217 def FeatureVectorEnhancements1 : SystemZFeature<
218 "vector-enhancements-1", "VectorEnhancements1",
219 "Assume that the vector enhancements facility 1 is installed"
221 def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">;
223 def FeatureVectorPackedDecimal : SystemZFeature<
224 "vector-packed-decimal", "VectorPackedDecimal",
225 "Assume that the vector packed decimal facility is installed"
228 def FeatureInsertReferenceBitsMultiple : SystemZFeature<
229 "insert-reference-bits-multiple", "InsertReferenceBitsMultiple",
230 "Assume that the insert-reference-bits-multiple facility is installed"
233 def Arch12NewFeatures : SystemZFeatureList<[
234 FeatureMiscellaneousExtensions2,
235 FeatureGuardedStorage,
236 FeatureMessageSecurityAssist7,
237 FeatureMessageSecurityAssist8,
238 FeatureVectorEnhancements1,
239 FeatureVectorPackedDecimal,
240 FeatureInsertReferenceBitsMultiple
243 //===----------------------------------------------------------------------===//
245 // Cumulative supported and unsupported feature sets
247 //===----------------------------------------------------------------------===//
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>;
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>;