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"
66 def FeaturePopulationCount : SystemZFeature<
67 "population-count", "PopulationCount",
68 "Assume that the population-count facility is installed"
71 def FeatureMessageSecurityAssist4 : SystemZFeature<
72 "message-security-assist-extension4", "MessageSecurityAssist4",
73 "Assume that the message-security-assist extension facility 4 is installed"
76 def Arch9NewFeatures : SystemZFeatureList<[
78 FeatureFastSerialization,
81 FeatureInterlockedAccess1,
82 FeatureLoadStoreOnCond,
83 FeaturePopulationCount,
84 FeatureMessageSecurityAssist4
87 //===----------------------------------------------------------------------===//
89 // New features added in the Tenth Edition of the z/Architecture
91 //===----------------------------------------------------------------------===//
93 def FeatureExecutionHint : SystemZFeature<
94 "execution-hint", "ExecutionHint",
95 "Assume that the execution-hint facility is installed"
98 def FeatureLoadAndTrap : SystemZFeature<
99 "load-and-trap", "LoadAndTrap",
100 "Assume that the load-and-trap facility is installed"
103 def FeatureMiscellaneousExtensions : SystemZFeature<
104 "miscellaneous-extensions", "MiscellaneousExtensions",
105 "Assume that the miscellaneous-extensions facility is installed"
108 def FeatureProcessorAssist : SystemZFeature<
109 "processor-assist", "ProcessorAssist",
110 "Assume that the processor-assist facility is installed"
113 def FeatureTransactionalExecution : SystemZFeature<
114 "transactional-execution", "TransactionalExecution",
115 "Assume that the transactional-execution facility is installed"
118 def Arch10NewFeatures : SystemZFeatureList<[
119 FeatureExecutionHint,
121 FeatureMiscellaneousExtensions,
122 FeatureProcessorAssist,
123 FeatureTransactionalExecution
126 //===----------------------------------------------------------------------===//
128 // New features added in the Eleventh Edition of the z/Architecture
130 //===----------------------------------------------------------------------===//
132 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
133 "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte",
134 "Assume that the load-and-zero-rightmost-byte facility is installed"
137 def FeatureLoadStoreOnCond2 : SystemZFeature<
138 "load-store-on-cond-2", "LoadStoreOnCond2",
139 "Assume that the load/store-on-condition facility 2 is installed"
142 def FeatureMessageSecurityAssist5 : SystemZFeature<
143 "message-security-assist-extension5", "MessageSecurityAssist5",
144 "Assume that the message-security-assist extension facility 5 is installed"
147 def FeatureVector : SystemZFeature<
149 "Assume that the vectory facility is installed"
151 def FeatureNoVector : SystemZMissingFeature<"Vector">;
153 def Arch11NewFeatures : SystemZFeatureList<[
154 FeatureLoadAndZeroRightmostByte,
155 FeatureLoadStoreOnCond2,
156 FeatureMessageSecurityAssist5,
160 //===----------------------------------------------------------------------===//
162 // Cumulative supported and unsupported feature sets
164 //===----------------------------------------------------------------------===//
166 def Arch8SupportedFeatures
167 : SystemZFeatureList<[]>;
168 def Arch9SupportedFeatures
169 : SystemZFeatureAdd<Arch8SupportedFeatures.List, Arch9NewFeatures.List>;
170 def Arch10SupportedFeatures
171 : SystemZFeatureAdd<Arch9SupportedFeatures.List, Arch10NewFeatures.List>;
172 def Arch11SupportedFeatures
173 : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
175 def Arch11UnsupportedFeatures
176 : SystemZFeatureList<[]>;
177 def Arch10UnsupportedFeatures
178 : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
179 def Arch9UnsupportedFeatures
180 : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
181 def Arch8UnsupportedFeatures
182 : SystemZFeatureAdd<Arch9UnsupportedFeatures.List, Arch9NewFeatures.List>;