Skip to content

Commit 65b0cc6

Browse files
authored
[RISCV] Add FeatureStdExtI to all CPUs in RISCVProcessors.td. NFC (#88805)
This is currently being implied in RISCVISAInfo.cpp. Make it explicit. I'm planning to move all extension information to RISCVFeatures.td and have tablegen create the tables for RISCVISAInfo.cpp. This requires making the creation of RISCVTargetParserDef.inc in tablegen independent of RISCVISAInfo.cpp. So we need an accurate extension list for CPUs in tablegen.
1 parent fe48bf6 commit 65b0cc6

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

llvm/lib/Target/RISCV/RISCVProcessors.td

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ class RISCVTuneProcessorModel<string n,
5656

5757
def GENERIC_RV32 : RISCVProcessorModel<"generic-rv32",
5858
NoSchedModel,
59-
[Feature32Bit]>,
59+
[Feature32Bit,
60+
FeatureStdExtI]>,
6061
GenericTuneInfo;
6162
def GENERIC_RV64 : RISCVProcessorModel<"generic-rv64",
6263
NoSchedModel,
63-
[Feature64Bit]>,
64+
[Feature64Bit,
65+
FeatureStdExtI]>,
6466
GenericTuneInfo;
6567
// Support generic for compatibility with other targets. The triple will be used
6668
// to change to the appropriate rv32/rv64 version.
@@ -69,11 +71,13 @@ def : ProcessorModel<"generic", NoSchedModel, []>, GenericTuneInfo;
6971
def ROCKET_RV32 : RISCVProcessorModel<"rocket-rv32",
7072
RocketModel,
7173
[Feature32Bit,
74+
FeatureStdExtI,
7275
FeatureStdExtZifencei,
7376
FeatureStdExtZicsr]>;
7477
def ROCKET_RV64 : RISCVProcessorModel<"rocket-rv64",
7578
RocketModel,
7679
[Feature64Bit,
80+
FeatureStdExtI,
7781
FeatureStdExtZifencei,
7882
FeatureStdExtZicsr]>;
7983
def ROCKET : RISCVTuneProcessorModel<"rocket",
@@ -86,6 +90,7 @@ def SIFIVE_7 : RISCVTuneProcessorModel<"sifive-7-series",
8690
def SIFIVE_E20 : RISCVProcessorModel<"sifive-e20",
8791
RocketModel,
8892
[Feature32Bit,
93+
FeatureStdExtI,
8994
FeatureStdExtZicsr,
9095
FeatureStdExtZifencei,
9196
FeatureStdExtM,
@@ -94,6 +99,7 @@ def SIFIVE_E20 : RISCVProcessorModel<"sifive-e20",
9499
def SIFIVE_E21 : RISCVProcessorModel<"sifive-e21",
95100
RocketModel,
96101
[Feature32Bit,
102+
FeatureStdExtI,
97103
FeatureStdExtZicsr,
98104
FeatureStdExtZifencei,
99105
FeatureStdExtM,
@@ -103,6 +109,7 @@ def SIFIVE_E21 : RISCVProcessorModel<"sifive-e21",
103109
def SIFIVE_E24 : RISCVProcessorModel<"sifive-e24",
104110
RocketModel,
105111
[Feature32Bit,
112+
FeatureStdExtI,
106113
FeatureStdExtZifencei,
107114
FeatureStdExtM,
108115
FeatureStdExtA,
@@ -112,6 +119,7 @@ def SIFIVE_E24 : RISCVProcessorModel<"sifive-e24",
112119
def SIFIVE_E31 : RISCVProcessorModel<"sifive-e31",
113120
RocketModel,
114121
[Feature32Bit,
122+
FeatureStdExtI,
115123
FeatureStdExtZifencei,
116124
FeatureStdExtZicsr,
117125
FeatureStdExtM,
@@ -121,6 +129,7 @@ def SIFIVE_E31 : RISCVProcessorModel<"sifive-e31",
121129
def SIFIVE_E34 : RISCVProcessorModel<"sifive-e34",
122130
RocketModel,
123131
[Feature32Bit,
132+
FeatureStdExtI,
124133
FeatureStdExtZifencei,
125134
FeatureStdExtM,
126135
FeatureStdExtA,
@@ -130,6 +139,7 @@ def SIFIVE_E34 : RISCVProcessorModel<"sifive-e34",
130139
def SIFIVE_E76 : RISCVProcessorModel<"sifive-e76",
131140
SiFive7Model,
132141
[Feature32Bit,
142+
FeatureStdExtI,
133143
FeatureStdExtZifencei,
134144
FeatureStdExtM,
135145
FeatureStdExtA,
@@ -140,6 +150,7 @@ def SIFIVE_E76 : RISCVProcessorModel<"sifive-e76",
140150
def SIFIVE_S21 : RISCVProcessorModel<"sifive-s21",
141151
RocketModel,
142152
[Feature64Bit,
153+
FeatureStdExtI,
143154
FeatureStdExtZicsr,
144155
FeatureStdExtZifencei,
145156
FeatureStdExtM,
@@ -149,6 +160,7 @@ def SIFIVE_S21 : RISCVProcessorModel<"sifive-s21",
149160
def SIFIVE_S51 : RISCVProcessorModel<"sifive-s51",
150161
RocketModel,
151162
[Feature64Bit,
163+
FeatureStdExtI,
152164
FeatureStdExtZicsr,
153165
FeatureStdExtZifencei,
154166
FeatureStdExtM,
@@ -158,6 +170,7 @@ def SIFIVE_S51 : RISCVProcessorModel<"sifive-s51",
158170
def SIFIVE_S54 : RISCVProcessorModel<"sifive-s54",
159171
RocketModel,
160172
[Feature64Bit,
173+
FeatureStdExtI,
161174
FeatureStdExtZifencei,
162175
FeatureStdExtM,
163176
FeatureStdExtA,
@@ -168,6 +181,7 @@ def SIFIVE_S54 : RISCVProcessorModel<"sifive-s54",
168181
def SIFIVE_S76 : RISCVProcessorModel<"sifive-s76",
169182
SiFive7Model,
170183
[Feature64Bit,
184+
FeatureStdExtI,
171185
FeatureStdExtZifencei,
172186
FeatureStdExtM,
173187
FeatureStdExtA,
@@ -180,6 +194,7 @@ def SIFIVE_S76 : RISCVProcessorModel<"sifive-s76",
180194
def SIFIVE_U54 : RISCVProcessorModel<"sifive-u54",
181195
RocketModel,
182196
[Feature64Bit,
197+
FeatureStdExtI,
183198
FeatureStdExtZifencei,
184199
FeatureStdExtM,
185200
FeatureStdExtA,
@@ -190,6 +205,7 @@ def SIFIVE_U54 : RISCVProcessorModel<"sifive-u54",
190205
def SIFIVE_U74 : RISCVProcessorModel<"sifive-u74",
191206
SiFive7Model,
192207
[Feature64Bit,
208+
FeatureStdExtI,
193209
FeatureStdExtZifencei,
194210
FeatureStdExtM,
195211
FeatureStdExtA,
@@ -200,6 +216,7 @@ def SIFIVE_U74 : RISCVProcessorModel<"sifive-u74",
200216

201217
def SIFIVE_X280 : RISCVProcessorModel<"sifive-x280", SiFive7Model,
202218
[Feature64Bit,
219+
FeatureStdExtI,
203220
FeatureStdExtZifencei,
204221
FeatureStdExtM,
205222
FeatureStdExtA,
@@ -217,6 +234,7 @@ def SIFIVE_X280 : RISCVProcessorModel<"sifive-x280", SiFive7Model,
217234

218235
def SIFIVE_P450 : RISCVProcessorModel<"sifive-p450", SiFiveP400Model,
219236
[Feature64Bit,
237+
FeatureStdExtI,
220238
FeatureStdExtZifencei,
221239
FeatureStdExtM,
222240
FeatureStdExtA,
@@ -247,6 +265,7 @@ def SIFIVE_P450 : RISCVProcessorModel<"sifive-p450", SiFiveP400Model,
247265

248266
def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model,
249267
[Feature64Bit,
268+
FeatureStdExtI,
250269
FeatureStdExtZifencei,
251270
FeatureStdExtM,
252271
FeatureStdExtA,
@@ -286,6 +305,7 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model,
286305
def SYNTACORE_SCR1_BASE : RISCVProcessorModel<"syntacore-scr1-base",
287306
SyntacoreSCR1Model,
288307
[Feature32Bit,
308+
FeatureStdExtI,
289309
FeatureStdExtZicsr,
290310
FeatureStdExtZifencei,
291311
FeatureStdExtC],
@@ -294,6 +314,7 @@ def SYNTACORE_SCR1_BASE : RISCVProcessorModel<"syntacore-scr1-base",
294314
def SYNTACORE_SCR1_MAX : RISCVProcessorModel<"syntacore-scr1-max",
295315
SyntacoreSCR1Model,
296316
[Feature32Bit,
317+
FeatureStdExtI,
297318
FeatureStdExtZicsr,
298319
FeatureStdExtZifencei,
299320
FeatureStdExtM,
@@ -303,6 +324,7 @@ def SYNTACORE_SCR1_MAX : RISCVProcessorModel<"syntacore-scr1-max",
303324
def VENTANA_VEYRON_V1 : RISCVProcessorModel<"veyron-v1",
304325
NoSchedModel,
305326
[Feature64Bit,
327+
FeatureStdExtI,
306328
FeatureStdExtZifencei,
307329
FeatureStdExtZicsr,
308330
FeatureStdExtZicntr,
@@ -332,6 +354,7 @@ def VENTANA_VEYRON_V1 : RISCVProcessorModel<"veyron-v1",
332354
def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu",
333355
XiangShanNanHuModel,
334356
[Feature64Bit,
357+
FeatureStdExtI,
335358
FeatureStdExtZicsr,
336359
FeatureStdExtZifencei,
337360
FeatureStdExtM,

0 commit comments

Comments
 (0)