]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/SystemZ/SystemZFeatures.td
Import Zstandard 1.2.0
[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
66 def FeaturePopulationCount : SystemZFeature<
67   "population-count", "PopulationCount",
68   "Assume that the population-count facility is installed"
69 >;
70
71 def Arch9NewFeatures : SystemZFeatureList<[
72     FeatureDistinctOps,
73     FeatureFastSerialization,
74     FeatureFPExtension,
75     FeatureHighWord,
76     FeatureInterlockedAccess1,
77     FeatureLoadStoreOnCond,
78     FeaturePopulationCount
79 ]>;
80
81 //===----------------------------------------------------------------------===//
82 //
83 // New features added in the Tenth Edition of the z/Architecture
84 //
85 //===----------------------------------------------------------------------===//
86
87 def FeatureExecutionHint : SystemZFeature<
88   "execution-hint", "ExecutionHint",
89   "Assume that the execution-hint facility is installed"
90 >;
91
92 def FeatureLoadAndTrap : SystemZFeature<
93   "load-and-trap", "LoadAndTrap",
94   "Assume that the load-and-trap facility is installed"
95 >;
96
97 def FeatureMiscellaneousExtensions : SystemZFeature<
98   "miscellaneous-extensions", "MiscellaneousExtensions",
99   "Assume that the miscellaneous-extensions facility is installed"
100 >;
101
102 def FeatureProcessorAssist : SystemZFeature<
103   "processor-assist", "ProcessorAssist",
104   "Assume that the processor-assist facility is installed"
105 >;
106
107 def FeatureTransactionalExecution : SystemZFeature<
108   "transactional-execution", "TransactionalExecution",
109   "Assume that the transactional-execution facility is installed"
110 >;
111
112 def Arch10NewFeatures : SystemZFeatureList<[
113     FeatureExecutionHint,
114     FeatureLoadAndTrap,
115     FeatureMiscellaneousExtensions,
116     FeatureProcessorAssist,
117     FeatureTransactionalExecution
118 ]>;
119
120 //===----------------------------------------------------------------------===//
121 //
122 // New features added in the Eleventh Edition of the z/Architecture
123 //
124 //===----------------------------------------------------------------------===//
125
126 def FeatureLoadAndZeroRightmostByte : SystemZFeature<
127   "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte",
128   "Assume that the load-and-zero-rightmost-byte facility is installed"
129 >;
130
131 def FeatureLoadStoreOnCond2 : SystemZFeature<
132   "load-store-on-cond-2", "LoadStoreOnCond2",
133   "Assume that the load/store-on-condition facility 2 is installed"
134 >;
135
136 def FeatureVector : SystemZFeature<
137   "vector", "Vector",
138   "Assume that the vectory facility is installed"
139 >;
140 def FeatureNoVector : SystemZMissingFeature<"Vector">;
141
142 def Arch11NewFeatures : SystemZFeatureList<[
143     FeatureLoadAndZeroRightmostByte,
144     FeatureLoadStoreOnCond2,
145     FeatureVector
146 ]>;
147
148 //===----------------------------------------------------------------------===//
149 //
150 // Cumulative supported and unsupported feature sets
151 //
152 //===----------------------------------------------------------------------===//
153
154 def Arch8SupportedFeatures
155   : SystemZFeatureList<[]>;
156 def Arch9SupportedFeatures
157   : SystemZFeatureAdd<Arch8SupportedFeatures.List,  Arch9NewFeatures.List>;
158 def Arch10SupportedFeatures
159   : SystemZFeatureAdd<Arch9SupportedFeatures.List,  Arch10NewFeatures.List>;
160 def Arch11SupportedFeatures
161   : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>;
162
163 def Arch11UnsupportedFeatures
164   : SystemZFeatureList<[]>;
165 def Arch10UnsupportedFeatures
166   : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>;
167 def Arch9UnsupportedFeatures
168   : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>;
169 def Arch8UnsupportedFeatures
170   : SystemZFeatureAdd<Arch9UnsupportedFeatures.List,  Arch9NewFeatures.List>;
171