authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-12-16 12:39:30+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-12-16 18:13:52+01:00
log6f3ed2f71f3548b399214f604d820cd2dd2887f3
tree3d3e25dd7e53bb40f25fb25769e18c2ec3d1d6c8
parent38bf94280bb9735a005673d3eae132f75795b854

Update target details

llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6 zig-llvm-target-details-generator commit 4299674ecabeb668b0d84285cd1b41a652a391b1

15 files changed, 2040 insertions(+), 1500 deletions(-)

lib/std/target/aarch64.zig+529-263
......@@ -8,9 +8,18 @@ const CpuFeature = std.Target.Cpu.Feature;
88const CpuModel = std.Target.Cpu.Model;
99
1010pub const Feature = enum {
11 a34,
11 CONTEXTIDREL2,
12 a35,
13 a53,
14 a55,
15 a57,
16 a64fx,
1217 a65,
18 a72,
19 a73,
20 a75,
1321 a76,
22 a77,
1423 aes,
1524 aggressive_fma,
1625 alternate_sextload_cvt_f32_pattern,
......@@ -36,10 +45,14 @@ pub const Feature = enum {
3645 call_saved_x18,
3746 call_saved_x8,
3847 call_saved_x9,
48 carmel,
3949 ccdp,
4050 ccidx,
4151 ccpp,
4252 complxnum,
53 cortex_a78,
54 cortex_r82,
55 cortex_x1,
4356 crc,
4457 crypto,
4558 custom_cheap_as_move,
......@@ -49,9 +62,11 @@ pub const Feature = enum {
4962 ecv,
5063 ete,
5164 exynos_cheap_as_move,
65 exynosm3,
5266 exynosm4,
5367 f32mm,
5468 f64mm,
69 falkor,
5570 fgt,
5671 fmi,
5772 force_32bit_jump_tables,
......@@ -67,8 +82,9 @@ pub const Feature = enum {
6782 fuse_literals,
6883 harden_sls_blr,
6984 harden_sls_retbr,
70 i8mm,
85 _i8mm,
7186 jsconv,
87 kryo,
7288 lor,
7389 lse,
7490 lsl_fast,
......@@ -77,8 +93,11 @@ pub const Feature = enum {
7793 neon,
7894 neoversee1,
7995 neoversen1,
96 neoversen2,
97 neoversev1,
8098 no_neg_immediates,
8199 nv,
100 outline_atomics,
82101 pa,
83102 pan,
84103 pan_rwv,
......@@ -88,7 +107,6 @@ pub const Feature = enum {
88107 predres,
89108 rand,
90109 ras,
91 rasv8_4,
92110 rcpc,
93111 rcpc_immo,
94112 rdm,
......@@ -117,6 +135,7 @@ pub const Feature = enum {
117135 reserve_x6,
118136 reserve_x7,
119137 reserve_x9,
138 saphira,
120139 sb,
121140 sel2,
122141 sha2,
......@@ -136,6 +155,12 @@ pub const Feature = enum {
136155 sve2_sha3,
137156 sve2_sm4,
138157 tagged_globals,
158 thunderx,
159 thunderx2t99,
160 thunderx3t110,
161 thunderxt81,
162 thunderxt83,
163 thunderxt88,
139164 tlb_rmi,
140165 tme,
141166 tpidr_el1,
......@@ -143,18 +168,19 @@ pub const Feature = enum {
143168 tpidr_el3,
144169 tracev8_4,
145170 trbe,
171 tsv110,
146172 uaops,
147173 use_aa,
148174 use_experimental_zeroing_pseudos,
149175 use_postra_scheduler,
150176 use_reciprocal_square_root,
151 v8a,
152177 v8_1a,
153178 v8_2a,
154179 v8_3a,
155180 v8_4a,
156181 v8_5a,
157182 v8_6a,
183 v8r,
158184 vh,
159185 zcm,
160186 zcz,
......@@ -166,18 +192,87 @@ pub const Feature = enum {
166192pub usingnamespace CpuFeature.feature_set_fns(Feature);
167193
168194pub const all_features = blk: {
169 @setEvalBranchQuota(2000);
195 @setEvalBranchQuota(10000);
170196 const len = @typeInfo(Feature).Enum.fields.len;
171197 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
172198 var result: [len]CpuFeature = undefined;
173 result[@enumToInt(Feature.a34)] = .{
199 result[@enumToInt(Feature.CONTEXTIDREL2)] = .{
200 .llvm_name = "CONTEXTIDREL2",
201 .description = "Enable RW operand CONTEXTIDR_EL2",
202 .dependencies = featureSet(&[_]Feature{}),
203 };
204 result[@enumToInt(Feature.a35)] = .{
174205 .llvm_name = "a35",
175 .description = "Cortex-A34 ARM processors",
206 .description = "Cortex-A35 ARM processors",
207 .dependencies = featureSet(&[_]Feature{
208 .crc,
209 .crypto,
210 .fp_armv8,
211 .neon,
212 .perfmon,
213 }),
214 };
215 result[@enumToInt(Feature.a53)] = .{
216 .llvm_name = "a53",
217 .description = "Cortex-A53 ARM processors",
218 .dependencies = featureSet(&[_]Feature{
219 .balance_fp_ops,
220 .crc,
221 .crypto,
222 .custom_cheap_as_move,
223 .fp_armv8,
224 .fuse_aes,
225 .neon,
226 .perfmon,
227 .use_aa,
228 .use_postra_scheduler,
229 }),
230 };
231 result[@enumToInt(Feature.a55)] = .{
232 .llvm_name = "a55",
233 .description = "Cortex-A55 ARM processors",
234 .dependencies = featureSet(&[_]Feature{
235 .crypto,
236 .dotprod,
237 .fp_armv8,
238 .fullfp16,
239 .fuse_aes,
240 .neon,
241 .perfmon,
242 .rcpc,
243 .v8_2a,
244 }),
245 };
246 result[@enumToInt(Feature.a57)] = .{
247 .llvm_name = "a57",
248 .description = "Cortex-A57 ARM processors",
176249 .dependencies = featureSet(&[_]Feature{
250 .balance_fp_ops,
177251 .crc,
178252 .crypto,
253 .custom_cheap_as_move,
254 .fp_armv8,
255 .fuse_aes,
256 .fuse_literals,
257 .neon,
258 .perfmon,
259 .predictable_select_expensive,
260 .use_postra_scheduler,
261 }),
262 };
263 result[@enumToInt(Feature.a64fx)] = .{
264 .llvm_name = "a64fx",
265 .description = "Fujitsu A64FX processors",
266 .dependencies = featureSet(&[_]Feature{
267 .complxnum,
268 .fp_armv8,
269 .fullfp16,
270 .neon,
179271 .perfmon,
180 .v8a,
272 .sha2,
273 .sve,
274 .use_postra_scheduler,
275 .v8_2a,
181276 }),
182277 };
183278 result[@enumToInt(Feature.a65)] = .{
......@@ -195,18 +290,72 @@ pub const all_features = blk: {
195290 .v8_2a,
196291 }),
197292 };
293 result[@enumToInt(Feature.a72)] = .{
294 .llvm_name = "a72",
295 .description = "Cortex-A72 ARM processors",
296 .dependencies = featureSet(&[_]Feature{
297 .crc,
298 .crypto,
299 .fp_armv8,
300 .fuse_aes,
301 .neon,
302 .perfmon,
303 }),
304 };
305 result[@enumToInt(Feature.a73)] = .{
306 .llvm_name = "a73",
307 .description = "Cortex-A73 ARM processors",
308 .dependencies = featureSet(&[_]Feature{
309 .crc,
310 .crypto,
311 .fp_armv8,
312 .fuse_aes,
313 .neon,
314 .perfmon,
315 }),
316 };
317 result[@enumToInt(Feature.a75)] = .{
318 .llvm_name = "a75",
319 .description = "Cortex-A75 ARM processors",
320 .dependencies = featureSet(&[_]Feature{
321 .crypto,
322 .dotprod,
323 .fp_armv8,
324 .fullfp16,
325 .fuse_aes,
326 .neon,
327 .perfmon,
328 .rcpc,
329 .v8_2a,
330 }),
331 };
198332 result[@enumToInt(Feature.a76)] = .{
199333 .llvm_name = "a76",
200334 .description = "Cortex-A76 ARM processors",
201335 .dependencies = featureSet(&[_]Feature{
202336 .crypto,
203337 .dotprod,
338 .fp_armv8,
204339 .fullfp16,
340 .neon,
205341 .rcpc,
206342 .ssbs,
207343 .v8_2a,
208344 }),
209345 };
346 result[@enumToInt(Feature.a77)] = .{
347 .llvm_name = "a77",
348 .description = "Cortex-A77 ARM processors",
349 .dependencies = featureSet(&[_]Feature{
350 .crypto,
351 .dotprod,
352 .fp_armv8,
353 .fullfp16,
354 .neon,
355 .rcpc,
356 .v8_2a,
357 }),
358 };
210359 result[@enumToInt(Feature.aes)] = .{
211360 .llvm_name = "aes",
212361 .description = "Enable AES support",
......@@ -415,6 +564,16 @@ pub const all_features = blk: {
415564 .description = "Make X9 callee saved.",
416565 .dependencies = featureSet(&[_]Feature{}),
417566 };
567 result[@enumToInt(Feature.carmel)] = .{
568 .llvm_name = "carmel",
569 .description = "Nvidia Carmel processors",
570 .dependencies = featureSet(&[_]Feature{
571 .crypto,
572 .fullfp16,
573 .neon,
574 .v8_2a,
575 }),
576 };
418577 result[@enumToInt(Feature.ccdp)] = .{
419578 .llvm_name = "ccdp",
420579 .description = "Enable v8.5 Cache Clean to Point of Deep Persistence",
......@@ -437,6 +596,49 @@ pub const all_features = blk: {
437596 .neon,
438597 }),
439598 };
599 result[@enumToInt(Feature.cortex_a78)] = .{
600 .llvm_name = "cortex-a78",
601 .description = "Cortex-A78 ARM processors",
602 .dependencies = featureSet(&[_]Feature{
603 .crypto,
604 .dotprod,
605 .fp_armv8,
606 .fullfp16,
607 .fuse_aes,
608 .neon,
609 .perfmon,
610 .rcpc,
611 .spe,
612 .ssbs,
613 .use_postra_scheduler,
614 .v8_2a,
615 }),
616 };
617 result[@enumToInt(Feature.cortex_r82)] = .{
618 .llvm_name = "cortex-r82",
619 .description = "Cortex-R82 ARM Processors",
620 .dependencies = featureSet(&[_]Feature{
621 .use_postra_scheduler,
622 .v8r,
623 }),
624 };
625 result[@enumToInt(Feature.cortex_x1)] = .{
626 .llvm_name = "cortex-x1",
627 .description = "Cortex-X1 ARM processors",
628 .dependencies = featureSet(&[_]Feature{
629 .crypto,
630 .dotprod,
631 .fp_armv8,
632 .fullfp16,
633 .fuse_aes,
634 .neon,
635 .perfmon,
636 .rcpc,
637 .spe,
638 .use_postra_scheduler,
639 .v8_2a,
640 }),
641 };
440642 result[@enumToInt(Feature.crc)] = .{
441643 .llvm_name = "crc",
442644 .description = "Enable ARMv8 CRC-32 checksum instructions",
......@@ -490,6 +692,25 @@ pub const all_features = blk: {
490692 .custom_cheap_as_move,
491693 }),
492694 };
695 result[@enumToInt(Feature.exynosm3)] = .{
696 .llvm_name = "exynosm3",
697 .description = "Samsung Exynos-M3 processors",
698 .dependencies = featureSet(&[_]Feature{
699 .crc,
700 .crypto,
701 .exynos_cheap_as_move,
702 .force_32bit_jump_tables,
703 .fuse_address,
704 .fuse_aes,
705 .fuse_csel,
706 .fuse_literals,
707 .lsl_fast,
708 .perfmon,
709 .predictable_select_expensive,
710 .use_postra_scheduler,
711 .zcz_fp,
712 }),
713 };
493714 result[@enumToInt(Feature.exynosm4)] = .{
494715 .llvm_name = "exynosm4",
495716 .description = "Samsung Exynos-M4 processors",
......@@ -527,6 +748,24 @@ pub const all_features = blk: {
527748 .sve,
528749 }),
529750 };
751 result[@enumToInt(Feature.falkor)] = .{
752 .llvm_name = "falkor",
753 .description = "Qualcomm Falkor processors",
754 .dependencies = featureSet(&[_]Feature{
755 .crc,
756 .crypto,
757 .custom_cheap_as_move,
758 .fp_armv8,
759 .lsl_fast,
760 .neon,
761 .perfmon,
762 .predictable_select_expensive,
763 .rdm,
764 .slow_strqro_store,
765 .use_postra_scheduler,
766 .zcz,
767 }),
768 };
530769 result[@enumToInt(Feature.fgt)] = .{
531770 .llvm_name = "fgt",
532771 .description = "Enable fine grained virtualization traps extension",
......@@ -606,7 +845,7 @@ pub const all_features = blk: {
606845 .description = "Harden against straight line speculation across RET and BR instructions",
607846 .dependencies = featureSet(&[_]Feature{}),
608847 };
609 result[@enumToInt(Feature.i8mm)] = .{
848 result[@enumToInt(Feature._i8mm)] = .{
610849 .llvm_name = "i8mm",
611850 .description = "Enable Matrix Multiply Int8 Extension",
612851 .dependencies = featureSet(&[_]Feature{}),
......@@ -618,6 +857,22 @@ pub const all_features = blk: {
618857 .fp_armv8,
619858 }),
620859 };
860 result[@enumToInt(Feature.kryo)] = .{
861 .llvm_name = "kryo",
862 .description = "Qualcomm Kryo processors",
863 .dependencies = featureSet(&[_]Feature{
864 .crc,
865 .crypto,
866 .custom_cheap_as_move,
867 .fp_armv8,
868 .lsl_fast,
869 .neon,
870 .perfmon,
871 .predictable_select_expensive,
872 .use_postra_scheduler,
873 .zcz,
874 }),
875 };
621876 result[@enumToInt(Feature.lor)] = .{
622877 .llvm_name = "lor",
623878 .description = "Enables ARM v8.1 Limited Ordering Regions extension",
......@@ -679,6 +934,42 @@ pub const all_features = blk: {
679934 .v8_2a,
680935 }),
681936 };
937 result[@enumToInt(Feature.neoversen2)] = .{
938 .llvm_name = "neoversen2",
939 .description = "Neoverse N2 ARM processors",
940 .dependencies = featureSet(&[_]Feature{
941 .bf16,
942 .ete,
943 ._i8mm,
944 .mte,
945 .sve2,
946 .sve2_bitperm,
947 .trbe,
948 .v8_5a,
949 }),
950 };
951 result[@enumToInt(Feature.neoversev1)] = .{
952 .llvm_name = "neoversev1",
953 .description = "Neoverse V1 ARM processors",
954 .dependencies = featureSet(&[_]Feature{
955 .bf16,
956 .ccdp,
957 .crypto,
958 .fp_armv8,
959 .fp16fml,
960 .fullfp16,
961 .fuse_aes,
962 ._i8mm,
963 .neon,
964 .perfmon,
965 .rand,
966 .spe,
967 .ssbs,
968 .sve,
969 .use_postra_scheduler,
970 .v8_4a,
971 }),
972 };
682973 result[@enumToInt(Feature.no_neg_immediates)] = .{
683974 .llvm_name = "no-neg-immediates",
684975 .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.",
......@@ -686,7 +977,12 @@ pub const all_features = blk: {
686977 };
687978 result[@enumToInt(Feature.nv)] = .{
688979 .llvm_name = "nv",
689 .description = "Enable v8.4-A Nested Virtualization extension",
980 .description = "Enable v8.4-A Nested Virtualization Enchancement",
981 .dependencies = featureSet(&[_]Feature{}),
982 };
983 result[@enumToInt(Feature.outline_atomics)] = .{
984 .llvm_name = "outline-atomics",
985 .description = "Enable out of line atomics to support LSE instructions",
690986 .dependencies = featureSet(&[_]Feature{}),
691987 };
692988 result[@enumToInt(Feature.pa)] = .{
......@@ -736,13 +1032,6 @@ pub const all_features = blk: {
7361032 .description = "Enable ARMv8 Reliability, Availability and Serviceability Extensions",
7371033 .dependencies = featureSet(&[_]Feature{}),
7381034 };
739 result[@enumToInt(Feature.rasv8_4)] = .{
740 .llvm_name = "rasv8_4",
741 .description = "Enable v8.4-A Reliability, Availability and Serviceability extension",
742 .dependencies = featureSet(&[_]Feature{
743 .ras,
744 }),
745 };
7461035 result[@enumToInt(Feature.rcpc)] = .{
7471036 .llvm_name = "rcpc",
7481037 .description = "Enable support for RCPC extension",
......@@ -885,6 +1174,23 @@ pub const all_features = blk: {
8851174 .description = "Reserve X9, making it unavailable as a GPR",
8861175 .dependencies = featureSet(&[_]Feature{}),
8871176 };
1177 result[@enumToInt(Feature.saphira)] = .{
1178 .llvm_name = "saphira",
1179 .description = "Qualcomm Saphira processors",
1180 .dependencies = featureSet(&[_]Feature{
1181 .crypto,
1182 .custom_cheap_as_move,
1183 .fp_armv8,
1184 .lsl_fast,
1185 .neon,
1186 .perfmon,
1187 .predictable_select_expensive,
1188 .spe,
1189 .use_postra_scheduler,
1190 .v8_4a,
1191 .zcz,
1192 }),
1193 };
8881194 result[@enumToInt(Feature.sb)] = .{
8891195 .llvm_name = "sb",
8901196 .description = "Enable v8.5 Speculation Barrier",
......@@ -955,7 +1261,9 @@ pub const all_features = blk: {
9551261 result[@enumToInt(Feature.sve)] = .{
9561262 .llvm_name = "sve",
9571263 .description = "Enable Scalable Vector Extension (SVE) instructions",
958 .dependencies = featureSet(&[_]Feature{}),
1264 .dependencies = featureSet(&[_]Feature{
1265 .fullfp16,
1266 }),
9591267 };
9601268 result[@enumToInt(Feature.sve2)] = .{
9611269 .llvm_name = "sve2",
......@@ -1000,15 +1308,104 @@ pub const all_features = blk: {
10001308 .description = "Use an instruction sequence for taking the address of a global that allows a memory tag in the upper address bits",
10011309 .dependencies = featureSet(&[_]Feature{}),
10021310 };
1003 result[@enumToInt(Feature.tlb_rmi)] = .{
1004 .llvm_name = "tlb-rmi",
1005 .description = "Enable v8.4-A TLB Range and Maintenance Instructions",
1006 .dependencies = featureSet(&[_]Feature{}),
1007 };
1008 result[@enumToInt(Feature.tme)] = .{
1009 .llvm_name = "tme",
1010 .description = "Enable Transactional Memory Extension",
1011 .dependencies = featureSet(&[_]Feature{}),
1311 result[@enumToInt(Feature.thunderx)] = .{
1312 .llvm_name = "thunderx",
1313 .description = "Cavium ThunderX processors",
1314 .dependencies = featureSet(&[_]Feature{
1315 .crc,
1316 .crypto,
1317 .fp_armv8,
1318 .neon,
1319 .perfmon,
1320 .predictable_select_expensive,
1321 .use_postra_scheduler,
1322 }),
1323 };
1324 result[@enumToInt(Feature.thunderx2t99)] = .{
1325 .llvm_name = "thunderx2t99",
1326 .description = "Cavium ThunderX2 processors",
1327 .dependencies = featureSet(&[_]Feature{
1328 .aggressive_fma,
1329 .arith_bcc_fusion,
1330 .crc,
1331 .crypto,
1332 .fp_armv8,
1333 .lse,
1334 .neon,
1335 .predictable_select_expensive,
1336 .use_postra_scheduler,
1337 .v8_1a,
1338 }),
1339 };
1340 result[@enumToInt(Feature.thunderx3t110)] = .{
1341 .llvm_name = "thunderx3t110",
1342 .description = "Marvell ThunderX3 processors",
1343 .dependencies = featureSet(&[_]Feature{
1344 .aggressive_fma,
1345 .arith_bcc_fusion,
1346 .balance_fp_ops,
1347 .crc,
1348 .crypto,
1349 .fp_armv8,
1350 .lse,
1351 .neon,
1352 .pa,
1353 .perfmon,
1354 .predictable_select_expensive,
1355 .strict_align,
1356 .use_aa,
1357 .use_postra_scheduler,
1358 .v8_3a,
1359 }),
1360 };
1361 result[@enumToInt(Feature.thunderxt81)] = .{
1362 .llvm_name = "thunderxt81",
1363 .description = "Cavium ThunderX processors",
1364 .dependencies = featureSet(&[_]Feature{
1365 .crc,
1366 .crypto,
1367 .fp_armv8,
1368 .neon,
1369 .perfmon,
1370 .predictable_select_expensive,
1371 .use_postra_scheduler,
1372 }),
1373 };
1374 result[@enumToInt(Feature.thunderxt83)] = .{
1375 .llvm_name = "thunderxt83",
1376 .description = "Cavium ThunderX processors",
1377 .dependencies = featureSet(&[_]Feature{
1378 .crc,
1379 .crypto,
1380 .fp_armv8,
1381 .neon,
1382 .perfmon,
1383 .predictable_select_expensive,
1384 .use_postra_scheduler,
1385 }),
1386 };
1387 result[@enumToInt(Feature.thunderxt88)] = .{
1388 .llvm_name = "thunderxt88",
1389 .description = "Cavium ThunderX processors",
1390 .dependencies = featureSet(&[_]Feature{
1391 .crc,
1392 .crypto,
1393 .fp_armv8,
1394 .neon,
1395 .perfmon,
1396 .predictable_select_expensive,
1397 .use_postra_scheduler,
1398 }),
1399 };
1400 result[@enumToInt(Feature.tlb_rmi)] = .{
1401 .llvm_name = "tlb-rmi",
1402 .description = "Enable v8.4-A TLB Range and Maintenance Instructions",
1403 .dependencies = featureSet(&[_]Feature{}),
1404 };
1405 result[@enumToInt(Feature.tme)] = .{
1406 .llvm_name = "tme",
1407 .description = "Enable Transactional Memory Extension",
1408 .dependencies = featureSet(&[_]Feature{}),
10121409 };
10131410 result[@enumToInt(Feature.tpidr_el1)] = .{
10141411 .llvm_name = "tpidr-el1",
......@@ -1035,6 +1432,24 @@ pub const all_features = blk: {
10351432 .description = "Enable Trace Buffer Extension",
10361433 .dependencies = featureSet(&[_]Feature{}),
10371434 };
1435 result[@enumToInt(Feature.tsv110)] = .{
1436 .llvm_name = "tsv110",
1437 .description = "HiSilicon TS-V110 processors",
1438 .dependencies = featureSet(&[_]Feature{
1439 .crypto,
1440 .custom_cheap_as_move,
1441 .dotprod,
1442 .fp_armv8,
1443 .fp16fml,
1444 .fullfp16,
1445 .fuse_aes,
1446 .neon,
1447 .perfmon,
1448 .spe,
1449 .use_postra_scheduler,
1450 .v8_2a,
1451 }),
1452 };
10381453 result[@enumToInt(Feature.uaops)] = .{
10391454 .llvm_name = "uaops",
10401455 .description = "Enable v8.2 UAO PState",
......@@ -1060,14 +1475,6 @@ pub const all_features = blk: {
10601475 .description = "Use the reciprocal square root approximation",
10611476 .dependencies = featureSet(&[_]Feature{}),
10621477 };
1063 result[@enumToInt(Feature.v8a)] = .{
1064 .llvm_name = null,
1065 .description = "Support ARM v8a instructions",
1066 .dependencies = featureSet(&[_]Feature{
1067 .fp_armv8,
1068 .neon,
1069 }),
1070 };
10711478 result[@enumToInt(Feature.v8_1a)] = .{
10721479 .llvm_name = "v8.1a",
10731480 .description = "Support ARM v8.1a instructions",
......@@ -1078,7 +1485,6 @@ pub const all_features = blk: {
10781485 .pan,
10791486 .rdm,
10801487 .vh,
1081 .v8a,
10821488 }),
10831489 };
10841490 result[@enumToInt(Feature.v8_2a)] = .{
......@@ -1115,7 +1521,6 @@ pub const all_features = blk: {
11151521 .mpam,
11161522 .nv,
11171523 .pmu,
1118 .rasv8_4,
11191524 .rcpc_immo,
11201525 .sel2,
11211526 .tlb_rmi,
......@@ -1146,14 +1551,52 @@ pub const all_features = blk: {
11461551 .bf16,
11471552 .ecv,
11481553 .fgt,
1149 .i8mm,
1554 ._i8mm,
11501555 .v8_5a,
11511556 }),
11521557 };
1558 result[@enumToInt(Feature.v8r)] = .{
1559 .llvm_name = "v8r",
1560 .description = "Support ARM v8r instructions",
1561 .dependencies = featureSet(&[_]Feature{
1562 .CONTEXTIDREL2,
1563 .ccidx,
1564 .ccpp,
1565 .complxnum,
1566 .crc,
1567 .dit,
1568 .dotprod,
1569 .fmi,
1570 .fp16fml,
1571 .fullfp16,
1572 .jsconv,
1573 .lse,
1574 .pa,
1575 .pan,
1576 .pan_rwv,
1577 .perfmon,
1578 .predres,
1579 .ras,
1580 .rcpc,
1581 .rcpc_immo,
1582 .rdm,
1583 .sb,
1584 .sel2,
1585 .sha3,
1586 .sm4,
1587 .specrestrict,
1588 .ssbs,
1589 .tlb_rmi,
1590 .tracev8_4,
1591 .uaops,
1592 }),
1593 };
11531594 result[@enumToInt(Feature.vh)] = .{
11541595 .llvm_name = "vh",
11551596 .description = "Enables ARM v8.1 Virtual Host extension",
1156 .dependencies = featureSet(&[_]Feature{}),
1597 .dependencies = featureSet(&[_]Feature{
1598 .CONTEXTIDREL2,
1599 }),
11571600 };
11581601 result[@enumToInt(Feature.zcm)] = .{
11591602 .llvm_name = "zcm",
......@@ -1196,15 +1639,7 @@ pub const cpu = struct {
11961639 .name = "a64fx",
11971640 .llvm_name = "a64fx",
11981641 .features = featureSet(&[_]Feature{
1199 .complxnum,
1200 .fp_armv8,
1201 .fullfp16,
1202 .neon,
1203 .perfmon,
1204 .sha2,
1205 .sve,
1206 .use_postra_scheduler,
1207 .v8_2a,
1642 .a64fx,
12081643 }),
12091644 };
12101645 pub const apple_a10 = CpuModel{
......@@ -1281,68 +1716,42 @@ pub const cpu = struct {
12811716 .name = "carmel",
12821717 .llvm_name = "carmel",
12831718 .features = featureSet(&[_]Feature{
1284 .crypto,
1285 .fullfp16,
1286 .neon,
1287 .v8_2a,
1719 .carmel,
12881720 }),
12891721 };
12901722 pub const cortex_a34 = CpuModel{
12911723 .name = "cortex_a34",
12921724 .llvm_name = "cortex-a34",
12931725 .features = featureSet(&[_]Feature{
1294 .a34,
1726 .a35,
12951727 }),
12961728 };
12971729 pub const cortex_a35 = CpuModel{
12981730 .name = "cortex_a35",
12991731 .llvm_name = "cortex-a35",
13001732 .features = featureSet(&[_]Feature{
1301 .a34,
1733 .a35,
13021734 }),
13031735 };
13041736 pub const cortex_a53 = CpuModel{
13051737 .name = "cortex_a53",
13061738 .llvm_name = "cortex-a53",
13071739 .features = featureSet(&[_]Feature{
1308 .balance_fp_ops,
1309 .crc,
1310 .crypto,
1311 .custom_cheap_as_move,
1312 .fuse_aes,
1313 .perfmon,
1314 .use_aa,
1315 .use_postra_scheduler,
1316 .v8a,
1740 .a53,
13171741 }),
13181742 };
13191743 pub const cortex_a55 = CpuModel{
13201744 .name = "cortex_a55",
13211745 .llvm_name = "cortex-a55",
13221746 .features = featureSet(&[_]Feature{
1323 .crypto,
1324 .dotprod,
1325 .fullfp16,
1326 .fuse_aes,
1327 .perfmon,
1328 .rcpc,
1329 .v8_2a,
1747 .a55,
13301748 }),
13311749 };
13321750 pub const cortex_a57 = CpuModel{
13331751 .name = "cortex_a57",
13341752 .llvm_name = "cortex-a57",
13351753 .features = featureSet(&[_]Feature{
1336 .balance_fp_ops,
1337 .crc,
1338 .crypto,
1339 .custom_cheap_as_move,
1340 .fuse_aes,
1341 .fuse_literals,
1342 .perfmon,
1343 .predictable_select_expensive,
1344 .use_postra_scheduler,
1345 .v8a,
1754 .a57,
13461755 }),
13471756 };
13481757 pub const cortex_a65 = CpuModel{
......@@ -1363,35 +1772,21 @@ pub const cpu = struct {
13631772 .name = "cortex_a72",
13641773 .llvm_name = "cortex-a72",
13651774 .features = featureSet(&[_]Feature{
1366 .crc,
1367 .crypto,
1368 .fuse_aes,
1369 .perfmon,
1370 .v8a,
1775 .a72,
13711776 }),
13721777 };
13731778 pub const cortex_a73 = CpuModel{
13741779 .name = "cortex_a73",
13751780 .llvm_name = "cortex-a73",
13761781 .features = featureSet(&[_]Feature{
1377 .crc,
1378 .crypto,
1379 .fuse_aes,
1380 .perfmon,
1381 .v8a,
1782 .a73,
13821783 }),
13831784 };
13841785 pub const cortex_a75 = CpuModel{
13851786 .name = "cortex_a75",
13861787 .llvm_name = "cortex-a75",
13871788 .features = featureSet(&[_]Feature{
1388 .crypto,
1389 .dotprod,
1390 .fullfp16,
1391 .fuse_aes,
1392 .perfmon,
1393 .rcpc,
1394 .v8_2a,
1789 .a75,
13951790 }),
13961791 };
13971792 pub const cortex_a76 = CpuModel{
......@@ -1412,48 +1807,28 @@ pub const cpu = struct {
14121807 .name = "cortex_a77",
14131808 .llvm_name = "cortex-a77",
14141809 .features = featureSet(&[_]Feature{
1415 .crypto,
1416 .dotprod,
1417 .fp_armv8,
1418 .fullfp16,
1419 .neon,
1420 .rcpc,
1421 .v8_2a,
1810 .a77,
14221811 }),
14231812 };
14241813 pub const cortex_a78 = CpuModel{
14251814 .name = "cortex_a78",
14261815 .llvm_name = "cortex-a78",
14271816 .features = featureSet(&[_]Feature{
1428 .crypto,
1429 .dotprod,
1430 .fp_armv8,
1431 .fullfp16,
1432 .fuse_aes,
1433 .neon,
1434 .perfmon,
1435 .rcpc,
1436 .spe,
1437 .ssbs,
1438 .use_postra_scheduler,
1439 .v8_2a,
1817 .cortex_a78,
1818 }),
1819 };
1820 pub const cortex_r82 = CpuModel{
1821 .name = "cortex_r82",
1822 .llvm_name = "cortex-r82",
1823 .features = featureSet(&[_]Feature{
1824 .cortex_r82,
14401825 }),
14411826 };
14421827 pub const cortex_x1 = CpuModel{
14431828 .name = "cortex_x1",
14441829 .llvm_name = "cortex-x1",
14451830 .features = featureSet(&[_]Feature{
1446 .crypto,
1447 .dotprod,
1448 .fp_armv8,
1449 .fullfp16,
1450 .fuse_aes,
1451 .neon,
1452 .perfmon,
1453 .rcpc,
1454 .spe,
1455 .use_postra_scheduler,
1456 .v8_2a,
1831 .cortex_x1,
14571832 }),
14581833 };
14591834 pub const cyclone = CpuModel{
......@@ -1463,59 +1838,11 @@ pub const cpu = struct {
14631838 .apple_a7,
14641839 }),
14651840 };
1466 pub const exynos_m1 = CpuModel{
1467 .name = "exynos_m1",
1468 .llvm_name = null,
1469 .features = featureSet(&[_]Feature{
1470 .crc,
1471 .crypto,
1472 .exynos_cheap_as_move,
1473 .force_32bit_jump_tables,
1474 .fuse_aes,
1475 .perfmon,
1476 .slow_misaligned_128store,
1477 .slow_paired_128,
1478 .use_postra_scheduler,
1479 .use_reciprocal_square_root,
1480 .v8a,
1481 .zcz_fp,
1482 }),
1483 };
1484 pub const exynos_m2 = CpuModel{
1485 .name = "exynos_m2",
1486 .llvm_name = null,
1487 .features = featureSet(&[_]Feature{
1488 .crc,
1489 .crypto,
1490 .exynos_cheap_as_move,
1491 .force_32bit_jump_tables,
1492 .fuse_aes,
1493 .perfmon,
1494 .slow_misaligned_128store,
1495 .slow_paired_128,
1496 .use_postra_scheduler,
1497 .v8a,
1498 .zcz_fp,
1499 }),
1500 };
15011841 pub const exynos_m3 = CpuModel{
15021842 .name = "exynos_m3",
15031843 .llvm_name = "exynos-m3",
15041844 .features = featureSet(&[_]Feature{
1505 .crc,
1506 .crypto,
1507 .exynos_cheap_as_move,
1508 .force_32bit_jump_tables,
1509 .fuse_address,
1510 .fuse_aes,
1511 .fuse_csel,
1512 .fuse_literals,
1513 .lsl_fast,
1514 .perfmon,
1515 .predictable_select_expensive,
1516 .use_postra_scheduler,
1517 .v8a,
1518 .zcz_fp,
1845 .exynosm3,
15191846 }),
15201847 };
15211848 pub const exynos_m4 = CpuModel{
......@@ -1536,17 +1863,7 @@ pub const cpu = struct {
15361863 .name = "falkor",
15371864 .llvm_name = "falkor",
15381865 .features = featureSet(&[_]Feature{
1539 .crc,
1540 .crypto,
1541 .custom_cheap_as_move,
1542 .lsl_fast,
1543 .perfmon,
1544 .predictable_select_expensive,
1545 .rdm,
1546 .slow_strqro_store,
1547 .use_postra_scheduler,
1548 .v8a,
1549 .zcz,
1866 .falkor,
15501867 }),
15511868 };
15521869 pub const generic = CpuModel{
......@@ -1554,25 +1871,18 @@ pub const cpu = struct {
15541871 .llvm_name = "generic",
15551872 .features = featureSet(&[_]Feature{
15561873 .ete,
1874 .fp_armv8,
15571875 .fuse_aes,
1876 .neon,
15581877 .perfmon,
15591878 .use_postra_scheduler,
1560 .v8a,
15611879 }),
15621880 };
15631881 pub const kryo = CpuModel{
15641882 .name = "kryo",
15651883 .llvm_name = "kryo",
15661884 .features = featureSet(&[_]Feature{
1567 .crc,
1568 .crypto,
1569 .custom_cheap_as_move,
1570 .lsl_fast,
1571 .perfmon,
1572 .predictable_select_expensive,
1573 .use_postra_scheduler,
1574 .zcz,
1575 .v8a,
1885 .kryo,
15761886 }),
15771887 };
15781888 pub const neoverse_e1 = CpuModel{
......@@ -1589,118 +1899,74 @@ pub const cpu = struct {
15891899 .neoversen1,
15901900 }),
15911901 };
1902 pub const neoverse_n2 = CpuModel{
1903 .name = "neoverse_n2",
1904 .llvm_name = "neoverse-n2",
1905 .features = featureSet(&[_]Feature{
1906 .neoversen2,
1907 }),
1908 };
1909 pub const neoverse_v1 = CpuModel{
1910 .name = "neoverse_v1",
1911 .llvm_name = "neoverse-v1",
1912 .features = featureSet(&[_]Feature{
1913 .neoversev1,
1914 }),
1915 };
15921916 pub const saphira = CpuModel{
15931917 .name = "saphira",
15941918 .llvm_name = "saphira",
15951919 .features = featureSet(&[_]Feature{
1596 .crypto,
1597 .custom_cheap_as_move,
1598 .lsl_fast,
1599 .perfmon,
1600 .predictable_select_expensive,
1601 .spe,
1602 .use_postra_scheduler,
1603 .v8_4a,
1604 .zcz,
1920 .saphira,
16051921 }),
16061922 };
16071923 pub const thunderx = CpuModel{
16081924 .name = "thunderx",
16091925 .llvm_name = "thunderx",
16101926 .features = featureSet(&[_]Feature{
1611 .crc,
1612 .crypto,
1613 .perfmon,
1614 .predictable_select_expensive,
1615 .use_postra_scheduler,
1616 .v8a,
1927 .thunderx,
16171928 }),
16181929 };
16191930 pub const thunderx2t99 = CpuModel{
16201931 .name = "thunderx2t99",
16211932 .llvm_name = "thunderx2t99",
16221933 .features = featureSet(&[_]Feature{
1623 .aggressive_fma,
1624 .arith_bcc_fusion,
1625 .crc,
1626 .crypto,
1627 .lse,
1628 .predictable_select_expensive,
1629 .use_postra_scheduler,
1630 .v8_1a,
1934 .thunderx2t99,
16311935 }),
16321936 };
16331937 pub const thunderx3t110 = CpuModel{
16341938 .name = "thunderx3t110",
16351939 .llvm_name = "thunderx3t110",
16361940 .features = featureSet(&[_]Feature{
1637 .aggressive_fma,
1638 .arith_bcc_fusion,
1639 .balance_fp_ops,
1640 .crc,
1641 .crypto,
1642 .fp_armv8,
1643 .lse,
1644 .neon,
1645 .pa,
1646 .perfmon,
1647 .predictable_select_expensive,
1648 .strict_align,
1649 .use_aa,
1650 .use_postra_scheduler,
1651 .v8_3a,
1941 .thunderx3t110,
16521942 }),
16531943 };
16541944 pub const thunderxt81 = CpuModel{
16551945 .name = "thunderxt81",
16561946 .llvm_name = "thunderxt81",
16571947 .features = featureSet(&[_]Feature{
1658 .crc,
1659 .crypto,
1660 .perfmon,
1661 .predictable_select_expensive,
1662 .use_postra_scheduler,
1663 .v8a,
1948 .thunderxt81,
16641949 }),
16651950 };
16661951 pub const thunderxt83 = CpuModel{
16671952 .name = "thunderxt83",
16681953 .llvm_name = "thunderxt83",
16691954 .features = featureSet(&[_]Feature{
1670 .crc,
1671 .crypto,
1672 .perfmon,
1673 .predictable_select_expensive,
1674 .use_postra_scheduler,
1675 .v8a,
1955 .thunderxt83,
16761956 }),
16771957 };
16781958 pub const thunderxt88 = CpuModel{
16791959 .name = "thunderxt88",
16801960 .llvm_name = "thunderxt88",
16811961 .features = featureSet(&[_]Feature{
1682 .crc,
1683 .crypto,
1684 .perfmon,
1685 .predictable_select_expensive,
1686 .use_postra_scheduler,
1687 .v8a,
1962 .thunderxt88,
16881963 }),
16891964 };
16901965 pub const tsv110 = CpuModel{
16911966 .name = "tsv110",
16921967 .llvm_name = "tsv110",
16931968 .features = featureSet(&[_]Feature{
1694 .crypto,
1695 .custom_cheap_as_move,
1696 .dotprod,
1697 .fp16fml,
1698 .fullfp16,
1699 .fuse_aes,
1700 .perfmon,
1701 .spe,
1702 .use_postra_scheduler,
1703 .v8_2a,
1969 .tsv110,
17041970 }),
17051971 };
17061972};
lib/std/target/amdgpu.zig+149-46
......@@ -16,7 +16,6 @@ pub const Feature = enum {
1616 atomic_fadd_insts,
1717 auto_waitcnt_before_barrier,
1818 ci_insts,
19 code_object_v3,
2019 cumode,
2120 dl_insts,
2221 dot1_insts,
......@@ -54,6 +53,8 @@ pub const Feature = enum {
5453 gfx9,
5554 gfx9_insts,
5655 half_rate_64_ops,
56 image_gather4_d16_bug,
57 image_store_d16_bug,
5758 inst_fwd_prefetch_bug,
5859 int_clamp_insts,
5960 inv_2pi_inline_imm,
......@@ -104,7 +105,9 @@ pub const Feature = enum {
104105 sram_ecc,
105106 trap_handler,
106107 trig_reduced_range,
108 unaligned_access_mode,
107109 unaligned_buffer_access,
110 unaligned_ds_access,
108111 unaligned_scratch_access,
109112 unpacked_d16_vmem,
110113 unsafe_ds_offset_folding,
......@@ -125,6 +128,7 @@ pub const Feature = enum {
125128pub usingnamespace CpuFeature.feature_set_fns(Feature);
126129
127130pub const all_features = blk: {
131 @setEvalBranchQuota(10000);
128132 const len = @typeInfo(Feature).Enum.fields.len;
129133 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
130134 var result: [len]CpuFeature = undefined;
......@@ -170,11 +174,6 @@ pub const all_features = blk: {
170174 .description = "Additional instructions for CI+",
171175 .dependencies = featureSet(&[_]Feature{}),
172176 };
173 result[@enumToInt(Feature.code_object_v3)] = .{
174 .llvm_name = "code-object-v3",
175 .description = "Generate code object version 3",
176 .dependencies = featureSet(&[_]Feature{}),
177 };
178177 result[@enumToInt(Feature.cumode)] = .{
179178 .llvm_name = "cumode",
180179 .description = "Enable CU wavefront execution mode",
......@@ -353,6 +352,8 @@ pub const all_features = blk: {
353352 .sdwa_omod,
354353 .sdwa_scalar,
355354 .sdwa_sdst,
355 .unaligned_buffer_access,
356 .unaligned_ds_access,
356357 .vop3_literal,
357358 .vop3p,
358359 .vscnt,
......@@ -418,6 +419,8 @@ pub const all_features = blk: {
418419 .sdwa_omod,
419420 .sdwa_scalar,
420421 .sdwa_sdst,
422 .unaligned_buffer_access,
423 .unaligned_ds_access,
421424 .vgpr_index_mode,
422425 .vop3p,
423426 .wavefrontsize64,
......@@ -433,6 +436,16 @@ pub const all_features = blk: {
433436 .description = "Most fp64 instructions are half rate instead of quarter",
434437 .dependencies = featureSet(&[_]Feature{}),
435438 };
439 result[@enumToInt(Feature.image_gather4_d16_bug)] = .{
440 .llvm_name = "image-gather4-d16-bug",
441 .description = "Image Gather4 D16 hardware bug",
442 .dependencies = featureSet(&[_]Feature{}),
443 };
444 result[@enumToInt(Feature.image_store_d16_bug)] = .{
445 .llvm_name = "image-store-d16-bug",
446 .description = "Image Store D16 hardware bug",
447 .dependencies = featureSet(&[_]Feature{}),
448 };
436449 result[@enumToInt(Feature.inst_fwd_prefetch_bug)] = .{
437450 .llvm_name = "inst-fwd-prefetch-bug",
438451 .description = "S_INST_PREFETCH instruction causes shader to hang",
......@@ -455,7 +468,7 @@ pub const all_features = blk: {
455468 };
456469 result[@enumToInt(Feature.lds_misaligned_bug)] = .{
457470 .llvm_name = "lds-misaligned-bug",
458 .description = "Some GFX10 bug with misaligned multi-dword LDS access in WGP mode",
471 .description = "Some GFX10 bug with multi-dword LDS and flat access that is not naturally aligned in WGP mode",
459472 .dependencies = featureSet(&[_]Feature{}),
460473 };
461474 result[@enumToInt(Feature.ldsbankcount16)] = .{
......@@ -659,6 +672,7 @@ pub const all_features = blk: {
659672 .no_sram_ecc_support,
660673 .s_memtime_inst,
661674 .trig_reduced_range,
675 .unaligned_buffer_access,
662676 .wavefrontsize64,
663677 }),
664678 };
......@@ -710,9 +724,19 @@ pub const all_features = blk: {
710724 .description = "Requires use of fract on arguments to trig instructions",
711725 .dependencies = featureSet(&[_]Feature{}),
712726 };
727 result[@enumToInt(Feature.unaligned_access_mode)] = .{
728 .llvm_name = "unaligned-access-mode",
729 .description = "Enable unaligned global, local and region loads and stores if the hardware supports it",
730 .dependencies = featureSet(&[_]Feature{}),
731 };
713732 result[@enumToInt(Feature.unaligned_buffer_access)] = .{
714733 .llvm_name = "unaligned-buffer-access",
715 .description = "Support unaligned global loads and stores",
734 .description = "Hardware supports unaligned global loads and stores",
735 .dependencies = featureSet(&[_]Feature{}),
736 };
737 result[@enumToInt(Feature.unaligned_ds_access)] = .{
738 .llvm_name = "unaligned-ds-access",
739 .description = "Hardware supports unaligned local and region loads and stores",
716740 .dependencies = featureSet(&[_]Feature{}),
717741 };
718742 result[@enumToInt(Feature.unaligned_scratch_access)] = .{
......@@ -778,6 +802,7 @@ pub const all_features = blk: {
778802 .sdwa_mav,
779803 .sdwa_out_mods_vopc,
780804 .trig_reduced_range,
805 .unaligned_buffer_access,
781806 .vgpr_index_mode,
782807 .wavefrontsize64,
783808 }),
......@@ -830,7 +855,6 @@ pub const cpu = struct {
830855 .name = "bonaire",
831856 .llvm_name = "bonaire",
832857 .features = featureSet(&[_]Feature{
833 .code_object_v3,
834858 .ldsbankcount32,
835859 .no_xnack_support,
836860 .sea_islands,
......@@ -840,7 +864,6 @@ pub const cpu = struct {
840864 .name = "carrizo",
841865 .llvm_name = "carrizo",
842866 .features = featureSet(&[_]Feature{
843 .code_object_v3,
844867 .fast_fmaf,
845868 .half_rate_64_ops,
846869 .ldsbankcount32,
......@@ -853,7 +876,6 @@ pub const cpu = struct {
853876 .name = "fiji",
854877 .llvm_name = "fiji",
855878 .features = featureSet(&[_]Feature{
856 .code_object_v3,
857879 .ldsbankcount32,
858880 .no_xnack_support,
859881 .unpacked_d16_vmem,
......@@ -879,7 +901,6 @@ pub const cpu = struct {
879901 .name = "gfx1010",
880902 .llvm_name = "gfx1010",
881903 .features = featureSet(&[_]Feature{
882 .code_object_v3,
883904 .dl_insts,
884905 .ds_src2_insts,
885906 .flat_segment_offset_bug,
......@@ -909,7 +930,6 @@ pub const cpu = struct {
909930 .name = "gfx1011",
910931 .llvm_name = "gfx1011",
911932 .features = featureSet(&[_]Feature{
912 .code_object_v3,
913933 .dl_insts,
914934 .dot1_insts,
915935 .dot2_insts,
......@@ -921,6 +941,7 @@ pub const cpu = struct {
921941 .gfx10,
922942 .inst_fwd_prefetch_bug,
923943 .lds_branch_vmem_war_hazard,
944 .lds_misaligned_bug,
924945 .ldsbankcount32,
925946 .mad_mac_f32_insts,
926947 .no_xnack_support,
......@@ -942,7 +963,6 @@ pub const cpu = struct {
942963 .name = "gfx1012",
943964 .llvm_name = "gfx1012",
944965 .features = featureSet(&[_]Feature{
945 .code_object_v3,
946966 .dl_insts,
947967 .dot1_insts,
948968 .dot2_insts,
......@@ -976,7 +996,60 @@ pub const cpu = struct {
976996 .name = "gfx1030",
977997 .llvm_name = "gfx1030",
978998 .features = featureSet(&[_]Feature{
979 .code_object_v3,
999 .dl_insts,
1000 .dot1_insts,
1001 .dot2_insts,
1002 .dot5_insts,
1003 .dot6_insts,
1004 .gfx10,
1005 .gfx10_3_insts,
1006 .gfx10_b_encoding,
1007 .ldsbankcount32,
1008 .no_xnack_support,
1009 .nsa_encoding,
1010 .wavefrontsize32,
1011 }),
1012 };
1013 pub const gfx1031 = CpuModel{
1014 .name = "gfx1031",
1015 .llvm_name = "gfx1031",
1016 .features = featureSet(&[_]Feature{
1017 .dl_insts,
1018 .dot1_insts,
1019 .dot2_insts,
1020 .dot5_insts,
1021 .dot6_insts,
1022 .gfx10,
1023 .gfx10_3_insts,
1024 .gfx10_b_encoding,
1025 .ldsbankcount32,
1026 .no_xnack_support,
1027 .nsa_encoding,
1028 .wavefrontsize32,
1029 }),
1030 };
1031 pub const gfx1032 = CpuModel{
1032 .name = "gfx1032",
1033 .llvm_name = "gfx1032",
1034 .features = featureSet(&[_]Feature{
1035 .dl_insts,
1036 .dot1_insts,
1037 .dot2_insts,
1038 .dot5_insts,
1039 .dot6_insts,
1040 .gfx10,
1041 .gfx10_3_insts,
1042 .gfx10_b_encoding,
1043 .ldsbankcount32,
1044 .no_xnack_support,
1045 .nsa_encoding,
1046 .wavefrontsize32,
1047 }),
1048 };
1049 pub const gfx1033 = CpuModel{
1050 .name = "gfx1033",
1051 .llvm_name = "gfx1033",
1052 .features = featureSet(&[_]Feature{
9801053 .dl_insts,
9811054 .dot1_insts,
9821055 .dot2_insts,
......@@ -995,7 +1068,6 @@ pub const cpu = struct {
9951068 .name = "gfx600",
9961069 .llvm_name = "gfx600",
9971070 .features = featureSet(&[_]Feature{
998 .code_object_v3,
9991071 .fast_fmaf,
10001072 .half_rate_64_ops,
10011073 .ldsbankcount32,
......@@ -1007,7 +1079,15 @@ pub const cpu = struct {
10071079 .name = "gfx601",
10081080 .llvm_name = "gfx601",
10091081 .features = featureSet(&[_]Feature{
1010 .code_object_v3,
1082 .ldsbankcount32,
1083 .no_xnack_support,
1084 .southern_islands,
1085 }),
1086 };
1087 pub const gfx602 = CpuModel{
1088 .name = "gfx602",
1089 .llvm_name = "gfx602",
1090 .features = featureSet(&[_]Feature{
10111091 .ldsbankcount32,
10121092 .no_xnack_support,
10131093 .southern_islands,
......@@ -1017,7 +1097,6 @@ pub const cpu = struct {
10171097 .name = "gfx700",
10181098 .llvm_name = "gfx700",
10191099 .features = featureSet(&[_]Feature{
1020 .code_object_v3,
10211100 .ldsbankcount32,
10221101 .no_xnack_support,
10231102 .sea_islands,
......@@ -1027,7 +1106,6 @@ pub const cpu = struct {
10271106 .name = "gfx701",
10281107 .llvm_name = "gfx701",
10291108 .features = featureSet(&[_]Feature{
1030 .code_object_v3,
10311109 .fast_fmaf,
10321110 .half_rate_64_ops,
10331111 .ldsbankcount32,
......@@ -1039,7 +1117,6 @@ pub const cpu = struct {
10391117 .name = "gfx702",
10401118 .llvm_name = "gfx702",
10411119 .features = featureSet(&[_]Feature{
1042 .code_object_v3,
10431120 .fast_fmaf,
10441121 .ldsbankcount16,
10451122 .no_xnack_support,
......@@ -1050,7 +1127,6 @@ pub const cpu = struct {
10501127 .name = "gfx703",
10511128 .llvm_name = "gfx703",
10521129 .features = featureSet(&[_]Feature{
1053 .code_object_v3,
10541130 .ldsbankcount16,
10551131 .no_xnack_support,
10561132 .sea_islands,
......@@ -1060,17 +1136,24 @@ pub const cpu = struct {
10601136 .name = "gfx704",
10611137 .llvm_name = "gfx704",
10621138 .features = featureSet(&[_]Feature{
1063 .code_object_v3,
10641139 .ldsbankcount32,
10651140 .no_xnack_support,
10661141 .sea_islands,
10671142 }),
10681143 };
1144 pub const gfx705 = CpuModel{
1145 .name = "gfx705",
1146 .llvm_name = "gfx705",
1147 .features = featureSet(&[_]Feature{
1148 .ldsbankcount16,
1149 .no_xnack_support,
1150 .sea_islands,
1151 }),
1152 };
10691153 pub const gfx801 = CpuModel{
10701154 .name = "gfx801",
10711155 .llvm_name = "gfx801",
10721156 .features = featureSet(&[_]Feature{
1073 .code_object_v3,
10741157 .fast_fmaf,
10751158 .half_rate_64_ops,
10761159 .ldsbankcount32,
......@@ -1083,7 +1166,6 @@ pub const cpu = struct {
10831166 .name = "gfx802",
10841167 .llvm_name = "gfx802",
10851168 .features = featureSet(&[_]Feature{
1086 .code_object_v3,
10871169 .ldsbankcount32,
10881170 .no_xnack_support,
10891171 .sgpr_init_bug,
......@@ -1095,18 +1177,29 @@ pub const cpu = struct {
10951177 .name = "gfx803",
10961178 .llvm_name = "gfx803",
10971179 .features = featureSet(&[_]Feature{
1098 .code_object_v3,
10991180 .ldsbankcount32,
11001181 .no_xnack_support,
11011182 .unpacked_d16_vmem,
11021183 .volcanic_islands,
11031184 }),
11041185 };
1186 pub const gfx805 = CpuModel{
1187 .name = "gfx805",
1188 .llvm_name = "gfx805",
1189 .features = featureSet(&[_]Feature{
1190 .ldsbankcount32,
1191 .no_xnack_support,
1192 .sgpr_init_bug,
1193 .unpacked_d16_vmem,
1194 .volcanic_islands,
1195 }),
1196 };
11051197 pub const gfx810 = CpuModel{
11061198 .name = "gfx810",
11071199 .llvm_name = "gfx810",
11081200 .features = featureSet(&[_]Feature{
1109 .code_object_v3,
1201 .image_gather4_d16_bug,
1202 .image_store_d16_bug,
11101203 .ldsbankcount16,
11111204 .volcanic_islands,
11121205 .xnack,
......@@ -1116,8 +1209,8 @@ pub const cpu = struct {
11161209 .name = "gfx900",
11171210 .llvm_name = "gfx900",
11181211 .features = featureSet(&[_]Feature{
1119 .code_object_v3,
11201212 .gfx9,
1213 .image_gather4_d16_bug,
11211214 .ldsbankcount32,
11221215 .mad_mix_insts,
11231216 .no_sram_ecc_support,
......@@ -1128,8 +1221,8 @@ pub const cpu = struct {
11281221 .name = "gfx902",
11291222 .llvm_name = "gfx902",
11301223 .features = featureSet(&[_]Feature{
1131 .code_object_v3,
11321224 .gfx9,
1225 .image_gather4_d16_bug,
11331226 .ldsbankcount32,
11341227 .mad_mix_insts,
11351228 .no_sram_ecc_support,
......@@ -1140,9 +1233,9 @@ pub const cpu = struct {
11401233 .name = "gfx904",
11411234 .llvm_name = "gfx904",
11421235 .features = featureSet(&[_]Feature{
1143 .code_object_v3,
11441236 .fma_mix_insts,
11451237 .gfx9,
1238 .image_gather4_d16_bug,
11461239 .ldsbankcount32,
11471240 .no_sram_ecc_support,
11481241 .no_xnack_support,
......@@ -1152,13 +1245,13 @@ pub const cpu = struct {
11521245 .name = "gfx906",
11531246 .llvm_name = "gfx906",
11541247 .features = featureSet(&[_]Feature{
1155 .code_object_v3,
11561248 .dl_insts,
11571249 .dot1_insts,
11581250 .dot2_insts,
11591251 .fma_mix_insts,
11601252 .gfx9,
11611253 .half_rate_64_ops,
1254 .image_gather4_d16_bug,
11621255 .ldsbankcount32,
11631256 .no_xnack_support,
11641257 }),
......@@ -1168,7 +1261,6 @@ pub const cpu = struct {
11681261 .llvm_name = "gfx908",
11691262 .features = featureSet(&[_]Feature{
11701263 .atomic_fadd_insts,
1171 .code_object_v3,
11721264 .dl_insts,
11731265 .dot1_insts,
11741266 .dot2_insts,
......@@ -1179,6 +1271,7 @@ pub const cpu = struct {
11791271 .fma_mix_insts,
11801272 .gfx9,
11811273 .half_rate_64_ops,
1274 .image_gather4_d16_bug,
11821275 .ldsbankcount32,
11831276 .mai_insts,
11841277 .mfma_inline_literal_bug,
......@@ -1190,8 +1283,19 @@ pub const cpu = struct {
11901283 .name = "gfx909",
11911284 .llvm_name = "gfx909",
11921285 .features = featureSet(&[_]Feature{
1193 .code_object_v3,
11941286 .gfx9,
1287 .image_gather4_d16_bug,
1288 .ldsbankcount32,
1289 .mad_mix_insts,
1290 .xnack,
1291 }),
1292 };
1293 pub const gfx90c = CpuModel{
1294 .name = "gfx90c",
1295 .llvm_name = "gfx90c",
1296 .features = featureSet(&[_]Feature{
1297 .gfx9,
1298 .image_gather4_d16_bug,
11951299 .ldsbankcount32,
11961300 .mad_mix_insts,
11971301 .xnack,
......@@ -1201,7 +1305,6 @@ pub const cpu = struct {
12011305 .name = "hainan",
12021306 .llvm_name = "hainan",
12031307 .features = featureSet(&[_]Feature{
1204 .code_object_v3,
12051308 .ldsbankcount32,
12061309 .no_xnack_support,
12071310 .southern_islands,
......@@ -1211,7 +1314,6 @@ pub const cpu = struct {
12111314 .name = "hawaii",
12121315 .llvm_name = "hawaii",
12131316 .features = featureSet(&[_]Feature{
1214 .code_object_v3,
12151317 .fast_fmaf,
12161318 .half_rate_64_ops,
12171319 .ldsbankcount32,
......@@ -1223,7 +1325,6 @@ pub const cpu = struct {
12231325 .name = "iceland",
12241326 .llvm_name = "iceland",
12251327 .features = featureSet(&[_]Feature{
1226 .code_object_v3,
12271328 .ldsbankcount32,
12281329 .no_xnack_support,
12291330 .sgpr_init_bug,
......@@ -1235,7 +1336,6 @@ pub const cpu = struct {
12351336 .name = "kabini",
12361337 .llvm_name = "kabini",
12371338 .features = featureSet(&[_]Feature{
1238 .code_object_v3,
12391339 .ldsbankcount16,
12401340 .no_xnack_support,
12411341 .sea_islands,
......@@ -1245,7 +1345,6 @@ pub const cpu = struct {
12451345 .name = "kaveri",
12461346 .llvm_name = "kaveri",
12471347 .features = featureSet(&[_]Feature{
1248 .code_object_v3,
12491348 .ldsbankcount32,
12501349 .no_xnack_support,
12511350 .sea_islands,
......@@ -1255,7 +1354,6 @@ pub const cpu = struct {
12551354 .name = "mullins",
12561355 .llvm_name = "mullins",
12571356 .features = featureSet(&[_]Feature{
1258 .code_object_v3,
12591357 .ldsbankcount16,
12601358 .no_xnack_support,
12611359 .sea_islands,
......@@ -1265,7 +1363,6 @@ pub const cpu = struct {
12651363 .name = "oland",
12661364 .llvm_name = "oland",
12671365 .features = featureSet(&[_]Feature{
1268 .code_object_v3,
12691366 .ldsbankcount32,
12701367 .no_xnack_support,
12711368 .southern_islands,
......@@ -1275,7 +1372,6 @@ pub const cpu = struct {
12751372 .name = "pitcairn",
12761373 .llvm_name = "pitcairn",
12771374 .features = featureSet(&[_]Feature{
1278 .code_object_v3,
12791375 .ldsbankcount32,
12801376 .no_xnack_support,
12811377 .southern_islands,
......@@ -1285,7 +1381,6 @@ pub const cpu = struct {
12851381 .name = "polaris10",
12861382 .llvm_name = "polaris10",
12871383 .features = featureSet(&[_]Feature{
1288 .code_object_v3,
12891384 .ldsbankcount32,
12901385 .no_xnack_support,
12911386 .unpacked_d16_vmem,
......@@ -1296,7 +1391,6 @@ pub const cpu = struct {
12961391 .name = "polaris11",
12971392 .llvm_name = "polaris11",
12981393 .features = featureSet(&[_]Feature{
1299 .code_object_v3,
13001394 .ldsbankcount32,
13011395 .no_xnack_support,
13021396 .unpacked_d16_vmem,
......@@ -1307,7 +1401,8 @@ pub const cpu = struct {
13071401 .name = "stoney",
13081402 .llvm_name = "stoney",
13091403 .features = featureSet(&[_]Feature{
1310 .code_object_v3,
1404 .image_gather4_d16_bug,
1405 .image_store_d16_bug,
13111406 .ldsbankcount16,
13121407 .volcanic_islands,
13131408 .xnack,
......@@ -1317,7 +1412,6 @@ pub const cpu = struct {
13171412 .name = "tahiti",
13181413 .llvm_name = "tahiti",
13191414 .features = featureSet(&[_]Feature{
1320 .code_object_v3,
13211415 .fast_fmaf,
13221416 .half_rate_64_ops,
13231417 .ldsbankcount32,
......@@ -1329,7 +1423,17 @@ pub const cpu = struct {
13291423 .name = "tonga",
13301424 .llvm_name = "tonga",
13311425 .features = featureSet(&[_]Feature{
1332 .code_object_v3,
1426 .ldsbankcount32,
1427 .no_xnack_support,
1428 .sgpr_init_bug,
1429 .unpacked_d16_vmem,
1430 .volcanic_islands,
1431 }),
1432 };
1433 pub const tongapro = CpuModel{
1434 .name = "tongapro",
1435 .llvm_name = "tongapro",
1436 .features = featureSet(&[_]Feature{
13331437 .ldsbankcount32,
13341438 .no_xnack_support,
13351439 .sgpr_init_bug,
......@@ -1341,7 +1445,6 @@ pub const cpu = struct {
13411445 .name = "verde",
13421446 .llvm_name = "verde",
13431447 .features = featureSet(&[_]Feature{
1344 .code_object_v3,
13451448 .ldsbankcount32,
13461449 .no_xnack_support,
13471450 .southern_islands,
lib/std/target/arm.zig+831-677
......@@ -10,10 +10,60 @@ const CpuModel = std.Target.Cpu.Model;
1010pub const Feature = enum {
1111 @"32bit",
1212 @"8msecext",
13 a12,
14 a15,
15 a17,
16 a32,
17 a35,
18 a5,
19 a53,
20 a55,
21 a57,
22 a7,
23 a72,
24 a73,
25 a75,
1326 a76,
27 a77,
28 a8,
29 a9,
1430 aclass,
1531 acquire_release,
1632 aes,
33 armv2,
34 armv2a,
35 armv3,
36 armv3m,
37 armv4,
38 armv4t,
39 armv5t,
40 armv5te,
41 armv5tej,
42 armv6,
43 armv6_m,
44 armv6j,
45 armv6k,
46 armv6kz,
47 armv6s_m,
48 armv6t2,
49 armv7_a,
50 armv7_m,
51 armv7_r,
52 armv7e_m,
53 armv7k,
54 armv7s,
55 armv7ve,
56 armv8_a,
57 armv8_m_base,
58 armv8_m_main,
59 armv8_r,
60 armv8_1_a,
61 armv8_1_m_main,
62 armv8_2_a,
63 armv8_3_a,
64 armv8_4_a,
65 armv8_5_a,
66 armv8_6_a,
1767 avoid_movs_shop,
1868 avoid_partial_cpsr,
1969 bf16,
......@@ -27,6 +77,8 @@ pub const Feature = enum {
2777 cdecp6,
2878 cdecp7,
2979 cheap_predicable_cpsr,
80 cortex_a78,
81 cortex_x1,
3082 crc,
3183 crypto,
3284 d32,
......@@ -39,13 +91,13 @@ pub const Feature = enum {
3991 execute_only,
4092 expand_fp_mlx,
4193 exynos,
42 fp16,
43 fp16fml,
44 fp64,
4594 fp_armv8,
4695 fp_armv8d16,
4796 fp_armv8d16sp,
4897 fp_armv8sp,
98 fp16,
99 fp16fml,
100 fp64,
49101 fpao,
50102 fpregs,
51103 fpregs16,
......@@ -53,30 +105,13 @@ pub const Feature = enum {
53105 fullfp16,
54106 fuse_aes,
55107 fuse_literals,
56 has_v4t,
57 has_v5t,
58 has_v5te,
59 has_v6,
60 has_v6k,
61 has_v6m,
62 has_v6t2,
63 has_v7,
64 has_v7clrex,
65 has_v8_1a,
66 has_v8_1m_main,
67 has_v8_2a,
68 has_v8_3a,
69 has_v8_4a,
70 has_v8_5a,
71 has_v8_6a,
72 has_v8,
73 has_v8m,
74 has_v8m_main,
75108 hwdiv,
76109 hwdiv_arm,
77 i8mm,
110 _i8mm,
78111 iwmmxt,
79112 iwmmxt2,
113 krait,
114 kryo,
80115 lob,
81116 long_calls,
82117 loop_align,
......@@ -93,6 +128,7 @@ pub const Feature = enum {
93128 neon,
94129 neon_fpmovs,
95130 neonfp,
131 neoverse_v1,
96132 no_branch_predictor,
97133 no_movt,
98134 no_neg_immediates,
......@@ -103,6 +139,9 @@ pub const Feature = enum {
103139 prefer_vmovsr,
104140 prof_unpr,
105141 r4,
142 r5,
143 r52,
144 r7,
106145 ras,
107146 rclass,
108147 read_tp_hard,
......@@ -121,37 +160,20 @@ pub const Feature = enum {
121160 splat_vfp_neon,
122161 strict_align,
123162 swift,
124 thumb2,
125163 thumb_mode,
164 thumb2,
126165 trustzone,
127166 use_misched,
128 v2,
129 v2a,
130 v3,
131 v3m,
132 v4,
133167 v4t,
134168 v5t,
135169 v5te,
136 v5tej,
137170 v6,
138 v6j,
139171 v6k,
140 v6kz,
141172 v6m,
142 v6sm,
143173 v6t2,
144 v7a,
145 v7em,
146 v7k,
147 v7m,
148 v7r,
149 v7s,
150 v7ve,
151 v8a,
152 v8m,
153 v8m_main,
154 v8r,
174 v7,
175 v7clrex,
176 v8,
155177 v8_1a,
156178 v8_1m_main,
157179 v8_2a,
......@@ -159,6 +181,8 @@ pub const Feature = enum {
159181 v8_4a,
160182 v8_5a,
161183 v8_6a,
184 v8m,
185 v8m_main,
162186 vfp2,
163187 vfp2sp,
164188 vfp3,
......@@ -195,11 +219,91 @@ pub const all_features = blk: {
195219 .description = "Enable support for ARMv8-M Security Extensions",
196220 .dependencies = featureSet(&[_]Feature{}),
197221 };
222 result[@enumToInt(Feature.a12)] = .{
223 .llvm_name = "a12",
224 .description = "Cortex-A12 ARM processors",
225 .dependencies = featureSet(&[_]Feature{}),
226 };
227 result[@enumToInt(Feature.a15)] = .{
228 .llvm_name = "a15",
229 .description = "Cortex-A15 ARM processors",
230 .dependencies = featureSet(&[_]Feature{}),
231 };
232 result[@enumToInt(Feature.a17)] = .{
233 .llvm_name = "a17",
234 .description = "Cortex-A17 ARM processors",
235 .dependencies = featureSet(&[_]Feature{}),
236 };
237 result[@enumToInt(Feature.a32)] = .{
238 .llvm_name = "a32",
239 .description = "Cortex-A32 ARM processors",
240 .dependencies = featureSet(&[_]Feature{}),
241 };
242 result[@enumToInt(Feature.a35)] = .{
243 .llvm_name = "a35",
244 .description = "Cortex-A35 ARM processors",
245 .dependencies = featureSet(&[_]Feature{}),
246 };
247 result[@enumToInt(Feature.a5)] = .{
248 .llvm_name = "a5",
249 .description = "Cortex-A5 ARM processors",
250 .dependencies = featureSet(&[_]Feature{}),
251 };
252 result[@enumToInt(Feature.a53)] = .{
253 .llvm_name = "a53",
254 .description = "Cortex-A53 ARM processors",
255 .dependencies = featureSet(&[_]Feature{}),
256 };
257 result[@enumToInt(Feature.a55)] = .{
258 .llvm_name = "a55",
259 .description = "Cortex-A55 ARM processors",
260 .dependencies = featureSet(&[_]Feature{}),
261 };
262 result[@enumToInt(Feature.a57)] = .{
263 .llvm_name = "a57",
264 .description = "Cortex-A57 ARM processors",
265 .dependencies = featureSet(&[_]Feature{}),
266 };
267 result[@enumToInt(Feature.a7)] = .{
268 .llvm_name = "a7",
269 .description = "Cortex-A7 ARM processors",
270 .dependencies = featureSet(&[_]Feature{}),
271 };
272 result[@enumToInt(Feature.a72)] = .{
273 .llvm_name = "a72",
274 .description = "Cortex-A72 ARM processors",
275 .dependencies = featureSet(&[_]Feature{}),
276 };
277 result[@enumToInt(Feature.a73)] = .{
278 .llvm_name = "a73",
279 .description = "Cortex-A73 ARM processors",
280 .dependencies = featureSet(&[_]Feature{}),
281 };
282 result[@enumToInt(Feature.a75)] = .{
283 .llvm_name = "a75",
284 .description = "Cortex-A75 ARM processors",
285 .dependencies = featureSet(&[_]Feature{}),
286 };
198287 result[@enumToInt(Feature.a76)] = .{
199288 .llvm_name = "a76",
200289 .description = "Cortex-A76 ARM processors",
201290 .dependencies = featureSet(&[_]Feature{}),
202291 };
292 result[@enumToInt(Feature.a77)] = .{
293 .llvm_name = "a77",
294 .description = "Cortex-A77 ARM processors",
295 .dependencies = featureSet(&[_]Feature{}),
296 };
297 result[@enumToInt(Feature.a8)] = .{
298 .llvm_name = "a8",
299 .description = "Cortex-A8 ARM processors",
300 .dependencies = featureSet(&[_]Feature{}),
301 };
302 result[@enumToInt(Feature.a9)] = .{
303 .llvm_name = "a9",
304 .description = "Cortex-A9 ARM processors",
305 .dependencies = featureSet(&[_]Feature{}),
306 };
203307 result[@enumToInt(Feature.aclass)] = .{
204308 .llvm_name = "aclass",
205309 .description = "Is application profile ('A' series)",
......@@ -217,6 +321,387 @@ pub const all_features = blk: {
217321 .neon,
218322 }),
219323 };
324 result[@enumToInt(Feature.armv2)] = .{
325 .llvm_name = "armv2",
326 .description = "ARMv2 architecture",
327 .dependencies = featureSet(&[_]Feature{}),
328 };
329 result[@enumToInt(Feature.armv2a)] = .{
330 .llvm_name = "armv2a",
331 .description = "ARMv2a architecture",
332 .dependencies = featureSet(&[_]Feature{}),
333 };
334 result[@enumToInt(Feature.armv3)] = .{
335 .llvm_name = "armv3",
336 .description = "ARMv3 architecture",
337 .dependencies = featureSet(&[_]Feature{}),
338 };
339 result[@enumToInt(Feature.armv3m)] = .{
340 .llvm_name = "armv3m",
341 .description = "ARMv3m architecture",
342 .dependencies = featureSet(&[_]Feature{}),
343 };
344 result[@enumToInt(Feature.armv4)] = .{
345 .llvm_name = "armv4",
346 .description = "ARMv4 architecture",
347 .dependencies = featureSet(&[_]Feature{}),
348 };
349 result[@enumToInt(Feature.armv4t)] = .{
350 .llvm_name = "armv4t",
351 .description = "ARMv4t architecture",
352 .dependencies = featureSet(&[_]Feature{
353 .v4t,
354 }),
355 };
356 result[@enumToInt(Feature.armv5t)] = .{
357 .llvm_name = "armv5t",
358 .description = "ARMv5t architecture",
359 .dependencies = featureSet(&[_]Feature{
360 .v5t,
361 }),
362 };
363 result[@enumToInt(Feature.armv5te)] = .{
364 .llvm_name = "armv5te",
365 .description = "ARMv5te architecture",
366 .dependencies = featureSet(&[_]Feature{
367 .v5te,
368 }),
369 };
370 result[@enumToInt(Feature.armv5tej)] = .{
371 .llvm_name = "armv5tej",
372 .description = "ARMv5tej architecture",
373 .dependencies = featureSet(&[_]Feature{
374 .v5te,
375 }),
376 };
377 result[@enumToInt(Feature.armv6)] = .{
378 .llvm_name = "armv6",
379 .description = "ARMv6 architecture",
380 .dependencies = featureSet(&[_]Feature{
381 .dsp,
382 .v6,
383 }),
384 };
385 result[@enumToInt(Feature.armv6_m)] = .{
386 .llvm_name = "armv6-m",
387 .description = "ARMv6m architecture",
388 .dependencies = featureSet(&[_]Feature{
389 .db,
390 .mclass,
391 .noarm,
392 .strict_align,
393 .thumb_mode,
394 .v6m,
395 }),
396 };
397 result[@enumToInt(Feature.armv6j)] = .{
398 .llvm_name = "armv6j",
399 .description = "ARMv7a architecture",
400 .dependencies = featureSet(&[_]Feature{
401 .armv6,
402 }),
403 };
404 result[@enumToInt(Feature.armv6k)] = .{
405 .llvm_name = "armv6k",
406 .description = "ARMv6k architecture",
407 .dependencies = featureSet(&[_]Feature{
408 .v6k,
409 }),
410 };
411 result[@enumToInt(Feature.armv6kz)] = .{
412 .llvm_name = "armv6kz",
413 .description = "ARMv6kz architecture",
414 .dependencies = featureSet(&[_]Feature{
415 .trustzone,
416 .v6k,
417 }),
418 };
419 result[@enumToInt(Feature.armv6s_m)] = .{
420 .llvm_name = "armv6s-m",
421 .description = "ARMv6sm architecture",
422 .dependencies = featureSet(&[_]Feature{
423 .db,
424 .mclass,
425 .noarm,
426 .strict_align,
427 .thumb_mode,
428 .v6m,
429 }),
430 };
431 result[@enumToInt(Feature.armv6t2)] = .{
432 .llvm_name = "armv6t2",
433 .description = "ARMv6t2 architecture",
434 .dependencies = featureSet(&[_]Feature{
435 .dsp,
436 .v6t2,
437 }),
438 };
439 result[@enumToInt(Feature.armv7_a)] = .{
440 .llvm_name = "armv7-a",
441 .description = "ARMv7a architecture",
442 .dependencies = featureSet(&[_]Feature{
443 .aclass,
444 .db,
445 .dsp,
446 .neon,
447 .v7,
448 }),
449 };
450 result[@enumToInt(Feature.armv7_m)] = .{
451 .llvm_name = "armv7-m",
452 .description = "ARMv7m architecture",
453 .dependencies = featureSet(&[_]Feature{
454 .db,
455 .hwdiv,
456 .mclass,
457 .noarm,
458 .thumb_mode,
459 .thumb2,
460 .v7,
461 }),
462 };
463 result[@enumToInt(Feature.armv7_r)] = .{
464 .llvm_name = "armv7-r",
465 .description = "ARMv7r architecture",
466 .dependencies = featureSet(&[_]Feature{
467 .db,
468 .dsp,
469 .hwdiv,
470 .rclass,
471 .v7,
472 }),
473 };
474 result[@enumToInt(Feature.armv7e_m)] = .{
475 .llvm_name = "armv7e-m",
476 .description = "ARMv7em architecture",
477 .dependencies = featureSet(&[_]Feature{
478 .db,
479 .dsp,
480 .hwdiv,
481 .mclass,
482 .noarm,
483 .thumb_mode,
484 .thumb2,
485 .v7,
486 }),
487 };
488 result[@enumToInt(Feature.armv7k)] = .{
489 .llvm_name = "armv7k",
490 .description = "ARMv7a architecture",
491 .dependencies = featureSet(&[_]Feature{
492 .armv7_a,
493 }),
494 };
495 result[@enumToInt(Feature.armv7s)] = .{
496 .llvm_name = "armv7s",
497 .description = "ARMv7a architecture",
498 .dependencies = featureSet(&[_]Feature{
499 .armv7_a,
500 }),
501 };
502 result[@enumToInt(Feature.armv7ve)] = .{
503 .llvm_name = "armv7ve",
504 .description = "ARMv7ve architecture",
505 .dependencies = featureSet(&[_]Feature{
506 .aclass,
507 .db,
508 .dsp,
509 .mp,
510 .neon,
511 .trustzone,
512 .v7,
513 .virtualization,
514 }),
515 };
516 result[@enumToInt(Feature.armv8_a)] = .{
517 .llvm_name = "armv8-a",
518 .description = "ARMv8a architecture",
519 .dependencies = featureSet(&[_]Feature{
520 .aclass,
521 .crc,
522 .crypto,
523 .db,
524 .dsp,
525 .fp_armv8,
526 .mp,
527 .neon,
528 .trustzone,
529 .v8,
530 .virtualization,
531 }),
532 };
533 result[@enumToInt(Feature.armv8_m_base)] = .{
534 .llvm_name = "armv8-m.base",
535 .description = "ARMv8mBaseline architecture",
536 .dependencies = featureSet(&[_]Feature{
537 .@"8msecext",
538 .acquire_release,
539 .db,
540 .hwdiv,
541 .mclass,
542 .noarm,
543 .strict_align,
544 .thumb_mode,
545 .v7clrex,
546 .v8m,
547 }),
548 };
549 result[@enumToInt(Feature.armv8_m_main)] = .{
550 .llvm_name = "armv8-m.main",
551 .description = "ARMv8mMainline architecture",
552 .dependencies = featureSet(&[_]Feature{
553 .@"8msecext",
554 .acquire_release,
555 .db,
556 .hwdiv,
557 .mclass,
558 .noarm,
559 .thumb_mode,
560 .v8m_main,
561 }),
562 };
563 result[@enumToInt(Feature.armv8_r)] = .{
564 .llvm_name = "armv8-r",
565 .description = "ARMv8r architecture",
566 .dependencies = featureSet(&[_]Feature{
567 .crc,
568 .db,
569 .dfb,
570 .dsp,
571 .fp_armv8,
572 .mp,
573 .neon,
574 .rclass,
575 .v8,
576 .virtualization,
577 }),
578 };
579 result[@enumToInt(Feature.armv8_1_a)] = .{
580 .llvm_name = "armv8.1-a",
581 .description = "ARMv81a architecture",
582 .dependencies = featureSet(&[_]Feature{
583 .aclass,
584 .crc,
585 .crypto,
586 .db,
587 .dsp,
588 .fp_armv8,
589 .mp,
590 .neon,
591 .trustzone,
592 .v8_1a,
593 .virtualization,
594 }),
595 };
596 result[@enumToInt(Feature.armv8_1_m_main)] = .{
597 .llvm_name = "armv8.1-m.main",
598 .description = "ARMv81mMainline architecture",
599 .dependencies = featureSet(&[_]Feature{
600 .@"8msecext",
601 .acquire_release,
602 .db,
603 .hwdiv,
604 .lob,
605 .mclass,
606 .noarm,
607 .ras,
608 .thumb_mode,
609 .v8_1m_main,
610 }),
611 };
612 result[@enumToInt(Feature.armv8_2_a)] = .{
613 .llvm_name = "armv8.2-a",
614 .description = "ARMv82a architecture",
615 .dependencies = featureSet(&[_]Feature{
616 .aclass,
617 .crc,
618 .crypto,
619 .db,
620 .dsp,
621 .fp_armv8,
622 .mp,
623 .neon,
624 .ras,
625 .trustzone,
626 .v8_2a,
627 .virtualization,
628 }),
629 };
630 result[@enumToInt(Feature.armv8_3_a)] = .{
631 .llvm_name = "armv8.3-a",
632 .description = "ARMv83a architecture",
633 .dependencies = featureSet(&[_]Feature{
634 .aclass,
635 .crc,
636 .crypto,
637 .db,
638 .dsp,
639 .fp_armv8,
640 .mp,
641 .neon,
642 .ras,
643 .trustzone,
644 .v8_3a,
645 .virtualization,
646 }),
647 };
648 result[@enumToInt(Feature.armv8_4_a)] = .{
649 .llvm_name = "armv8.4-a",
650 .description = "ARMv84a architecture",
651 .dependencies = featureSet(&[_]Feature{
652 .aclass,
653 .crc,
654 .crypto,
655 .db,
656 .dotprod,
657 .dsp,
658 .fp_armv8,
659 .mp,
660 .neon,
661 .ras,
662 .trustzone,
663 .v8_4a,
664 .virtualization,
665 }),
666 };
667 result[@enumToInt(Feature.armv8_5_a)] = .{
668 .llvm_name = "armv8.5-a",
669 .description = "ARMv85a architecture",
670 .dependencies = featureSet(&[_]Feature{
671 .aclass,
672 .crc,
673 .crypto,
674 .db,
675 .dotprod,
676 .dsp,
677 .fp_armv8,
678 .mp,
679 .neon,
680 .ras,
681 .trustzone,
682 .v8_5a,
683 .virtualization,
684 }),
685 };
686 result[@enumToInt(Feature.armv8_6_a)] = .{
687 .llvm_name = "armv8.6-a",
688 .description = "ARMv86a architecture",
689 .dependencies = featureSet(&[_]Feature{
690 .aclass,
691 .crc,
692 .crypto,
693 .db,
694 .dotprod,
695 .dsp,
696 .fp_armv8,
697 .mp,
698 .neon,
699 .ras,
700 .trustzone,
701 .v8_6a,
702 .virtualization,
703 }),
704 };
220705 result[@enumToInt(Feature.avoid_movs_shop)] = .{
221706 .llvm_name = "avoid-movs-shop",
222707 .description = "Avoid movs instructions with shifter operand",
......@@ -302,6 +787,16 @@ pub const all_features = blk: {
302787 .description = "Disable +1 predication cost for instructions updating CPSR",
303788 .dependencies = featureSet(&[_]Feature{}),
304789 };
790 result[@enumToInt(Feature.cortex_a78)] = .{
791 .llvm_name = "cortex-a78",
792 .description = "Cortex-A78 ARM processors",
793 .dependencies = featureSet(&[_]Feature{}),
794 };
795 result[@enumToInt(Feature.cortex_x1)] = .{
796 .llvm_name = "cortex-x1",
797 .description = "Cortex-X1 ARM processors",
798 .dependencies = featureSet(&[_]Feature{}),
799 };
305800 result[@enumToInt(Feature.crc)] = .{
306801 .llvm_name = "crc",
307802 .description = "Enable support for CRC instructions",
......@@ -386,25 +881,6 @@ pub const all_features = blk: {
386881 .zcz,
387882 }),
388883 };
389 result[@enumToInt(Feature.fp16)] = .{
390 .llvm_name = "fp16",
391 .description = "Enable half-precision floating point",
392 .dependencies = featureSet(&[_]Feature{}),
393 };
394 result[@enumToInt(Feature.fp16fml)] = .{
395 .llvm_name = "fp16fml",
396 .description = "Enable full half-precision floating point fml instructions",
397 .dependencies = featureSet(&[_]Feature{
398 .fullfp16,
399 }),
400 };
401 result[@enumToInt(Feature.fp64)] = .{
402 .llvm_name = "fp64",
403 .description = "Floating point unit supports double precision",
404 .dependencies = featureSet(&[_]Feature{
405 .fpregs64,
406 }),
407 };
408884 result[@enumToInt(Feature.fp_armv8)] = .{
409885 .llvm_name = "fp-armv8",
410886 .description = "Enable ARMv8 FP",
......@@ -439,186 +915,67 @@ pub const all_features = blk: {
439915 .vfp4sp,
440916 }),
441917 };
442 result[@enumToInt(Feature.fpao)] = .{
443 .llvm_name = "fpao",
444 .description = "Enable fast computation of positive address offsets",
445 .dependencies = featureSet(&[_]Feature{}),
446 };
447 result[@enumToInt(Feature.fpregs)] = .{
448 .llvm_name = "fpregs",
449 .description = "Enable FP registers",
450 .dependencies = featureSet(&[_]Feature{}),
451 };
452 result[@enumToInt(Feature.fpregs16)] = .{
453 .llvm_name = "fpregs16",
454 .description = "Enable 16-bit FP registers",
455 .dependencies = featureSet(&[_]Feature{
456 .fpregs,
457 }),
458 };
459 result[@enumToInt(Feature.fpregs64)] = .{
460 .llvm_name = "fpregs64",
461 .description = "Enable 64-bit FP registers",
462 .dependencies = featureSet(&[_]Feature{
463 .fpregs,
464 }),
465 };
466 result[@enumToInt(Feature.fullfp16)] = .{
467 .llvm_name = "fullfp16",
468 .description = "Enable full half-precision floating point",
469 .dependencies = featureSet(&[_]Feature{
470 .fp_armv8d16sp,
471 .fpregs16,
472 }),
473 };
474 result[@enumToInt(Feature.fuse_aes)] = .{
475 .llvm_name = "fuse-aes",
476 .description = "CPU fuses AES crypto operations",
477 .dependencies = featureSet(&[_]Feature{}),
478 };
479 result[@enumToInt(Feature.fuse_literals)] = .{
480 .llvm_name = "fuse-literals",
481 .description = "CPU fuses literal generation operations",
482 .dependencies = featureSet(&[_]Feature{}),
483 };
484 result[@enumToInt(Feature.has_v4t)] = .{
485 .llvm_name = "v4t",
486 .description = "Support ARM v4T instructions",
487 .dependencies = featureSet(&[_]Feature{}),
488 };
489 result[@enumToInt(Feature.has_v5t)] = .{
490 .llvm_name = "v5t",
491 .description = "Support ARM v5T instructions",
492 .dependencies = featureSet(&[_]Feature{
493 .has_v4t,
494 }),
495 };
496 result[@enumToInt(Feature.has_v5te)] = .{
497 .llvm_name = "v5te",
498 .description = "Support ARM v5TE, v5TEj, and v5TExp instructions",
499 .dependencies = featureSet(&[_]Feature{
500 .has_v5t,
501 }),
502 };
503 result[@enumToInt(Feature.has_v6)] = .{
504 .llvm_name = "v6",
505 .description = "Support ARM v6 instructions",
506 .dependencies = featureSet(&[_]Feature{
507 .has_v5te,
508 }),
509 };
510 result[@enumToInt(Feature.has_v6k)] = .{
511 .llvm_name = "v6k",
512 .description = "Support ARM v6k instructions",
513 .dependencies = featureSet(&[_]Feature{
514 .has_v6,
515 }),
516 };
517 result[@enumToInt(Feature.has_v6m)] = .{
518 .llvm_name = "v6m",
519 .description = "Support ARM v6M instructions",
520 .dependencies = featureSet(&[_]Feature{
521 .has_v6,
522 }),
523 };
524 result[@enumToInt(Feature.has_v6t2)] = .{
525 .llvm_name = "v6t2",
526 .description = "Support ARM v6t2 instructions",
527 .dependencies = featureSet(&[_]Feature{
528 .thumb2,
529 .has_v6k,
530 .has_v8m,
531 }),
532 };
533 result[@enumToInt(Feature.has_v7)] = .{
534 .llvm_name = "v7",
535 .description = "Support ARM v7 instructions",
536 .dependencies = featureSet(&[_]Feature{
537 .perfmon,
538 .has_v6t2,
539 .has_v7clrex,
540 }),
541 };
542 result[@enumToInt(Feature.has_v7clrex)] = .{
543 .llvm_name = "v7clrex",
544 .description = "Has v7 clrex instruction",
918 result[@enumToInt(Feature.fp16)] = .{
919 .llvm_name = "fp16",
920 .description = "Enable half-precision floating point",
545921 .dependencies = featureSet(&[_]Feature{}),
546922 };
547 result[@enumToInt(Feature.has_v8)] = .{
548 .llvm_name = "v8",
549 .description = "Support ARM v8 instructions",
550 .dependencies = featureSet(&[_]Feature{
551 .acquire_release,
552 .has_v7,
553 }),
554 };
555 result[@enumToInt(Feature.has_v8_1a)] = .{
556 .llvm_name = "v8.1a",
557 .description = "Support ARM v8.1a instructions",
558 .dependencies = featureSet(&[_]Feature{
559 .has_v8,
560 }),
561 };
562 result[@enumToInt(Feature.has_v8_1m_main)] = .{
563 .llvm_name = "v8.1m.main",
564 .description = "Support ARM v8-1M Mainline instructions",
565 .dependencies = featureSet(&[_]Feature{
566 .has_v8m_main,
567 }),
568 };
569 result[@enumToInt(Feature.has_v8_2a)] = .{
570 .llvm_name = "v8.2a",
571 .description = "Support ARM v8.2a instructions",
923 result[@enumToInt(Feature.fp16fml)] = .{
924 .llvm_name = "fp16fml",
925 .description = "Enable full half-precision floating point fml instructions",
572926 .dependencies = featureSet(&[_]Feature{
573 .has_v8_1a,
927 .fullfp16,
574928 }),
575929 };
576 result[@enumToInt(Feature.has_v8_3a)] = .{
577 .llvm_name = "v8.3a",
578 .description = "Support ARM v8.3a instructions",
930 result[@enumToInt(Feature.fp64)] = .{
931 .llvm_name = "fp64",
932 .description = "Floating point unit supports double precision",
579933 .dependencies = featureSet(&[_]Feature{
580 .has_v8_2a,
934 .fpregs64,
581935 }),
582936 };
583 result[@enumToInt(Feature.has_v8_4a)] = .{
584 .llvm_name = "v8.4a",
585 .description = "Support ARM v8.4a instructions",
586 .dependencies = featureSet(&[_]Feature{
587 .dotprod,
588 .has_v8_3a,
589 }),
937 result[@enumToInt(Feature.fpao)] = .{
938 .llvm_name = "fpao",
939 .description = "Enable fast computation of positive address offsets",
940 .dependencies = featureSet(&[_]Feature{}),
590941 };
591 result[@enumToInt(Feature.has_v8_5a)] = .{
592 .llvm_name = "v8.5a",
593 .description = "Support ARM v8.5a instructions",
594 .dependencies = featureSet(&[_]Feature{
595 .sb,
596 .has_v8_4a,
597 }),
942 result[@enumToInt(Feature.fpregs)] = .{
943 .llvm_name = "fpregs",
944 .description = "Enable FP registers",
945 .dependencies = featureSet(&[_]Feature{}),
598946 };
599 result[@enumToInt(Feature.has_v8_6a)] = .{
600 .llvm_name = "v8.6a",
601 .description = "Support ARM v8.6a instructions",
947 result[@enumToInt(Feature.fpregs16)] = .{
948 .llvm_name = "fpregs16",
949 .description = "Enable 16-bit FP registers",
602950 .dependencies = featureSet(&[_]Feature{
603 .bf16,
604 .i8mm,
605 .has_v8_5a,
951 .fpregs,
606952 }),
607953 };
608 result[@enumToInt(Feature.has_v8m)] = .{
609 .llvm_name = "v8m",
610 .description = "Support ARM v8M Baseline instructions",
954 result[@enumToInt(Feature.fpregs64)] = .{
955 .llvm_name = "fpregs64",
956 .description = "Enable 64-bit FP registers",
611957 .dependencies = featureSet(&[_]Feature{
612 .has_v6m,
958 .fpregs,
613959 }),
614960 };
615 result[@enumToInt(Feature.has_v8m_main)] = .{
616 .llvm_name = "v8m.main",
617 .description = "Support ARM v8M Mainline instructions",
961 result[@enumToInt(Feature.fullfp16)] = .{
962 .llvm_name = "fullfp16",
963 .description = "Enable full half-precision floating point",
618964 .dependencies = featureSet(&[_]Feature{
619 .has_v7,
965 .fp_armv8d16sp,
966 .fpregs16,
620967 }),
621968 };
969 result[@enumToInt(Feature.fuse_aes)] = .{
970 .llvm_name = "fuse-aes",
971 .description = "CPU fuses AES crypto operations",
972 .dependencies = featureSet(&[_]Feature{}),
973 };
974 result[@enumToInt(Feature.fuse_literals)] = .{
975 .llvm_name = "fuse-literals",
976 .description = "CPU fuses literal generation operations",
977 .dependencies = featureSet(&[_]Feature{}),
978 };
622979 result[@enumToInt(Feature.hwdiv)] = .{
623980 .llvm_name = "hwdiv",
624981 .description = "Enable divide instructions in Thumb",
......@@ -629,7 +986,7 @@ pub const all_features = blk: {
629986 .description = "Enable divide instructions in ARM mode",
630987 .dependencies = featureSet(&[_]Feature{}),
631988 };
632 result[@enumToInt(Feature.i8mm)] = .{
989 result[@enumToInt(Feature._i8mm)] = .{
633990 .llvm_name = "i8mm",
634991 .description = "Enable Matrix Multiply Int8 Extension",
635992 .dependencies = featureSet(&[_]Feature{
......@@ -640,16 +997,26 @@ pub const all_features = blk: {
640997 .llvm_name = "iwmmxt",
641998 .description = "ARMv5te architecture",
642999 .dependencies = featureSet(&[_]Feature{
643 .has_v5te,
1000 .armv5te,
6441001 }),
6451002 };
6461003 result[@enumToInt(Feature.iwmmxt2)] = .{
6471004 .llvm_name = "iwmmxt2",
6481005 .description = "ARMv5te architecture",
6491006 .dependencies = featureSet(&[_]Feature{
650 .has_v5te,
1007 .armv5te,
6511008 }),
6521009 };
1010 result[@enumToInt(Feature.krait)] = .{
1011 .llvm_name = "krait",
1012 .description = "Qualcomm Krait processors",
1013 .dependencies = featureSet(&[_]Feature{}),
1014 };
1015 result[@enumToInt(Feature.kryo)] = .{
1016 .llvm_name = "kryo",
1017 .description = "Qualcomm Kryo processors",
1018 .dependencies = featureSet(&[_]Feature{}),
1019 };
6531020 result[@enumToInt(Feature.lob)] = .{
6541021 .llvm_name = "lob",
6551022 .description = "Enable Low Overhead Branch extensions",
......@@ -692,7 +1059,7 @@ pub const all_features = blk: {
6921059 .dsp,
6931060 .fpregs16,
6941061 .fpregs64,
695 .has_v8_1m_main,
1062 .v8_1m_main,
6961063 }),
6971064 };
6981065 result[@enumToInt(Feature.mve_fp)] = .{
......@@ -741,6 +1108,11 @@ pub const all_features = blk: {
7411108 .description = "Use NEON for single precision FP",
7421109 .dependencies = featureSet(&[_]Feature{}),
7431110 };
1111 result[@enumToInt(Feature.neoverse_v1)] = .{
1112 .llvm_name = "neoverse-v1",
1113 .description = "Neoverse-V1 ARM processors",
1114 .dependencies = featureSet(&[_]Feature{}),
1115 };
7441116 result[@enumToInt(Feature.no_branch_predictor)] = .{
7451117 .llvm_name = "no-branch-predictor",
7461118 .description = "Has no branch predictor",
......@@ -791,6 +1163,21 @@ pub const all_features = blk: {
7911163 .description = "Cortex-R4 ARM processors",
7921164 .dependencies = featureSet(&[_]Feature{}),
7931165 };
1166 result[@enumToInt(Feature.r5)] = .{
1167 .llvm_name = "r5",
1168 .description = "Cortex-R5 ARM processors",
1169 .dependencies = featureSet(&[_]Feature{}),
1170 };
1171 result[@enumToInt(Feature.r52)] = .{
1172 .llvm_name = "r52",
1173 .description = "Cortex-R52 ARM processors",
1174 .dependencies = featureSet(&[_]Feature{}),
1175 };
1176 result[@enumToInt(Feature.r7)] = .{
1177 .llvm_name = "r7",
1178 .description = "Cortex-R7 ARM processors",
1179 .dependencies = featureSet(&[_]Feature{}),
1180 };
7941181 result[@enumToInt(Feature.ras)] = .{
7951182 .llvm_name = "ras",
7961183 .description = "Enable Reliability, Availability and Serviceability extensions",
......@@ -885,16 +1272,16 @@ pub const all_features = blk: {
8851272 .description = "Swift ARM processors",
8861273 .dependencies = featureSet(&[_]Feature{}),
8871274 };
888 result[@enumToInt(Feature.thumb2)] = .{
889 .llvm_name = "thumb2",
890 .description = "Enable Thumb2 instructions",
891 .dependencies = featureSet(&[_]Feature{}),
892 };
8931275 result[@enumToInt(Feature.thumb_mode)] = .{
8941276 .llvm_name = "thumb-mode",
8951277 .description = "Thumb mode",
8961278 .dependencies = featureSet(&[_]Feature{}),
8971279 };
1280 result[@enumToInt(Feature.thumb2)] = .{
1281 .llvm_name = "thumb2",
1282 .description = "Enable Thumb2 instructions",
1283 .dependencies = featureSet(&[_]Feature{}),
1284 };
8981285 result[@enumToInt(Feature.trustzone)] = .{
8991286 .llvm_name = "trustzone",
9001287 .description = "Enable support for TrustZone security extensions",
......@@ -905,399 +1292,142 @@ pub const all_features = blk: {
9051292 .description = "Use the MachineScheduler",
9061293 .dependencies = featureSet(&[_]Feature{}),
9071294 };
908 result[@enumToInt(Feature.v2)] = .{
909 .llvm_name = "armv2",
910 .description = "ARMv2 architecture",
911 .dependencies = featureSet(&[_]Feature{
912 .strict_align,
913 }),
914 };
915 result[@enumToInt(Feature.v2a)] = .{
916 .llvm_name = "armv2a",
917 .description = "ARMv2a architecture",
918 .dependencies = featureSet(&[_]Feature{
919 .strict_align,
920 }),
921 };
922 result[@enumToInt(Feature.v3)] = .{
923 .llvm_name = "armv3",
924 .description = "ARMv3 architecture",
925 .dependencies = featureSet(&[_]Feature{
926 .strict_align,
927 }),
928 };
929 result[@enumToInt(Feature.v3m)] = .{
930 .llvm_name = "armv3m",
931 .description = "ARMv3m architecture",
932 .dependencies = featureSet(&[_]Feature{
933 .strict_align,
934 }),
935 };
936 result[@enumToInt(Feature.v4)] = .{
937 .llvm_name = "armv4",
938 .description = "ARMv4 architecture",
939 .dependencies = featureSet(&[_]Feature{
940 .strict_align,
941 }),
942 };
9431295 result[@enumToInt(Feature.v4t)] = .{
944 .llvm_name = "armv4t",
945 .description = "ARMv4t architecture",
946 .dependencies = featureSet(&[_]Feature{
947 .strict_align,
948 .has_v4t,
949 }),
1296 .llvm_name = "v4t",
1297 .description = "Support ARM v4T instructions",
1298 .dependencies = featureSet(&[_]Feature{}),
9501299 };
9511300 result[@enumToInt(Feature.v5t)] = .{
952 .llvm_name = "armv5t",
953 .description = "ARMv5t architecture",
1301 .llvm_name = "v5t",
1302 .description = "Support ARM v5T instructions",
9541303 .dependencies = featureSet(&[_]Feature{
955 .strict_align,
956 .has_v5t,
1304 .v4t,
9571305 }),
9581306 };
9591307 result[@enumToInt(Feature.v5te)] = .{
960 .llvm_name = "armv5te",
961 .description = "ARMv5te architecture",
962 .dependencies = featureSet(&[_]Feature{
963 .strict_align,
964 .has_v5te,
965 }),
966 };
967 result[@enumToInt(Feature.v5tej)] = .{
968 .llvm_name = "armv5tej",
969 .description = "ARMv5tej architecture",
1308 .llvm_name = "v5te",
1309 .description = "Support ARM v5TE, v5TEj, and v5TExp instructions",
9701310 .dependencies = featureSet(&[_]Feature{
971 .strict_align,
972 .has_v5te,
1311 .v5t,
9731312 }),
9741313 };
9751314 result[@enumToInt(Feature.v6)] = .{
976 .llvm_name = "armv6",
977 .description = "ARMv6 architecture",
978 .dependencies = featureSet(&[_]Feature{
979 .dsp,
980 .has_v6,
981 }),
982 };
983 result[@enumToInt(Feature.v6m)] = .{
984 .llvm_name = "armv6-m",
985 .description = "ARMv6m architecture",
986 .dependencies = featureSet(&[_]Feature{
987 .db,
988 .mclass,
989 .noarm,
990 .strict_align,
991 .thumb_mode,
992 .has_v6m,
993 }),
994 };
995 result[@enumToInt(Feature.v6j)] = .{
996 .llvm_name = "armv6j",
997 .description = "ARMv7a architecture",
1315 .llvm_name = "v6",
1316 .description = "Support ARM v6 instructions",
9981317 .dependencies = featureSet(&[_]Feature{
999 .v6,
1318 .v5te,
10001319 }),
10011320 };
10021321 result[@enumToInt(Feature.v6k)] = .{
1003 .llvm_name = "armv6k",
1004 .description = "ARMv6k architecture",
1005 .dependencies = featureSet(&[_]Feature{
1006 .has_v6k,
1007 }),
1008 };
1009 result[@enumToInt(Feature.v6kz)] = .{
1010 .llvm_name = "armv6kz",
1011 .description = "ARMv6kz architecture",
1012 .dependencies = featureSet(&[_]Feature{
1013 .trustzone,
1014 .has_v6k,
1015 }),
1016 };
1017 result[@enumToInt(Feature.v6sm)] = .{
1018 .llvm_name = "armv6s-m",
1019 .description = "ARMv6sm architecture",
1020 .dependencies = featureSet(&[_]Feature{
1021 .db,
1022 .mclass,
1023 .noarm,
1024 .strict_align,
1025 .thumb_mode,
1026 .has_v6m,
1027 }),
1028 };
1029 result[@enumToInt(Feature.v6t2)] = .{
1030 .llvm_name = "armv6t2",
1031 .description = "ARMv6t2 architecture",
1032 .dependencies = featureSet(&[_]Feature{
1033 .dsp,
1034 .has_v6t2,
1035 }),
1036 };
1037 result[@enumToInt(Feature.v7a)] = .{
1038 .llvm_name = "armv7-a",
1039 .description = "ARMv7a architecture",
1040 .dependencies = featureSet(&[_]Feature{
1041 .aclass,
1042 .db,
1043 .dsp,
1044 .neon,
1045 .has_v7,
1046 }),
1047 };
1048 result[@enumToInt(Feature.v7m)] = .{
1049 .llvm_name = "armv7-m",
1050 .description = "ARMv7m architecture",
1051 .dependencies = featureSet(&[_]Feature{
1052 .db,
1053 .hwdiv,
1054 .mclass,
1055 .noarm,
1056 .thumb_mode,
1057 .thumb2,
1058 .has_v7,
1059 }),
1060 };
1061 result[@enumToInt(Feature.v7r)] = .{
1062 .llvm_name = "armv7-r",
1063 .description = "ARMv7r architecture",
1064 .dependencies = featureSet(&[_]Feature{
1065 .db,
1066 .dsp,
1067 .hwdiv,
1068 .rclass,
1069 .has_v7,
1070 }),
1071 };
1072 result[@enumToInt(Feature.v7em)] = .{
1073 .llvm_name = "armv7e-m",
1074 .description = "ARMv7em architecture",
1075 .dependencies = featureSet(&[_]Feature{
1076 .db,
1077 .dsp,
1078 .hwdiv,
1079 .mclass,
1080 .noarm,
1081 .thumb_mode,
1082 .thumb2,
1083 .has_v7,
1084 }),
1085 };
1086 result[@enumToInt(Feature.v7k)] = .{
1087 .llvm_name = "armv7k",
1088 .description = "ARMv7a architecture",
1089 .dependencies = featureSet(&[_]Feature{
1090 .v7a,
1091 }),
1092 };
1093 result[@enumToInt(Feature.v7s)] = .{
1094 .llvm_name = "armv7s",
1095 .description = "ARMv7a architecture",
1096 .dependencies = featureSet(&[_]Feature{
1097 .v7a,
1098 }),
1099 };
1100 result[@enumToInt(Feature.v7ve)] = .{
1101 .llvm_name = "armv7ve",
1102 .description = "ARMv7ve architecture",
1322 .llvm_name = "v6k",
1323 .description = "Support ARM v6k instructions",
11031324 .dependencies = featureSet(&[_]Feature{
1104 .aclass,
1105 .db,
1106 .dsp,
1107 .mp,
1108 .neon,
1109 .trustzone,
1110 .has_v7,
1111 .virtualization,
1325 .v6,
11121326 }),
11131327 };
1114 result[@enumToInt(Feature.v8a)] = .{
1115 .llvm_name = "armv8-a",
1116 .description = "ARMv8a architecture",
1328 result[@enumToInt(Feature.v6m)] = .{
1329 .llvm_name = "v6m",
1330 .description = "Support ARM v6M instructions",
11171331 .dependencies = featureSet(&[_]Feature{
1118 .aclass,
1119 .crc,
1120 .crypto,
1121 .db,
1122 .dsp,
1123 .fp_armv8,
1124 .mp,
1125 .neon,
1126 .trustzone,
1127 .has_v8,
1128 .virtualization,
1332 .v6,
11291333 }),
11301334 };
1131 result[@enumToInt(Feature.v8m)] = .{
1132 .llvm_name = "armv8-m.base",
1133 .description = "ARMv8mBaseline architecture",
1335 result[@enumToInt(Feature.v6t2)] = .{
1336 .llvm_name = "v6t2",
1337 .description = "Support ARM v6t2 instructions",
11341338 .dependencies = featureSet(&[_]Feature{
1135 .@"8msecext",
1136 .acquire_release,
1137 .db,
1138 .hwdiv,
1139 .mclass,
1140 .noarm,
1141 .strict_align,
1142 .thumb_mode,
1143 .has_v7clrex,
1144 .has_v8m,
1339 .thumb2,
1340 .v6k,
1341 .v8m,
11451342 }),
11461343 };
1147 result[@enumToInt(Feature.v8m_main)] = .{
1148 .llvm_name = "armv8-m.main",
1149 .description = "ARMv8mMainline architecture",
1344 result[@enumToInt(Feature.v7)] = .{
1345 .llvm_name = "v7",
1346 .description = "Support ARM v7 instructions",
11501347 .dependencies = featureSet(&[_]Feature{
1151 .@"8msecext",
1152 .acquire_release,
1153 .db,
1154 .hwdiv,
1155 .mclass,
1156 .noarm,
1157 .thumb_mode,
1158 .has_v8m_main,
1348 .perfmon,
1349 .v6t2,
1350 .v7clrex,
11591351 }),
11601352 };
1161 result[@enumToInt(Feature.v8r)] = .{
1162 .llvm_name = "armv8-r",
1163 .description = "ARMv8r architecture",
1353 result[@enumToInt(Feature.v7clrex)] = .{
1354 .llvm_name = "v7clrex",
1355 .description = "Has v7 clrex instruction",
1356 .dependencies = featureSet(&[_]Feature{}),
1357 };
1358 result[@enumToInt(Feature.v8)] = .{
1359 .llvm_name = "v8",
1360 .description = "Support ARM v8 instructions",
11641361 .dependencies = featureSet(&[_]Feature{
1165 .crc,
1166 .db,
1167 .dfb,
1168 .dsp,
1169 .fp_armv8,
1170 .mp,
1171 .neon,
1172 .rclass,
1173 .has_v8,
1174 .virtualization,
1362 .acquire_release,
1363 .v7,
11751364 }),
11761365 };
11771366 result[@enumToInt(Feature.v8_1a)] = .{
1178 .llvm_name = "armv8.1-a",
1179 .description = "ARMv81a architecture",
1367 .llvm_name = "v8.1a",
1368 .description = "Support ARM v8.1a instructions",
11801369 .dependencies = featureSet(&[_]Feature{
1181 .aclass,
1182 .crc,
1183 .crypto,
1184 .db,
1185 .dsp,
1186 .fp_armv8,
1187 .mp,
1188 .neon,
1189 .trustzone,
1190 .has_v8_1a,
1191 .virtualization,
1370 .v8,
11921371 }),
11931372 };
11941373 result[@enumToInt(Feature.v8_1m_main)] = .{
1195 .llvm_name = "armv8.1-m.main",
1196 .description = "ARMv81mMainline architecture",
1374 .llvm_name = "v8.1m.main",
1375 .description = "Support ARM v8-1M Mainline instructions",
11971376 .dependencies = featureSet(&[_]Feature{
1198 .@"8msecext",
1199 .acquire_release,
1200 .db,
1201 .hwdiv,
1202 .lob,
1203 .mclass,
1204 .noarm,
1205 .ras,
1206 .thumb_mode,
1207 .has_v8_1m_main,
1377 .v8m_main,
12081378 }),
12091379 };
12101380 result[@enumToInt(Feature.v8_2a)] = .{
1211 .llvm_name = "armv8.2-a",
1212 .description = "ARMv82a architecture",
1381 .llvm_name = "v8.2a",
1382 .description = "Support ARM v8.2a instructions",
12131383 .dependencies = featureSet(&[_]Feature{
1214 .aclass,
1215 .crc,
1216 .crypto,
1217 .db,
1218 .dsp,
1219 .fp_armv8,
1220 .mp,
1221 .neon,
1222 .ras,
1223 .trustzone,
1224 .has_v8_2a,
1225 .virtualization,
1384 .v8_1a,
12261385 }),
12271386 };
12281387 result[@enumToInt(Feature.v8_3a)] = .{
1229 .llvm_name = "armv8.3-a",
1230 .description = "ARMv83a architecture",
1388 .llvm_name = "v8.3a",
1389 .description = "Support ARM v8.3a instructions",
12311390 .dependencies = featureSet(&[_]Feature{
1232 .aclass,
1233 .crc,
1234 .crypto,
1235 .db,
1236 .dsp,
1237 .fp_armv8,
1238 .mp,
1239 .neon,
1240 .ras,
1241 .trustzone,
1242 .has_v8_3a,
1243 .virtualization,
1391 .v8_2a,
12441392 }),
12451393 };
12461394 result[@enumToInt(Feature.v8_4a)] = .{
1247 .llvm_name = "armv8.4-a",
1248 .description = "ARMv84a architecture",
1395 .llvm_name = "v8.4a",
1396 .description = "Support ARM v8.4a instructions",
12491397 .dependencies = featureSet(&[_]Feature{
1250 .aclass,
1251 .crc,
1252 .crypto,
1253 .db,
12541398 .dotprod,
1255 .dsp,
1256 .fp_armv8,
1257 .mp,
1258 .neon,
1259 .ras,
1260 .trustzone,
1261 .has_v8_4a,
1262 .virtualization,
1399 .v8_3a,
12631400 }),
12641401 };
12651402 result[@enumToInt(Feature.v8_5a)] = .{
1266 .llvm_name = "armv8.5-a",
1267 .description = "ARMv85a architecture",
1403 .llvm_name = "v8.5a",
1404 .description = "Support ARM v8.5a instructions",
12681405 .dependencies = featureSet(&[_]Feature{
1269 .aclass,
1270 .crc,
1271 .crypto,
1272 .db,
1273 .dotprod,
1274 .dsp,
1275 .fp_armv8,
1276 .mp,
1277 .neon,
1278 .ras,
1279 .trustzone,
1280 .has_v8_5a,
1281 .virtualization,
1406 .sb,
1407 .v8_4a,
12821408 }),
12831409 };
12841410 result[@enumToInt(Feature.v8_6a)] = .{
1285 .llvm_name = "armv8.6-a",
1286 .description = "ARMv86a architecture",
1411 .llvm_name = "v8.6a",
1412 .description = "Support ARM v8.6a instructions",
12871413 .dependencies = featureSet(&[_]Feature{
1288 .aclass,
1289 .crc,
1290 .crypto,
1291 .db,
1292 .dotprod,
1293 .dsp,
1294 .fp_armv8,
1295 .mp,
1296 .neon,
1297 .ras,
1298 .trustzone,
1299 .has_v8_6a,
1300 .virtualization,
1414 .bf16,
1415 ._i8mm,
1416 .v8_5a,
1417 }),
1418 };
1419 result[@enumToInt(Feature.v8m)] = .{
1420 .llvm_name = "v8m",
1421 .description = "Support ARM v8M Baseline instructions",
1422 .dependencies = featureSet(&[_]Feature{
1423 .v6m,
1424 }),
1425 };
1426 result[@enumToInt(Feature.v8m_main)] = .{
1427 .llvm_name = "v8m.main",
1428 .description = "Support ARM v8M Mainline instructions",
1429 .dependencies = featureSet(&[_]Feature{
1430 .v7,
13011431 }),
13021432 };
13031433 result[@enumToInt(Feature.vfp2)] = .{
......@@ -1417,7 +1547,7 @@ pub const all_features = blk: {
14171547 .llvm_name = "xscale",
14181548 .description = "ARMv5te architecture",
14191549 .dependencies = featureSet(&[_]Feature{
1420 .has_v5te,
1550 .armv5te,
14211551 }),
14221552 };
14231553 result[@enumToInt(Feature.zcz)] = .{
......@@ -1438,49 +1568,49 @@ pub const cpu = struct {
14381568 .name = "arm1020e",
14391569 .llvm_name = "arm1020e",
14401570 .features = featureSet(&[_]Feature{
1441 .v5te,
1571 .armv5te,
14421572 }),
14431573 };
14441574 pub const arm1020t = CpuModel{
14451575 .name = "arm1020t",
14461576 .llvm_name = "arm1020t",
14471577 .features = featureSet(&[_]Feature{
1448 .v5t,
1578 .armv5t,
14491579 }),
14501580 };
14511581 pub const arm1022e = CpuModel{
14521582 .name = "arm1022e",
14531583 .llvm_name = "arm1022e",
14541584 .features = featureSet(&[_]Feature{
1455 .v5te,
1585 .armv5te,
14561586 }),
14571587 };
14581588 pub const arm10e = CpuModel{
14591589 .name = "arm10e",
14601590 .llvm_name = "arm10e",
14611591 .features = featureSet(&[_]Feature{
1462 .v5te,
1592 .armv5te,
14631593 }),
14641594 };
14651595 pub const arm10tdmi = CpuModel{
14661596 .name = "arm10tdmi",
14671597 .llvm_name = "arm10tdmi",
14681598 .features = featureSet(&[_]Feature{
1469 .v5t,
1599 .armv5t,
14701600 }),
14711601 };
14721602 pub const arm1136j_s = CpuModel{
14731603 .name = "arm1136j_s",
14741604 .llvm_name = "arm1136j-s",
14751605 .features = featureSet(&[_]Feature{
1476 .v6,
1606 .armv6,
14771607 }),
14781608 };
14791609 pub const arm1136jf_s = CpuModel{
14801610 .name = "arm1136jf_s",
14811611 .llvm_name = "arm1136jf-s",
14821612 .features = featureSet(&[_]Feature{
1483 .v6,
1613 .armv6,
14841614 .slowfpvmlx,
14851615 .vfp2,
14861616 }),
......@@ -1489,14 +1619,14 @@ pub const cpu = struct {
14891619 .name = "arm1156t2_s",
14901620 .llvm_name = "arm1156t2-s",
14911621 .features = featureSet(&[_]Feature{
1492 .v6t2,
1622 .armv6t2,
14931623 }),
14941624 };
14951625 pub const arm1156t2f_s = CpuModel{
14961626 .name = "arm1156t2f_s",
14971627 .llvm_name = "arm1156t2f-s",
14981628 .features = featureSet(&[_]Feature{
1499 .v6t2,
1629 .armv6t2,
15001630 .slowfpvmlx,
15011631 .vfp2,
15021632 }),
......@@ -1505,21 +1635,21 @@ pub const cpu = struct {
15051635 .name = "arm1176j_s",
15061636 .llvm_name = "arm1176j-s",
15071637 .features = featureSet(&[_]Feature{
1508 .v6kz,
1638 .armv6kz,
15091639 }),
15101640 };
15111641 pub const arm1176jz_s = CpuModel{
15121642 .name = "arm1176jz_s",
15131643 .llvm_name = "arm1176jz-s",
15141644 .features = featureSet(&[_]Feature{
1515 .v6kz,
1645 .armv6kz,
15161646 }),
15171647 };
15181648 pub const arm1176jzf_s = CpuModel{
15191649 .name = "arm1176jzf_s",
15201650 .llvm_name = "arm1176jzf-s",
15211651 .features = featureSet(&[_]Feature{
1522 .v6kz,
1652 .armv6kz,
15231653 .slowfpvmlx,
15241654 .vfp2,
15251655 }),
......@@ -1528,133 +1658,127 @@ pub const cpu = struct {
15281658 .name = "arm710t",
15291659 .llvm_name = "arm710t",
15301660 .features = featureSet(&[_]Feature{
1531 .v4t,
1661 .armv4t,
15321662 }),
15331663 };
15341664 pub const arm720t = CpuModel{
15351665 .name = "arm720t",
15361666 .llvm_name = "arm720t",
15371667 .features = featureSet(&[_]Feature{
1538 .v4t,
1668 .armv4t,
15391669 }),
15401670 };
15411671 pub const arm7tdmi = CpuModel{
15421672 .name = "arm7tdmi",
15431673 .llvm_name = "arm7tdmi",
15441674 .features = featureSet(&[_]Feature{
1545 .v4t,
1675 .armv4t,
15461676 }),
15471677 };
15481678 pub const arm7tdmi_s = CpuModel{
15491679 .name = "arm7tdmi_s",
15501680 .llvm_name = "arm7tdmi-s",
15511681 .features = featureSet(&[_]Feature{
1552 .v4t,
1682 .armv4t,
15531683 }),
15541684 };
15551685 pub const arm8 = CpuModel{
15561686 .name = "arm8",
15571687 .llvm_name = "arm8",
15581688 .features = featureSet(&[_]Feature{
1559 .v4,
1689 .armv4,
15601690 }),
15611691 };
15621692 pub const arm810 = CpuModel{
15631693 .name = "arm810",
15641694 .llvm_name = "arm810",
15651695 .features = featureSet(&[_]Feature{
1566 .v4,
1696 .armv4,
15671697 }),
15681698 };
15691699 pub const arm9 = CpuModel{
15701700 .name = "arm9",
15711701 .llvm_name = "arm9",
15721702 .features = featureSet(&[_]Feature{
1573 .v4t,
1703 .armv4t,
15741704 }),
15751705 };
15761706 pub const arm920 = CpuModel{
15771707 .name = "arm920",
15781708 .llvm_name = "arm920",
15791709 .features = featureSet(&[_]Feature{
1580 .v4t,
1710 .armv4t,
15811711 }),
15821712 };
15831713 pub const arm920t = CpuModel{
15841714 .name = "arm920t",
15851715 .llvm_name = "arm920t",
15861716 .features = featureSet(&[_]Feature{
1587 .v4t,
1717 .armv4t,
15881718 }),
15891719 };
15901720 pub const arm922t = CpuModel{
15911721 .name = "arm922t",
15921722 .llvm_name = "arm922t",
15931723 .features = featureSet(&[_]Feature{
1594 .v4t,
1724 .armv4t,
15951725 }),
15961726 };
15971727 pub const arm926ej_s = CpuModel{
15981728 .name = "arm926ej_s",
15991729 .llvm_name = "arm926ej-s",
16001730 .features = featureSet(&[_]Feature{
1601 .v5te,
1731 .armv5te,
16021732 }),
16031733 };
16041734 pub const arm940t = CpuModel{
16051735 .name = "arm940t",
16061736 .llvm_name = "arm940t",
16071737 .features = featureSet(&[_]Feature{
1608 .v4t,
1738 .armv4t,
16091739 }),
16101740 };
16111741 pub const arm946e_s = CpuModel{
16121742 .name = "arm946e_s",
16131743 .llvm_name = "arm946e-s",
16141744 .features = featureSet(&[_]Feature{
1615 .v5te,
1745 .armv5te,
16161746 }),
16171747 };
16181748 pub const arm966e_s = CpuModel{
16191749 .name = "arm966e_s",
16201750 .llvm_name = "arm966e-s",
16211751 .features = featureSet(&[_]Feature{
1622 .v5te,
1752 .armv5te,
16231753 }),
16241754 };
16251755 pub const arm968e_s = CpuModel{
16261756 .name = "arm968e_s",
16271757 .llvm_name = "arm968e-s",
16281758 .features = featureSet(&[_]Feature{
1629 .v5te,
1759 .armv5te,
16301760 }),
16311761 };
16321762 pub const arm9e = CpuModel{
16331763 .name = "arm9e",
16341764 .llvm_name = "arm9e",
16351765 .features = featureSet(&[_]Feature{
1636 .v5te,
1766 .armv5te,
16371767 }),
16381768 };
16391769 pub const arm9tdmi = CpuModel{
16401770 .name = "arm9tdmi",
16411771 .llvm_name = "arm9tdmi",
16421772 .features = featureSet(&[_]Feature{
1643 .v4t,
1644 }),
1645 };
1646 pub const baseline = CpuModel{
1647 .name = "baseline",
1648 .llvm_name = "generic",
1649 .features = featureSet(&[_]Feature{
1650 .v7a,
1773 .armv4t,
16511774 }),
16521775 };
16531776 pub const cortex_a12 = CpuModel{
16541777 .name = "cortex_a12",
16551778 .llvm_name = "cortex-a12",
16561779 .features = featureSet(&[_]Feature{
1657 .v7a,
1780 .a12,
1781 .armv7_a,
16581782 .avoid_partial_cpsr,
16591783 .mp,
16601784 .ret_addr_stack,
......@@ -1668,7 +1792,8 @@ pub const cpu = struct {
16681792 .name = "cortex_a15",
16691793 .llvm_name = "cortex-a15",
16701794 .features = featureSet(&[_]Feature{
1671 .v7a,
1795 .a15,
1796 .armv7_a,
16721797 .avoid_partial_cpsr,
16731798 .dont_widen_vmovs,
16741799 .mp,
......@@ -1685,7 +1810,8 @@ pub const cpu = struct {
16851810 .name = "cortex_a17",
16861811 .llvm_name = "cortex-a17",
16871812 .features = featureSet(&[_]Feature{
1688 .v7a,
1813 .a17,
1814 .armv7_a,
16891815 .avoid_partial_cpsr,
16901816 .mp,
16911817 .ret_addr_stack,
......@@ -1699,29 +1825,31 @@ pub const cpu = struct {
16991825 .name = "cortex_a32",
17001826 .llvm_name = "cortex-a32",
17011827 .features = featureSet(&[_]Feature{
1828 .armv8_a,
17021829 .crc,
17031830 .crypto,
17041831 .hwdiv,
17051832 .hwdiv_arm,
1706 .v8a,
17071833 }),
17081834 };
17091835 pub const cortex_a35 = CpuModel{
17101836 .name = "cortex_a35",
17111837 .llvm_name = "cortex-a35",
17121838 .features = featureSet(&[_]Feature{
1839 .a35,
1840 .armv8_a,
17131841 .crc,
17141842 .crypto,
17151843 .hwdiv,
17161844 .hwdiv_arm,
1717 .v8a,
17181845 }),
17191846 };
17201847 pub const cortex_a5 = CpuModel{
17211848 .name = "cortex_a5",
17221849 .llvm_name = "cortex-a5",
17231850 .features = featureSet(&[_]Feature{
1724 .v7a,
1851 .a5,
1852 .armv7_a,
17251853 .mp,
17261854 .ret_addr_stack,
17271855 .slow_fp_brcc,
......@@ -1736,7 +1864,8 @@ pub const cpu = struct {
17361864 .name = "cortex_a53",
17371865 .llvm_name = "cortex-a53",
17381866 .features = featureSet(&[_]Feature{
1739 .v8a,
1867 .a53,
1868 .armv8_a,
17401869 .crc,
17411870 .crypto,
17421871 .fpao,
......@@ -1748,7 +1877,8 @@ pub const cpu = struct {
17481877 .name = "cortex_a55",
17491878 .llvm_name = "cortex-a55",
17501879 .features = featureSet(&[_]Feature{
1751 .v8_2a,
1880 .a55,
1881 .armv8_2_a,
17521882 .dotprod,
17531883 .hwdiv,
17541884 .hwdiv_arm,
......@@ -1758,7 +1888,8 @@ pub const cpu = struct {
17581888 .name = "cortex_a57",
17591889 .llvm_name = "cortex-a57",
17601890 .features = featureSet(&[_]Feature{
1761 .v8a,
1891 .a57,
1892 .armv8_a,
17621893 .avoid_partial_cpsr,
17631894 .cheap_predicable_cpsr,
17641895 .crc,
......@@ -1772,7 +1903,8 @@ pub const cpu = struct {
17721903 .name = "cortex_a7",
17731904 .llvm_name = "cortex-a7",
17741905 .features = featureSet(&[_]Feature{
1775 .v7a,
1906 .a7,
1907 .armv7_a,
17761908 .mp,
17771909 .ret_addr_stack,
17781910 .slow_fp_brcc,
......@@ -1789,7 +1921,8 @@ pub const cpu = struct {
17891921 .name = "cortex_a72",
17901922 .llvm_name = "cortex-a72",
17911923 .features = featureSet(&[_]Feature{
1792 .v8a,
1924 .a72,
1925 .armv8_a,
17931926 .crc,
17941927 .crypto,
17951928 .hwdiv,
......@@ -1800,7 +1933,8 @@ pub const cpu = struct {
18001933 .name = "cortex_a73",
18011934 .llvm_name = "cortex-a73",
18021935 .features = featureSet(&[_]Feature{
1803 .v8a,
1936 .a73,
1937 .armv8_a,
18041938 .crc,
18051939 .crypto,
18061940 .hwdiv,
......@@ -1811,7 +1945,8 @@ pub const cpu = struct {
18111945 .name = "cortex_a75",
18121946 .llvm_name = "cortex-a75",
18131947 .features = featureSet(&[_]Feature{
1814 .v8_2a,
1948 .a75,
1949 .armv8_2_a,
18151950 .dotprod,
18161951 .hwdiv,
18171952 .hwdiv_arm,
......@@ -1822,7 +1957,7 @@ pub const cpu = struct {
18221957 .llvm_name = "cortex-a76",
18231958 .features = featureSet(&[_]Feature{
18241959 .a76,
1825 .v8_2a,
1960 .armv8_2_a,
18261961 .crc,
18271962 .crypto,
18281963 .dotprod,
......@@ -1836,7 +1971,7 @@ pub const cpu = struct {
18361971 .llvm_name = "cortex-a76ae",
18371972 .features = featureSet(&[_]Feature{
18381973 .a76,
1839 .v8_2a,
1974 .armv8_2_a,
18401975 .crc,
18411976 .crypto,
18421977 .dotprod,
......@@ -1849,7 +1984,8 @@ pub const cpu = struct {
18491984 .name = "cortex_a77",
18501985 .llvm_name = "cortex-a77",
18511986 .features = featureSet(&[_]Feature{
1852 .v8_2a,
1987 .a77,
1988 .armv8_2_a,
18531989 .crc,
18541990 .crypto,
18551991 .dotprod,
......@@ -1862,7 +1998,8 @@ pub const cpu = struct {
18621998 .name = "cortex_a78",
18631999 .llvm_name = "cortex-a78",
18642000 .features = featureSet(&[_]Feature{
1865 .v8_2a,
2001 .armv8_2_a,
2002 .cortex_a78,
18662003 .crc,
18672004 .crypto,
18682005 .dotprod,
......@@ -1875,7 +2012,8 @@ pub const cpu = struct {
18752012 .name = "cortex_a8",
18762013 .llvm_name = "cortex-a8",
18772014 .features = featureSet(&[_]Feature{
1878 .v7a,
2015 .a8,
2016 .armv7_a,
18792017 .nonpipelined_vfp,
18802018 .ret_addr_stack,
18812019 .slow_fp_brcc,
......@@ -1890,7 +2028,8 @@ pub const cpu = struct {
18902028 .name = "cortex_a9",
18912029 .llvm_name = "cortex-a9",
18922030 .features = featureSet(&[_]Feature{
1893 .v7a,
2031 .a9,
2032 .armv7_a,
18942033 .avoid_partial_cpsr,
18952034 .expand_fp_mlx,
18962035 .fp16,
......@@ -1909,28 +2048,28 @@ pub const cpu = struct {
19092048 .name = "cortex_m0",
19102049 .llvm_name = "cortex-m0",
19112050 .features = featureSet(&[_]Feature{
1912 .v6m,
2051 .armv6_m,
19132052 }),
19142053 };
19152054 pub const cortex_m0plus = CpuModel{
19162055 .name = "cortex_m0plus",
19172056 .llvm_name = "cortex-m0plus",
19182057 .features = featureSet(&[_]Feature{
1919 .v6m,
2058 .armv6_m,
19202059 }),
19212060 };
19222061 pub const cortex_m1 = CpuModel{
19232062 .name = "cortex_m1",
19242063 .llvm_name = "cortex-m1",
19252064 .features = featureSet(&[_]Feature{
1926 .v6m,
2065 .armv6_m,
19272066 }),
19282067 };
19292068 pub const cortex_m23 = CpuModel{
19302069 .name = "cortex_m23",
19312070 .llvm_name = "cortex-m23",
19322071 .features = featureSet(&[_]Feature{
1933 .v8m,
2072 .armv8_m_base,
19342073 .no_movt,
19352074 }),
19362075 };
......@@ -1938,7 +2077,7 @@ pub const cpu = struct {
19382077 .name = "cortex_m3",
19392078 .llvm_name = "cortex-m3",
19402079 .features = featureSet(&[_]Feature{
1941 .v7m,
2080 .armv7_m,
19422081 .loop_align,
19432082 .m3,
19442083 .no_branch_predictor,
......@@ -1949,7 +2088,7 @@ pub const cpu = struct {
19492088 .name = "cortex_m33",
19502089 .llvm_name = "cortex-m33",
19512090 .features = featureSet(&[_]Feature{
1952 .v8m_main,
2091 .armv8_m_main,
19532092 .dsp,
19542093 .fp_armv8d16sp,
19552094 .loop_align,
......@@ -1963,7 +2102,7 @@ pub const cpu = struct {
19632102 .name = "cortex_m35p",
19642103 .llvm_name = "cortex-m35p",
19652104 .features = featureSet(&[_]Feature{
1966 .v8m_main,
2105 .armv8_m_main,
19672106 .dsp,
19682107 .fp_armv8d16sp,
19692108 .loop_align,
......@@ -1977,7 +2116,7 @@ pub const cpu = struct {
19772116 .name = "cortex_m4",
19782117 .llvm_name = "cortex-m4",
19792118 .features = featureSet(&[_]Feature{
1980 .v7em,
2119 .armv7e_m,
19812120 .loop_align,
19822121 .no_branch_predictor,
19832122 .slowfpvfmx,
......@@ -1990,7 +2129,7 @@ pub const cpu = struct {
19902129 .name = "cortex_m55",
19912130 .llvm_name = "cortex-m55",
19922131 .features = featureSet(&[_]Feature{
1993 .v8_1m_main,
2132 .armv8_1_m_main,
19942133 .dsp,
19952134 .fp_armv8d16,
19962135 .loop_align,
......@@ -2004,15 +2143,16 @@ pub const cpu = struct {
20042143 .name = "cortex_m7",
20052144 .llvm_name = "cortex-m7",
20062145 .features = featureSet(&[_]Feature{
2007 .v7em,
2146 .armv7e_m,
20082147 .fp_armv8d16,
2148 .use_misched,
20092149 }),
20102150 };
20112151 pub const cortex_r4 = CpuModel{
20122152 .name = "cortex_r4",
20132153 .llvm_name = "cortex-r4",
20142154 .features = featureSet(&[_]Feature{
2015 .v7r,
2155 .armv7_r,
20162156 .avoid_partial_cpsr,
20172157 .r4,
20182158 .ret_addr_stack,
......@@ -2022,7 +2162,7 @@ pub const cpu = struct {
20222162 .name = "cortex_r4f",
20232163 .llvm_name = "cortex-r4f",
20242164 .features = featureSet(&[_]Feature{
2025 .v7r,
2165 .armv7_r,
20262166 .avoid_partial_cpsr,
20272167 .r4,
20282168 .ret_addr_stack,
......@@ -2036,9 +2176,10 @@ pub const cpu = struct {
20362176 .name = "cortex_r5",
20372177 .llvm_name = "cortex-r5",
20382178 .features = featureSet(&[_]Feature{
2039 .v7r,
2179 .armv7_r,
20402180 .avoid_partial_cpsr,
20412181 .hwdiv_arm,
2182 .r5,
20422183 .ret_addr_stack,
20432184 .slow_fp_brcc,
20442185 .slowfpvfmx,
......@@ -2050,8 +2191,9 @@ pub const cpu = struct {
20502191 .name = "cortex_r52",
20512192 .llvm_name = "cortex-r52",
20522193 .features = featureSet(&[_]Feature{
2053 .v8r,
2194 .armv8_r,
20542195 .fpao,
2196 .r52,
20552197 .use_misched,
20562198 }),
20572199 };
......@@ -2059,11 +2201,12 @@ pub const cpu = struct {
20592201 .name = "cortex_r7",
20602202 .llvm_name = "cortex-r7",
20612203 .features = featureSet(&[_]Feature{
2062 .v7r,
2204 .armv7_r,
20632205 .avoid_partial_cpsr,
20642206 .fp16,
20652207 .hwdiv_arm,
20662208 .mp,
2209 .r7,
20672210 .ret_addr_stack,
20682211 .slow_fp_brcc,
20692212 .slowfpvfmx,
......@@ -2075,7 +2218,7 @@ pub const cpu = struct {
20752218 .name = "cortex_r8",
20762219 .llvm_name = "cortex-r8",
20772220 .features = featureSet(&[_]Feature{
2078 .v7r,
2221 .armv7_r,
20792222 .avoid_partial_cpsr,
20802223 .fp16,
20812224 .hwdiv_arm,
......@@ -2091,7 +2234,8 @@ pub const cpu = struct {
20912234 .name = "cortex_x1",
20922235 .llvm_name = "cortex-x1",
20932236 .features = featureSet(&[_]Feature{
2094 .v8_2a,
2237 .armv8_2_a,
2238 .cortex_x1,
20952239 .crc,
20962240 .crypto,
20972241 .dotprod,
......@@ -2104,7 +2248,7 @@ pub const cpu = struct {
21042248 .name = "cyclone",
21052249 .llvm_name = "cyclone",
21062250 .features = featureSet(&[_]Feature{
2107 .v8a,
2251 .armv8_a,
21082252 .avoid_movs_shop,
21092253 .avoid_partial_cpsr,
21102254 .crypto,
......@@ -2126,30 +2270,14 @@ pub const cpu = struct {
21262270 .name = "ep9312",
21272271 .llvm_name = "ep9312",
21282272 .features = featureSet(&[_]Feature{
2129 .v4t,
2130 }),
2131 };
2132 pub const exynos_m1 = CpuModel{
2133 .name = "exynos_m1",
2134 .llvm_name = null,
2135 .features = featureSet(&[_]Feature{
2136 .v8a,
2137 .exynos,
2138 }),
2139 };
2140 pub const exynos_m2 = CpuModel{
2141 .name = "exynos_m2",
2142 .llvm_name = null,
2143 .features = featureSet(&[_]Feature{
2144 .v8a,
2145 .exynos,
2273 .armv4t,
21462274 }),
21472275 };
21482276 pub const exynos_m3 = CpuModel{
21492277 .name = "exynos_m3",
21502278 .llvm_name = "exynos-m3",
21512279 .features = featureSet(&[_]Feature{
2152 .v8_2a,
2280 .armv8_a,
21532281 .exynos,
21542282 }),
21552283 };
......@@ -2157,7 +2285,7 @@ pub const cpu = struct {
21572285 .name = "exynos_m4",
21582286 .llvm_name = "exynos-m4",
21592287 .features = featureSet(&[_]Feature{
2160 .v8_2a,
2288 .armv8_2_a,
21612289 .dotprod,
21622290 .exynos,
21632291 .fullfp16,
......@@ -2167,10 +2295,10 @@ pub const cpu = struct {
21672295 .name = "exynos_m5",
21682296 .llvm_name = "exynos-m5",
21692297 .features = featureSet(&[_]Feature{
2298 .armv8_2_a,
21702299 .dotprod,
21712300 .exynos,
21722301 .fullfp16,
2173 .v8_2a,
21742302 }),
21752303 };
21762304 pub const generic = CpuModel{
......@@ -2182,20 +2310,21 @@ pub const cpu = struct {
21822310 .name = "iwmmxt",
21832311 .llvm_name = "iwmmxt",
21842312 .features = featureSet(&[_]Feature{
2185 .v5te,
2313 .armv5te,
21862314 }),
21872315 };
21882316 pub const krait = CpuModel{
21892317 .name = "krait",
21902318 .llvm_name = "krait",
21912319 .features = featureSet(&[_]Feature{
2320 .armv7_a,
21922321 .avoid_partial_cpsr,
21932322 .fp16,
21942323 .hwdiv,
21952324 .hwdiv_arm,
2325 .krait,
21962326 .muxed_units,
21972327 .ret_addr_stack,
2198 .v7a,
21992328 .vfp4,
22002329 .vldn_align,
22012330 .vmlx_forwarding,
......@@ -2205,18 +2334,19 @@ pub const cpu = struct {
22052334 .name = "kryo",
22062335 .llvm_name = "kryo",
22072336 .features = featureSet(&[_]Feature{
2337 .armv8_a,
22082338 .crc,
22092339 .crypto,
22102340 .hwdiv,
22112341 .hwdiv_arm,
2212 .v8a,
2342 .kryo,
22132343 }),
22142344 };
22152345 pub const mpcore = CpuModel{
22162346 .name = "mpcore",
22172347 .llvm_name = "mpcore",
22182348 .features = featureSet(&[_]Feature{
2219 .v6k,
2349 .armv6k,
22202350 .slowfpvmlx,
22212351 .vfp2,
22222352 }),
......@@ -2225,14 +2355,14 @@ pub const cpu = struct {
22252355 .name = "mpcorenovfp",
22262356 .llvm_name = "mpcorenovfp",
22272357 .features = featureSet(&[_]Feature{
2228 .v6k,
2358 .armv6k,
22292359 }),
22302360 };
22312361 pub const neoverse_n1 = CpuModel{
22322362 .name = "neoverse_n1",
22332363 .llvm_name = "neoverse-n1",
22342364 .features = featureSet(&[_]Feature{
2235 .v8_2a,
2365 .armv8_2_a,
22362366 .crc,
22372367 .crypto,
22382368 .dotprod,
......@@ -2240,18 +2370,42 @@ pub const cpu = struct {
22402370 .hwdiv_arm,
22412371 }),
22422372 };
2373 pub const neoverse_n2 = CpuModel{
2374 .name = "neoverse_n2",
2375 .llvm_name = "neoverse-n2",
2376 .features = featureSet(&[_]Feature{
2377 .armv8_5_a,
2378 .bf16,
2379 ._i8mm,
2380 .perfmon,
2381 }),
2382 };
2383 pub const neoverse_v1 = CpuModel{
2384 .name = "neoverse_v1",
2385 .llvm_name = "neoverse-v1",
2386 .features = featureSet(&[_]Feature{
2387 .armv8_4_a,
2388 .bf16,
2389 .crc,
2390 .crypto,
2391 .fullfp16,
2392 .hwdiv,
2393 .hwdiv_arm,
2394 ._i8mm,
2395 }),
2396 };
22432397 pub const sc000 = CpuModel{
22442398 .name = "sc000",
22452399 .llvm_name = "sc000",
22462400 .features = featureSet(&[_]Feature{
2247 .v6m,
2401 .armv6_m,
22482402 }),
22492403 };
22502404 pub const sc300 = CpuModel{
22512405 .name = "sc300",
22522406 .llvm_name = "sc300",
22532407 .features = featureSet(&[_]Feature{
2254 .v7m,
2408 .armv7_m,
22552409 .m3,
22562410 .no_branch_predictor,
22572411 .use_misched,
......@@ -2261,35 +2415,35 @@ pub const cpu = struct {
22612415 .name = "strongarm",
22622416 .llvm_name = "strongarm",
22632417 .features = featureSet(&[_]Feature{
2264 .v4,
2418 .armv4,
22652419 }),
22662420 };
22672421 pub const strongarm110 = CpuModel{
22682422 .name = "strongarm110",
22692423 .llvm_name = "strongarm110",
22702424 .features = featureSet(&[_]Feature{
2271 .v4,
2425 .armv4,
22722426 }),
22732427 };
22742428 pub const strongarm1100 = CpuModel{
22752429 .name = "strongarm1100",
22762430 .llvm_name = "strongarm1100",
22772431 .features = featureSet(&[_]Feature{
2278 .v4,
2432 .armv4,
22792433 }),
22802434 };
22812435 pub const strongarm1110 = CpuModel{
22822436 .name = "strongarm1110",
22832437 .llvm_name = "strongarm1110",
22842438 .features = featureSet(&[_]Feature{
2285 .v4,
2439 .armv4,
22862440 }),
22872441 };
22882442 pub const swift = CpuModel{
22892443 .name = "swift",
22902444 .llvm_name = "swift",
22912445 .features = featureSet(&[_]Feature{
2292 .v7a,
2446 .armv7_a,
22932447 .avoid_movs_shop,
22942448 .avoid_partial_cpsr,
22952449 .disable_postra_scheduler,
......@@ -2317,7 +2471,7 @@ pub const cpu = struct {
23172471 .name = "xscale",
23182472 .llvm_name = "xscale",
23192473 .features = featureSet(&[_]Feature{
2320 .v5te,
2474 .armv5te,
23212475 }),
23222476 };
23232477};
lib/std/target/avr.zig+63-6
......@@ -47,6 +47,7 @@ pub const Feature = enum {
4747pub usingnamespace CpuFeature.feature_set_fns(Feature);
4848
4949pub const all_features = blk: {
50 @setEvalBranchQuota(10000);
5051 const len = @typeInfo(Feature).Enum.fields.len;
5152 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
5253 var result: [len]CpuFeature = undefined;
......@@ -163,7 +164,6 @@ pub const all_features = blk: {
163164 .dependencies = featureSet(&[_]Feature{
164165 .avr0,
165166 .@"break",
166 .memmappedregs,
167167 .sram,
168168 .tinyencoding,
169169 }),
......@@ -802,6 +802,13 @@ pub const cpu = struct {
802802 .avr5,
803803 }),
804804 };
805 pub const atmega168pb = CpuModel{
806 .name = "atmega168pb",
807 .llvm_name = "atmega168pb",
808 .features = featureSet(&[_]Feature{
809 .avr5,
810 }),
811 };
805812 pub const atmega169 = CpuModel{
806813 .name = "atmega169",
807814 .llvm_name = "atmega169",
......@@ -949,6 +956,13 @@ pub const cpu = struct {
949956 .avr5,
950957 }),
951958 };
959 pub const atmega324pb = CpuModel{
960 .name = "atmega324pb",
961 .llvm_name = "atmega324pb",
962 .features = featureSet(&[_]Feature{
963 .avr5,
964 }),
965 };
952966 pub const atmega325 = CpuModel{
953967 .name = "atmega325",
954968 .llvm_name = "atmega325",
......@@ -1019,6 +1033,13 @@ pub const cpu = struct {
10191033 .avr5,
10201034 }),
10211035 };
1036 pub const atmega328pb = CpuModel{
1037 .name = "atmega328pb",
1038 .llvm_name = "atmega328pb",
1039 .features = featureSet(&[_]Feature{
1040 .avr5,
1041 }),
1042 };
10221043 pub const atmega329 = CpuModel{
10231044 .name = "atmega329",
10241045 .llvm_name = "atmega329",
......@@ -1166,6 +1187,13 @@ pub const cpu = struct {
11661187 .avr4,
11671188 }),
11681189 };
1190 pub const atmega48pb = CpuModel{
1191 .name = "atmega48pb",
1192 .llvm_name = "atmega48pb",
1193 .features = featureSet(&[_]Feature{
1194 .avr4,
1195 }),
1196 };
11691197 pub const atmega64 = CpuModel{
11701198 .name = "atmega64",
11711199 .llvm_name = "atmega64",
......@@ -1338,7 +1366,11 @@ pub const cpu = struct {
13381366 .name = "atmega8",
13391367 .llvm_name = "atmega8",
13401368 .features = featureSet(&[_]Feature{
1341 .avr4,
1369 .avr2,
1370 .lpmx,
1371 .movw,
1372 .mul,
1373 .spm,
13421374 }),
13431375 };
13441376 pub const atmega8515 = CpuModel{
......@@ -1391,11 +1423,22 @@ pub const cpu = struct {
13911423 .avr4,
13921424 }),
13931425 };
1426 pub const atmega88pb = CpuModel{
1427 .name = "atmega88pb",
1428 .llvm_name = "atmega88pb",
1429 .features = featureSet(&[_]Feature{
1430 .avr4,
1431 }),
1432 };
13941433 pub const atmega8a = CpuModel{
13951434 .name = "atmega8a",
13961435 .llvm_name = "atmega8a",
13971436 .features = featureSet(&[_]Feature{
1398 .avr4,
1437 .avr2,
1438 .lpmx,
1439 .movw,
1440 .mul,
1441 .spm,
13991442 }),
14001443 };
14011444 pub const atmega8hva = CpuModel{
......@@ -1595,6 +1638,13 @@ pub const cpu = struct {
15951638 .avr25,
15961639 }),
15971640 };
1641 pub const attiny441 = CpuModel{
1642 .name = "attiny441",
1643 .llvm_name = "attiny441",
1644 .features = featureSet(&[_]Feature{
1645 .avr25,
1646 }),
1647 };
15981648 pub const attiny44a = CpuModel{
15991649 .name = "attiny44a",
16001650 .llvm_name = "attiny44a",
......@@ -1651,6 +1701,13 @@ pub const cpu = struct {
16511701 .avr25,
16521702 }),
16531703 };
1704 pub const attiny841 = CpuModel{
1705 .name = "attiny841",
1706 .llvm_name = "attiny841",
1707 .features = featureSet(&[_]Feature{
1708 .avr25,
1709 }),
1710 };
16541711 pub const attiny84a = CpuModel{
16551712 .name = "attiny84a",
16561713 .llvm_name = "attiny84a",
......@@ -1802,7 +1859,7 @@ pub const cpu = struct {
18021859 .name = "atxmega16e5",
18031860 .llvm_name = "atxmega16e5",
18041861 .features = featureSet(&[_]Feature{
1805 .xmega,
1862 .xmegau,
18061863 }),
18071864 };
18081865 pub const atxmega192a3 = CpuModel{
......@@ -1907,7 +1964,7 @@ pub const cpu = struct {
19071964 .name = "atxmega32e5",
19081965 .llvm_name = "atxmega32e5",
19091966 .features = featureSet(&[_]Feature{
1910 .xmega,
1967 .xmegau,
19111968 }),
19121969 };
19131970 pub const atxmega32x1 = CpuModel{
......@@ -2005,7 +2062,7 @@ pub const cpu = struct {
20052062 .name = "atxmega8e5",
20062063 .llvm_name = "atxmega8e5",
20072064 .features = featureSet(&[_]Feature{
2008 .xmega,
2065 .xmegau,
20092066 }),
20102067 };
20112068 pub const avr1 = CpuModel{
lib/std/target/bpf.zig+1
......@@ -16,6 +16,7 @@ pub const Feature = enum {
1616pub usingnamespace CpuFeature.feature_set_fns(Feature);
1717
1818pub const all_features = blk: {
19 @setEvalBranchQuota(10000);
1920 const len = @typeInfo(Feature).Enum.fields.len;
2021 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
2122 var result: [len]CpuFeature = undefined;
lib/std/target/hexagon.zig+1
......@@ -44,6 +44,7 @@ pub const Feature = enum {
4444pub usingnamespace CpuFeature.feature_set_fns(Feature);
4545
4646pub const all_features = blk: {
47 @setEvalBranchQuota(10000);
4748 const len = @typeInfo(Feature).Enum.fields.len;
4849 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
4950 var result: [len]CpuFeature = undefined;
lib/std/target/mips.zig+1
......@@ -65,6 +65,7 @@ pub const Feature = enum {
6565pub usingnamespace CpuFeature.feature_set_fns(Feature);
6666
6767pub const all_features = blk: {
68 @setEvalBranchQuota(10000);
6869 const len = @typeInfo(Feature).Enum.fields.len;
6970 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
7071 var result: [len]CpuFeature = undefined;
lib/std/target/msp430.zig+1
......@@ -17,6 +17,7 @@ pub const Feature = enum {
1717pub usingnamespace CpuFeature.feature_set_fns(Feature);
1818
1919pub const all_features = blk: {
20 @setEvalBranchQuota(10000);
2021 const len = @typeInfo(Feature).Enum.fields.len;
2122 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
2223 var result: [len]CpuFeature = undefined;
lib/std/target/nvptx.zig+1
......@@ -41,6 +41,7 @@ pub const Feature = enum {
4141pub usingnamespace CpuFeature.feature_set_fns(Feature);
4242
4343pub const all_features = blk: {
44 @setEvalBranchQuota(10000);
4445 const len = @typeInfo(Feature).Enum.fields.len;
4546 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
4647 var result: [len]CpuFeature = undefined;
lib/std/target/powerpc.zig+66-62
......@@ -32,6 +32,7 @@ pub const Feature = enum {
3232 fsqrt,
3333 fuse_addi_load,
3434 fuse_addis_load,
35 fuse_store,
3536 fusion,
3637 hard_float,
3738 htm,
......@@ -44,7 +45,9 @@ pub const Feature = enum {
4445 lfiwax,
4546 longcall,
4647 mfocrf,
48 mma,
4749 msync,
50 paired_vector_memops,
4851 partword_atomics,
4952 pcrelative_memops,
5053 popcntd,
......@@ -59,7 +62,6 @@ pub const Feature = enum {
5962 ppc6xx,
6063 predictable_select_expensive,
6164 prefix_instrs,
62 qpx,
6365 recipprec,
6466 secure_plt,
6567 slow_popcntd,
......@@ -73,6 +75,7 @@ pub const Feature = enum {
7375pub usingnamespace CpuFeature.feature_set_fns(Feature);
7476
7577pub const all_features = blk: {
78 @setEvalBranchQuota(10000);
7679 const len = @typeInfo(Feature).Enum.fields.len;
7780 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
7881 var result: [len]CpuFeature = undefined;
......@@ -228,6 +231,13 @@ pub const all_features = blk: {
228231 .fusion,
229232 }),
230233 };
234 result[@enumToInt(Feature.fuse_store)] = .{
235 .llvm_name = "fuse-store",
236 .description = "Target supports store clustering",
237 .dependencies = featureSet(&[_]Feature{
238 .fusion,
239 }),
240 };
231241 result[@enumToInt(Feature.fusion)] = .{
232242 .llvm_name = "fusion",
233243 .description = "Target supports instruction fusion",
......@@ -292,6 +302,15 @@ pub const all_features = blk: {
292302 .description = "Enable the MFOCRF instruction",
293303 .dependencies = featureSet(&[_]Feature{}),
294304 };
305 result[@enumToInt(Feature.mma)] = .{
306 .llvm_name = "mma",
307 .description = "Enable MMA instructions",
308 .dependencies = featureSet(&[_]Feature{
309 .paired_vector_memops,
310 .power8_vector,
311 .power9_altivec,
312 }),
313 };
295314 result[@enumToInt(Feature.msync)] = .{
296315 .llvm_name = "msync",
297316 .description = "Has only the msync instruction instead of sync",
......@@ -299,6 +318,13 @@ pub const all_features = blk: {
299318 .booke,
300319 }),
301320 };
321 result[@enumToInt(Feature.paired_vector_memops)] = .{
322 .llvm_name = "paired-vector-memops",
323 .description = "32Byte load and store instructions",
324 .dependencies = featureSet(&[_]Feature{
325 .isa_v30_instructions,
326 }),
327 };
302328 result[@enumToInt(Feature.partword_atomics)] = .{
303329 .llvm_name = "partword-atomics",
304330 .description = "Enable l[bh]arx and st[bh]cx.",
......@@ -309,6 +335,7 @@ pub const all_features = blk: {
309335 .description = "Enable PC relative Memory Ops",
310336 .dependencies = featureSet(&[_]Feature{
311337 .isa_v30_instructions,
338 .prefix_instrs,
312339 }),
313340 };
314341 result[@enumToInt(Feature.popcntd)] = .{
......@@ -390,13 +417,6 @@ pub const all_features = blk: {
390417 .power9_altivec,
391418 }),
392419 };
393 result[@enumToInt(Feature.qpx)] = .{
394 .llvm_name = "qpx",
395 .description = "Enable QPX instructions",
396 .dependencies = featureSet(&[_]Feature{
397 .fpu,
398 }),
399 };
400420 result[@enumToInt(Feature.recipprec)] = .{
401421 .llvm_name = "recipprec",
402422 .description = "Assume higher precision reciprocal estimates",
......@@ -452,8 +472,8 @@ pub const all_features = blk: {
452472};
453473
454474pub const cpu = struct {
455 pub const @"ppc440" = CpuModel{
456 .name = "ppc440",
475 pub const @"440" = CpuModel{
476 .name = "440",
457477 .llvm_name = "440",
458478 .features = featureSet(&[_]Feature{
459479 .booke,
......@@ -464,8 +484,8 @@ pub const cpu = struct {
464484 .msync,
465485 }),
466486 };
467 pub const @"ppc450" = CpuModel{
468 .name = "ppc450",
487 pub const @"450" = CpuModel{
488 .name = "450",
469489 .llvm_name = "450",
470490 .features = featureSet(&[_]Feature{
471491 .booke,
......@@ -476,70 +496,70 @@ pub const cpu = struct {
476496 .msync,
477497 }),
478498 };
479 pub const @"ppc601" = CpuModel{
480 .name = "ppc601",
499 pub const @"601" = CpuModel{
500 .name = "601",
481501 .llvm_name = "601",
482502 .features = featureSet(&[_]Feature{
483503 .fpu,
484504 }),
485505 };
486 pub const @"ppc602" = CpuModel{
487 .name = "ppc602",
506 pub const @"602" = CpuModel{
507 .name = "602",
488508 .llvm_name = "602",
489509 .features = featureSet(&[_]Feature{
490510 .fpu,
491511 }),
492512 };
493 pub const @"ppc603" = CpuModel{
494 .name = "ppc603",
513 pub const @"603" = CpuModel{
514 .name = "603",
495515 .llvm_name = "603",
496516 .features = featureSet(&[_]Feature{
497517 .fres,
498518 .frsqrte,
499519 }),
500520 };
501 pub const @"ppc603e" = CpuModel{
502 .name = "ppc603e",
521 pub const @"603e" = CpuModel{
522 .name = "603e",
503523 .llvm_name = "603e",
504524 .features = featureSet(&[_]Feature{
505525 .fres,
506526 .frsqrte,
507527 }),
508528 };
509 pub const @"ppc603ev" = CpuModel{
510 .name = "ppc603ev",
529 pub const @"603ev" = CpuModel{
530 .name = "603ev",
511531 .llvm_name = "603ev",
512532 .features = featureSet(&[_]Feature{
513533 .fres,
514534 .frsqrte,
515535 }),
516536 };
517 pub const @"ppc604" = CpuModel{
518 .name = "ppc604",
537 pub const @"604" = CpuModel{
538 .name = "604",
519539 .llvm_name = "604",
520540 .features = featureSet(&[_]Feature{
521541 .fres,
522542 .frsqrte,
523543 }),
524544 };
525 pub const @"ppc604e" = CpuModel{
526 .name = "ppc604e",
545 pub const @"604e" = CpuModel{
546 .name = "604e",
527547 .llvm_name = "604e",
528548 .features = featureSet(&[_]Feature{
529549 .fres,
530550 .frsqrte,
531551 }),
532552 };
533 pub const @"ppc620" = CpuModel{
534 .name = "ppc620",
553 pub const @"620" = CpuModel{
554 .name = "620",
535555 .llvm_name = "620",
536556 .features = featureSet(&[_]Feature{
537557 .fres,
538558 .frsqrte,
539559 }),
540560 };
541 pub const @"ppc7400" = CpuModel{
542 .name = "ppc7400",
561 pub const @"7400" = CpuModel{
562 .name = "7400",
543563 .llvm_name = "7400",
544564 .features = featureSet(&[_]Feature{
545565 .altivec,
......@@ -547,8 +567,8 @@ pub const cpu = struct {
547567 .frsqrte,
548568 }),
549569 };
550 pub const @"ppc7450" = CpuModel{
551 .name = "ppc7450",
570 pub const @"7450" = CpuModel{
571 .name = "7450",
552572 .llvm_name = "7450",
553573 .features = featureSet(&[_]Feature{
554574 .altivec,
......@@ -556,16 +576,16 @@ pub const cpu = struct {
556576 .frsqrte,
557577 }),
558578 };
559 pub const @"ppc750" = CpuModel{
560 .name = "ppc750",
579 pub const @"750" = CpuModel{
580 .name = "750",
561581 .llvm_name = "750",
562582 .features = featureSet(&[_]Feature{
563583 .fres,
564584 .frsqrte,
565585 }),
566586 };
567 pub const @"ppc970" = CpuModel{
568 .name = "ppc970",
587 pub const @"970" = CpuModel{
588 .name = "970",
569589 .llvm_name = "970",
570590 .features = featureSet(&[_]Feature{
571591 .@"64bit",
......@@ -602,32 +622,6 @@ pub const cpu = struct {
602622 .stfiwx,
603623 }),
604624 };
605 pub const a2q = CpuModel{
606 .name = "a2q",
607 .llvm_name = "a2q",
608 .features = featureSet(&[_]Feature{
609 .@"64bit",
610 .booke,
611 .cmpb,
612 .fcpsgn,
613 .fpcvt,
614 .fprnd,
615 .fre,
616 .fres,
617 .frsqrte,
618 .frsqrtes,
619 .fsqrt,
620 .icbt,
621 .isel,
622 .ldbrx,
623 .lfiwax,
624 .mfocrf,
625 .qpx,
626 .recipprec,
627 .slow_popcntd,
628 .stfiwx,
629 }),
630 };
631625 pub const e500 = CpuModel{
632626 .name = "e500",
633627 .llvm_name = "e500",
......@@ -681,6 +675,7 @@ pub const cpu = struct {
681675 .frsqrte,
682676 .frsqrtes,
683677 .fsqrt,
678 .fuse_store,
684679 .htm,
685680 .icbt,
686681 .isa_v30_instructions,
......@@ -689,6 +684,8 @@ pub const cpu = struct {
689684 .ldbrx,
690685 .lfiwax,
691686 .mfocrf,
687 .mma,
688 .paired_vector_memops,
692689 .partword_atomics,
693690 .pcrelative_memops,
694691 .popcntd,
......@@ -697,6 +694,8 @@ pub const cpu = struct {
697694 .power8_vector,
698695 .power9_altivec,
699696 .power9_vector,
697 .ppc_postra_sched,
698 .ppc_prera_sched,
700699 .predictable_select_expensive,
701700 .prefix_instrs,
702701 .recipprec,
......@@ -837,6 +836,7 @@ pub const cpu = struct {
837836 .frsqrte,
838837 .frsqrtes,
839838 .fsqrt,
839 .fuse_store,
840840 .htm,
841841 .icbt,
842842 .isa_v30_instructions,
......@@ -845,6 +845,8 @@ pub const cpu = struct {
845845 .ldbrx,
846846 .lfiwax,
847847 .mfocrf,
848 .mma,
849 .paired_vector_memops,
848850 .partword_atomics,
849851 .pcrelative_memops,
850852 .popcntd,
......@@ -853,6 +855,8 @@ pub const cpu = struct {
853855 .power8_vector,
854856 .power9_altivec,
855857 .power9_vector,
858 .ppc_postra_sched,
859 .ppc_prera_sched,
856860 .predictable_select_expensive,
857861 .prefix_instrs,
858862 .recipprec,
lib/std/target/riscv.zig+59-23
......@@ -25,6 +25,9 @@ pub const Feature = enum {
2525 experimental_zbr,
2626 experimental_zbs,
2727 experimental_zbt,
28 experimental_zfh,
29 experimental_zvamo,
30 experimental_zvlsseg,
2831 f,
2932 m,
3033 no_rvc_hints,
......@@ -66,6 +69,7 @@ pub const Feature = enum {
6669pub usingnamespace CpuFeature.feature_set_fns(Feature);
6770
6871pub const all_features = blk: {
72 @setEvalBranchQuota(10000);
6973 const len = @typeInfo(Feature).Enum.fields.len;
7074 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
7175 var result: [len]CpuFeature = undefined;
......@@ -168,6 +172,27 @@ pub const all_features = blk: {
168172 .description = "'Zbt' (Ternary 'B' Instructions)",
169173 .dependencies = featureSet(&[_]Feature{}),
170174 };
175 result[@enumToInt(Feature.experimental_zfh)] = .{
176 .llvm_name = "experimental-zfh",
177 .description = "'Zfh' (Half-Precision Floating-Point)",
178 .dependencies = featureSet(&[_]Feature{
179 .f,
180 }),
181 };
182 result[@enumToInt(Feature.experimental_zvamo)] = .{
183 .llvm_name = "experimental-zvamo",
184 .description = "'Zvamo'(Vector AMO Operations)",
185 .dependencies = featureSet(&[_]Feature{
186 .experimental_v,
187 }),
188 };
189 result[@enumToInt(Feature.experimental_zvlsseg)] = .{
190 .llvm_name = "experimental-zvlsseg",
191 .description = "'Zvlsseg' (Vector segment load/store instructions)",
192 .dependencies = featureSet(&[_]Feature{
193 .experimental_v,
194 }),
195 };
171196 result[@enumToInt(Feature.f)] = .{
172197 .llvm_name = "f",
173198 .description = "'F' (Single-Precision Floating-Point)",
......@@ -357,29 +382,6 @@ pub const all_features = blk: {
357382};
358383
359384pub const cpu = struct {
360 pub const baseline_rv32 = CpuModel{
361 .name = "baseline_rv32",
362 .llvm_name = null,
363 .features = featureSet(&[_]Feature{
364 .a,
365 .c,
366 .d,
367 .f,
368 .m,
369 }),
370 };
371 pub const baseline_rv64 = CpuModel{
372 .name = "baseline_rv64",
373 .llvm_name = null,
374 .features = featureSet(&[_]Feature{
375 .@"64bit",
376 .a,
377 .c,
378 .d,
379 .f,
380 .m,
381 }),
382 };
383385 pub const generic_rv32 = CpuModel{
384386 .name = "generic_rv32",
385387 .llvm_name = "generic-rv32",
......@@ -404,6 +406,18 @@ pub const cpu = struct {
404406 .@"64bit",
405407 }),
406408 };
409 pub const sifive_7_rv32 = CpuModel{
410 .name = "sifive_7_rv32",
411 .llvm_name = "sifive-7-rv32",
412 .features = featureSet(&[_]Feature{}),
413 };
414 pub const sifive_7_rv64 = CpuModel{
415 .name = "sifive_7_rv64",
416 .llvm_name = "sifive-7-rv64",
417 .features = featureSet(&[_]Feature{
418 .@"64bit",
419 }),
420 };
407421 pub const sifive_e31 = CpuModel{
408422 .name = "sifive_e31",
409423 .llvm_name = "sifive-e31",
......@@ -413,6 +427,16 @@ pub const cpu = struct {
413427 .m,
414428 }),
415429 };
430 pub const sifive_e76 = CpuModel{
431 .name = "sifive_e76",
432 .llvm_name = "sifive-e76",
433 .features = featureSet(&[_]Feature{
434 .a,
435 .c,
436 .f,
437 .m,
438 }),
439 };
416440 pub const sifive_u54 = CpuModel{
417441 .name = "sifive_u54",
418442 .llvm_name = "sifive-u54",
......@@ -425,4 +449,16 @@ pub const cpu = struct {
425449 .m,
426450 }),
427451 };
452 pub const sifive_u74 = CpuModel{
453 .name = "sifive_u74",
454 .llvm_name = "sifive-u74",
455 .features = featureSet(&[_]Feature{
456 .@"64bit",
457 .a,
458 .c,
459 .d,
460 .f,
461 .m,
462 }),
463 };
428464};
lib/std/target/sparc.zig+6
......@@ -32,6 +32,7 @@ pub const Feature = enum {
3232pub usingnamespace CpuFeature.feature_set_fns(Feature);
3333
3434pub const all_features = blk: {
35 @setEvalBranchQuota(10000);
3536 const len = @typeInfo(Feature).Enum.fields.len;
3637 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
3738 var result: [len]CpuFeature = undefined;
......@@ -160,6 +161,11 @@ pub const cpu = struct {
160161 .llvm_name = "f934",
161162 .features = featureSet(&[_]Feature{}),
162163 };
164 pub const generic = CpuModel{
165 .name = "generic",
166 .llvm_name = "generic",
167 .features = featureSet(&[_]Feature{}),
168 };
163169 pub const gr712rc = CpuModel{
164170 .name = "gr712rc",
165171 .llvm_name = "gr712rc",
lib/std/target/systemz.zig+1
......@@ -49,6 +49,7 @@ pub const Feature = enum {
4949pub usingnamespace CpuFeature.feature_set_fns(Feature);
5050
5151pub const all_features = blk: {
52 @setEvalBranchQuota(10000);
5253 const len = @typeInfo(Feature).Enum.fields.len;
5354 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
5455 var result: [len]CpuFeature = undefined;
lib/std/target/wasm.zig+1
......@@ -24,6 +24,7 @@ pub const Feature = enum {
2424pub usingnamespace CpuFeature.feature_set_fns(Feature);
2525
2626pub const all_features = blk: {
27 @setEvalBranchQuota(10000);
2728 const len = @typeInfo(Feature).Enum.fields.len;
2829 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
2930 var result: [len]CpuFeature = undefined;
lib/std/target/x86.zig+330-423
......@@ -8,9 +8,12 @@ const CpuFeature = std.Target.Cpu.Feature;
88const CpuModel = std.Target.Cpu.Model;
99
1010pub const Feature = enum {
11 @"16bit_mode",
12 @"32bit_mode",
1113 @"3dnow",
1214 @"3dnowa",
1315 @"64bit",
16 @"64bit_mode",
1417 adx,
1518 aes,
1619 amx_bf16,
......@@ -33,6 +36,7 @@ pub const Feature = enum {
3336 avx512vnni,
3437 avx512vp2intersect,
3538 avx512vpopcntdq,
39 avxvnni,
3640 bmi,
3741 bmi2,
3842 branchfusion,
......@@ -64,11 +68,14 @@ pub const Feature = enum {
6468 fma,
6569 fma4,
6670 fsgsbase,
71 fsrm,
6772 fxsr,
6873 gfni,
74 hreset,
6975 idivl_to_divb,
7076 idivq_to_divl,
7177 invpcid,
78 kl,
7279 lea_sp,
7380 lea_uses_ag,
7481 lvi_cfi,
......@@ -76,12 +83,10 @@ pub const Feature = enum {
7683 lwp,
7784 lzcnt,
7885 macrofusion,
79 merge_to_threeway_branch,
8086 mmx,
8187 movbe,
8288 movdir64b,
8389 movdiri,
84 mpx,
8590 mwaitx,
8691 nopl,
8792 pad_short_functions,
......@@ -129,6 +134,7 @@ pub const Feature = enum {
129134 ssse3,
130135 tbm,
131136 tsxldtrk,
137 uintr,
132138 use_aa,
133139 use_glm_div_sqrt_costs,
134140 vaes,
......@@ -136,6 +142,7 @@ pub const Feature = enum {
136142 vzeroupper,
137143 waitpkg,
138144 wbnoinvd,
145 widekl,
139146 x87,
140147 xop,
141148 xsave,
......@@ -147,9 +154,20 @@ pub const Feature = enum {
147154pub usingnamespace CpuFeature.feature_set_fns(Feature);
148155
149156pub const all_features = blk: {
157 @setEvalBranchQuota(10000);
150158 const len = @typeInfo(Feature).Enum.fields.len;
151159 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
152160 var result: [len]CpuFeature = undefined;
161 result[@enumToInt(Feature.@"16bit_mode")] = .{
162 .llvm_name = "16bit-mode",
163 .description = "16-bit mode (i8086)",
164 .dependencies = featureSet(&[_]Feature{}),
165 };
166 result[@enumToInt(Feature.@"32bit_mode")] = .{
167 .llvm_name = "32bit-mode",
168 .description = "32-bit mode (80386)",
169 .dependencies = featureSet(&[_]Feature{}),
170 };
153171 result[@enumToInt(Feature.@"3dnow")] = .{
154172 .llvm_name = "3dnow",
155173 .description = "Enable 3DNow! instructions",
......@@ -169,6 +187,11 @@ pub const all_features = blk: {
169187 .description = "Support 64-bit instructions",
170188 .dependencies = featureSet(&[_]Feature{}),
171189 };
190 result[@enumToInt(Feature.@"64bit_mode")] = .{
191 .llvm_name = "64bit-mode",
192 .description = "64-bit mode (x86_64)",
193 .dependencies = featureSet(&[_]Feature{}),
194 };
172195 result[@enumToInt(Feature.adx)] = .{
173196 .llvm_name = "adx",
174197 .description = "Support ADX instructions",
......@@ -321,6 +344,13 @@ pub const all_features = blk: {
321344 .avx512f,
322345 }),
323346 };
347 result[@enumToInt(Feature.avxvnni)] = .{
348 .llvm_name = "avxvnni",
349 .description = "Support AVX_VNNI encoding",
350 .dependencies = featureSet(&[_]Feature{
351 .avx2,
352 }),
353 };
324354 result[@enumToInt(Feature.bmi)] = .{
325355 .llvm_name = "bmi",
326356 .description = "Support BMI instructions",
......@@ -485,6 +515,11 @@ pub const all_features = blk: {
485515 .description = "Support FS/GS Base instructions",
486516 .dependencies = featureSet(&[_]Feature{}),
487517 };
518 result[@enumToInt(Feature.fsrm)] = .{
519 .llvm_name = "fsrm",
520 .description = "REP MOVSB of short lengths is faster",
521 .dependencies = featureSet(&[_]Feature{}),
522 };
488523 result[@enumToInt(Feature.fxsr)] = .{
489524 .llvm_name = "fxsr",
490525 .description = "Support fxsave/fxrestore instructions",
......@@ -497,6 +532,11 @@ pub const all_features = blk: {
497532 .sse2,
498533 }),
499534 };
535 result[@enumToInt(Feature.hreset)] = .{
536 .llvm_name = "hreset",
537 .description = "Has hreset instruction",
538 .dependencies = featureSet(&[_]Feature{}),
539 };
500540 result[@enumToInt(Feature.idivl_to_divb)] = .{
501541 .llvm_name = "idivl-to-divb",
502542 .description = "Use 8-bit divide for positive values less than 256",
......@@ -512,6 +552,13 @@ pub const all_features = blk: {
512552 .description = "Invalidate Process-Context Identifier",
513553 .dependencies = featureSet(&[_]Feature{}),
514554 };
555 result[@enumToInt(Feature.kl)] = .{
556 .llvm_name = "kl",
557 .description = "Support Key Locker kl Instructions",
558 .dependencies = featureSet(&[_]Feature{
559 .sse2,
560 }),
561 };
515562 result[@enumToInt(Feature.lea_sp)] = .{
516563 .llvm_name = "lea-sp",
517564 .description = "Use LEA for adjusting the stack pointer",
......@@ -547,11 +594,6 @@ pub const all_features = blk: {
547594 .description = "Various instructions can be fused with conditional branches",
548595 .dependencies = featureSet(&[_]Feature{}),
549596 };
550 result[@enumToInt(Feature.merge_to_threeway_branch)] = .{
551 .llvm_name = "merge-to-threeway-branch",
552 .description = "Merge branches to a three-way conditional branch",
553 .dependencies = featureSet(&[_]Feature{}),
554 };
555597 result[@enumToInt(Feature.mmx)] = .{
556598 .llvm_name = "mmx",
557599 .description = "Enable MMX instructions",
......@@ -572,11 +614,6 @@ pub const all_features = blk: {
572614 .description = "Support movdiri instruction",
573615 .dependencies = featureSet(&[_]Feature{}),
574616 };
575 result[@enumToInt(Feature.mpx)] = .{
576 .llvm_name = "mpx",
577 .description = "Deprecated. Support MPX instructions",
578 .dependencies = featureSet(&[_]Feature{}),
579 };
580617 result[@enumToInt(Feature.mwaitx)] = .{
581618 .llvm_name = "mwaitx",
582619 .description = "Enable MONITORX/MWAITX timer functionality",
......@@ -691,7 +728,7 @@ pub const all_features = blk: {
691728 };
692729 result[@enumToInt(Feature.sahf)] = .{
693730 .llvm_name = "sahf",
694 .description = "Support LAHF and SAHF instructions",
731 .description = "Support LAHF and SAHF instructions in 64-bit mode",
695732 .dependencies = featureSet(&[_]Feature{}),
696733 };
697734 result[@enumToInt(Feature.serialize)] = .{
......@@ -835,6 +872,11 @@ pub const all_features = blk: {
835872 .description = "Support TSXLDTRK instructions",
836873 .dependencies = featureSet(&[_]Feature{}),
837874 };
875 result[@enumToInt(Feature.uintr)] = .{
876 .llvm_name = "uintr",
877 .description = "Has UINTR Instructions",
878 .dependencies = featureSet(&[_]Feature{}),
879 };
838880 result[@enumToInt(Feature.use_aa)] = .{
839881 .llvm_name = "use-aa",
840882 .description = "Use alias analysis during codegen",
......@@ -876,6 +918,13 @@ pub const all_features = blk: {
876918 .description = "Write Back No Invalidate",
877919 .dependencies = featureSet(&[_]Feature{}),
878920 };
921 result[@enumToInt(Feature.widekl)] = .{
922 .llvm_name = "widekl",
923 .description = "Support Key Locker wide Instructions",
924 .dependencies = featureSet(&[_]Feature{
925 .kl,
926 }),
927 };
879928 result[@enumToInt(Feature.x87)] = .{
880929 .llvm_name = "x87",
881930 .description = "Enable X87 float instructions",
......@@ -923,6 +972,53 @@ pub const all_features = blk: {
923972};
924973
925974pub const cpu = struct {
975 pub const alderlake = CpuModel{
976 .name = "alderlake",
977 .llvm_name = "alderlake",
978 .features = featureSet(&[_]Feature{
979 .@"64bit",
980 .adx,
981 .aes,
982 .avx,
983 .avx2,
984 .avxvnni,
985 .bmi,
986 .bmi2,
987 .cldemote,
988 .clflushopt,
989 .cmov,
990 .cx16,
991 .cx8,
992 .ermsb,
993 .f16c,
994 .fma,
995 .fsgsbase,
996 .fxsr,
997 .hreset,
998 .invpcid,
999 .lzcnt,
1000 .mmx,
1001 .movbe,
1002 .nopl,
1003 .pclmul,
1004 .popcnt,
1005 .prfchw,
1006 .ptwrite,
1007 .rdrnd,
1008 .rdseed,
1009 .sahf,
1010 .serialize,
1011 .sgx,
1012 .sse2,
1013 .sse4_2,
1014 .waitpkg,
1015 .x87,
1016 .xsave,
1017 .xsavec,
1018 .xsaveopt,
1019 .xsaves,
1020 }),
1021 };
9261022 pub const amdfam10 = CpuModel{
9271023 .name = "amdfam10",
9281024 .llvm_name = "amdfam10",
......@@ -932,16 +1028,13 @@ pub const cpu = struct {
9321028 .cmov,
9331029 .cx16,
9341030 .cx8,
935 .fast_scalar_shift_masks,
9361031 .fxsr,
9371032 .lzcnt,
9381033 .nopl,
9391034 .popcnt,
9401035 .prfchw,
9411036 .sahf,
942 .slow_shld,
9431037 .sse4a,
944 .vzeroupper,
9451038 .x87,
9461039 }),
9471040 };
......@@ -953,9 +1046,6 @@ pub const cpu = struct {
9531046 .cmov,
9541047 .cx8,
9551048 .nopl,
956 .slow_shld,
957 .slow_unaligned_mem_16,
958 .vzeroupper,
9591049 .x87,
9601050 }),
9611051 };
......@@ -968,10 +1058,7 @@ pub const cpu = struct {
9681058 .cx8,
9691059 .fxsr,
9701060 .nopl,
971 .slow_shld,
972 .slow_unaligned_mem_16,
9731061 .sse,
974 .vzeroupper,
9751062 .x87,
9761063 }),
9771064 };
......@@ -983,13 +1070,9 @@ pub const cpu = struct {
9831070 .@"64bit",
9841071 .cmov,
9851072 .cx8,
986 .fast_scalar_shift_masks,
9871073 .fxsr,
9881074 .nopl,
989 .slow_shld,
990 .slow_unaligned_mem_16,
9911075 .sse2,
992 .vzeroupper,
9931076 .x87,
9941077 }),
9951078 };
......@@ -1002,10 +1085,7 @@ pub const cpu = struct {
10021085 .cx8,
10031086 .fxsr,
10041087 .nopl,
1005 .slow_shld,
1006 .slow_unaligned_mem_16,
10071088 .sse,
1008 .vzeroupper,
10091089 .x87,
10101090 }),
10111091 };
......@@ -1017,9 +1097,6 @@ pub const cpu = struct {
10171097 .cmov,
10181098 .cx8,
10191099 .nopl,
1020 .slow_shld,
1021 .slow_unaligned_mem_16,
1022 .vzeroupper,
10231100 .x87,
10241101 }),
10251102 };
......@@ -1032,10 +1109,7 @@ pub const cpu = struct {
10321109 .cx8,
10331110 .fxsr,
10341111 .nopl,
1035 .slow_shld,
1036 .slow_unaligned_mem_16,
10371112 .sse,
1038 .vzeroupper,
10391113 .x87,
10401114 }),
10411115 };
......@@ -1047,13 +1121,9 @@ pub const cpu = struct {
10471121 .@"64bit",
10481122 .cmov,
10491123 .cx8,
1050 .fast_scalar_shift_masks,
10511124 .fxsr,
10521125 .nopl,
1053 .slow_shld,
1054 .slow_unaligned_mem_16,
10551126 .sse2,
1056 .vzeroupper,
10571127 .x87,
10581128 }),
10591129 };
......@@ -1066,13 +1136,9 @@ pub const cpu = struct {
10661136 .cmov,
10671137 .cx16,
10681138 .cx8,
1069 .fast_scalar_shift_masks,
10701139 .fxsr,
10711140 .nopl,
1072 .slow_shld,
1073 .slow_unaligned_mem_16,
10741141 .sse3,
1075 .vzeroupper,
10761142 .x87,
10771143 }),
10781144 };
......@@ -1085,19 +1151,11 @@ pub const cpu = struct {
10851151 .cx16,
10861152 .cx8,
10871153 .fxsr,
1088 .idivl_to_divb,
1089 .idivq_to_divl,
1090 .lea_sp,
1091 .lea_uses_ag,
10921154 .mmx,
10931155 .movbe,
10941156 .nopl,
1095 .pad_short_functions,
10961157 .sahf,
1097 .slow_two_mem_ops,
1098 .slow_unaligned_mem_16,
10991158 .ssse3,
1100 .vzeroupper,
11011159 .x87,
11021160 }),
11031161 };
......@@ -1110,16 +1168,13 @@ pub const cpu = struct {
11101168 .cmov,
11111169 .cx16,
11121170 .cx8,
1113 .fast_scalar_shift_masks,
11141171 .fxsr,
11151172 .lzcnt,
11161173 .nopl,
11171174 .popcnt,
11181175 .prfchw,
11191176 .sahf,
1120 .slow_shld,
11211177 .sse4a,
1122 .vzeroupper,
11231178 .x87,
11241179 }),
11251180 };
......@@ -1129,12 +1184,9 @@ pub const cpu = struct {
11291184 .features = featureSet(&[_]Feature{
11301185 .@"64bit",
11311186 .aes,
1132 .branchfusion,
11331187 .cmov,
11341188 .cx16,
11351189 .cx8,
1136 .fast_11bytenop,
1137 .fast_scalar_shift_masks,
11381190 .fxsr,
11391191 .lwp,
11401192 .lzcnt,
......@@ -1144,8 +1196,6 @@ pub const cpu = struct {
11441196 .popcnt,
11451197 .prfchw,
11461198 .sahf,
1147 .slow_shld,
1148 .vzeroupper,
11491199 .x87,
11501200 .xop,
11511201 .xsave,
......@@ -1158,14 +1208,11 @@ pub const cpu = struct {
11581208 .@"64bit",
11591209 .aes,
11601210 .bmi,
1161 .branchfusion,
11621211 .cmov,
11631212 .cx16,
11641213 .cx8,
11651214 .f16c,
1166 .fast_11bytenop,
11671215 .fast_bextr,
1168 .fast_scalar_shift_masks,
11691216 .fma,
11701217 .fxsr,
11711218 .lwp,
......@@ -1176,9 +1223,7 @@ pub const cpu = struct {
11761223 .popcnt,
11771224 .prfchw,
11781225 .sahf,
1179 .slow_shld,
11801226 .tbm,
1181 .vzeroupper,
11821227 .x87,
11831228 .xop,
11841229 .xsave,
......@@ -1191,14 +1236,11 @@ pub const cpu = struct {
11911236 .@"64bit",
11921237 .aes,
11931238 .bmi,
1194 .branchfusion,
11951239 .cmov,
11961240 .cx16,
11971241 .cx8,
11981242 .f16c,
1199 .fast_11bytenop,
12001243 .fast_bextr,
1201 .fast_scalar_shift_masks,
12021244 .fma,
12031245 .fsgsbase,
12041246 .fxsr,
......@@ -1210,9 +1252,7 @@ pub const cpu = struct {
12101252 .popcnt,
12111253 .prfchw,
12121254 .sahf,
1213 .slow_shld,
12141255 .tbm,
1215 .vzeroupper,
12161256 .x87,
12171257 .xop,
12181258 .xsave,
......@@ -1228,14 +1268,11 @@ pub const cpu = struct {
12281268 .avx2,
12291269 .bmi,
12301270 .bmi2,
1231 .branchfusion,
12321271 .cmov,
12331272 .cx16,
12341273 .cx8,
12351274 .f16c,
1236 .fast_11bytenop,
12371275 .fast_bextr,
1238 .fast_scalar_shift_masks,
12391276 .fma,
12401277 .fsgsbase,
12411278 .fxsr,
......@@ -1250,9 +1287,7 @@ pub const cpu = struct {
12501287 .prfchw,
12511288 .rdrnd,
12521289 .sahf,
1253 .slow_shld,
12541290 .tbm,
1255 .vzeroupper,
12561291 .x87,
12571292 .xop,
12581293 .xsave,
......@@ -1268,19 +1303,11 @@ pub const cpu = struct {
12681303 .cx16,
12691304 .cx8,
12701305 .fxsr,
1271 .idivl_to_divb,
1272 .idivq_to_divl,
1273 .lea_sp,
1274 .lea_uses_ag,
12751306 .mmx,
12761307 .movbe,
12771308 .nopl,
1278 .pad_short_functions,
12791309 .sahf,
1280 .slow_two_mem_ops,
1281 .slow_unaligned_mem_16,
12821310 .ssse3,
1283 .vzeroupper,
12841311 .x87,
12851312 }),
12861313 };
......@@ -1299,20 +1326,11 @@ pub const cpu = struct {
12991326 .cx8,
13001327 .ermsb,
13011328 .f16c,
1302 .false_deps_lzcnt_tzcnt,
1303 .false_deps_popcnt,
1304 .fast_15bytenop,
1305 .fast_scalar_fsqrt,
1306 .fast_shld_rotate,
1307 .fast_variable_shuffle,
13081329 .fma,
13091330 .fsgsbase,
13101331 .fxsr,
1311 .idivq_to_divl,
13121332 .invpcid,
13131333 .lzcnt,
1314 .macrofusion,
1315 .merge_to_threeway_branch,
13161334 .mmx,
13171335 .movbe,
13181336 .nopl,
......@@ -1322,9 +1340,8 @@ pub const cpu = struct {
13221340 .rdrnd,
13231341 .rdseed,
13241342 .sahf,
1325 .slow_3ops_lea,
1343 .sse2,
13261344 .sse4_2,
1327 .vzeroupper,
13281345 .x87,
13291346 .xsave,
13301347 .xsaveopt,
......@@ -1338,9 +1355,6 @@ pub const cpu = struct {
13381355 .cmov,
13391356 .cx16,
13401357 .cx8,
1341 .fast_15bytenop,
1342 .fast_scalar_shift_masks,
1343 .fast_vector_shift_masks,
13441358 .fxsr,
13451359 .lzcnt,
13461360 .mmx,
......@@ -1348,10 +1362,8 @@ pub const cpu = struct {
13481362 .popcnt,
13491363 .prfchw,
13501364 .sahf,
1351 .slow_shld,
13521365 .sse4a,
13531366 .ssse3,
1354 .vzeroupper,
13551367 .x87,
13561368 }),
13571369 };
......@@ -1367,12 +1379,6 @@ pub const cpu = struct {
13671379 .cx16,
13681380 .cx8,
13691381 .f16c,
1370 .fast_15bytenop,
1371 .fast_bextr,
1372 .fast_hops,
1373 .fast_lzcnt,
1374 .fast_scalar_shift_masks,
1375 .fast_vector_shift_masks,
13761382 .fxsr,
13771383 .lzcnt,
13781384 .mmx,
......@@ -1382,7 +1388,6 @@ pub const cpu = struct {
13821388 .popcnt,
13831389 .prfchw,
13841390 .sahf,
1385 .slow_shld,
13861391 .sse4a,
13871392 .ssse3,
13881393 .x87,
......@@ -1395,8 +1400,6 @@ pub const cpu = struct {
13951400 .llvm_name = "c3",
13961401 .features = featureSet(&[_]Feature{
13971402 .@"3dnow",
1398 .slow_unaligned_mem_16,
1399 .vzeroupper,
14001403 .x87,
14011404 }),
14021405 };
......@@ -1408,9 +1411,7 @@ pub const cpu = struct {
14081411 .cx8,
14091412 .fxsr,
14101413 .mmx,
1411 .slow_unaligned_mem_16,
14121414 .sse,
1413 .vzeroupper,
14141415 .x87,
14151416 }),
14161417 };
......@@ -1438,36 +1439,25 @@ pub const cpu = struct {
14381439 .cx8,
14391440 .ermsb,
14401441 .f16c,
1441 .fast_15bytenop,
1442 .fast_gather,
1443 .fast_scalar_fsqrt,
1444 .fast_shld_rotate,
1445 .fast_variable_shuffle,
1446 .fast_vector_fsqrt,
14471442 .fma,
14481443 .fsgsbase,
14491444 .fxsr,
1450 .idivq_to_divl,
14511445 .invpcid,
14521446 .lzcnt,
1453 .macrofusion,
1454 .merge_to_threeway_branch,
14551447 .mmx,
14561448 .movbe,
14571449 .nopl,
14581450 .pclmul,
14591451 .pku,
14601452 .popcnt,
1461 .prefer_256_bit,
14621453 .prfchw,
14631454 .rdrnd,
14641455 .rdseed,
14651456 .sahf,
14661457 .sgx,
14671458 .sha,
1468 .slow_3ops_lea,
1459 .sse2,
14691460 .sse4_2,
1470 .vzeroupper,
14711461 .x87,
14721462 .xsave,
14731463 .xsavec,
......@@ -1499,35 +1489,23 @@ pub const cpu = struct {
14991489 .cx8,
15001490 .ermsb,
15011491 .f16c,
1502 .false_deps_popcnt,
1503 .fast_15bytenop,
1504 .fast_gather,
1505 .fast_scalar_fsqrt,
1506 .fast_shld_rotate,
1507 .fast_variable_shuffle,
1508 .fast_vector_fsqrt,
15091492 .fma,
15101493 .fsgsbase,
15111494 .fxsr,
1512 .idivq_to_divl,
15131495 .invpcid,
15141496 .lzcnt,
1515 .macrofusion,
1516 .merge_to_threeway_branch,
15171497 .mmx,
15181498 .movbe,
15191499 .nopl,
15201500 .pclmul,
15211501 .pku,
15221502 .popcnt,
1523 .prefer_256_bit,
15241503 .prfchw,
15251504 .rdrnd,
15261505 .rdseed,
15271506 .sahf,
1528 .slow_3ops_lea,
1507 .sse2,
15291508 .sse4_2,
1530 .vzeroupper,
15311509 .x87,
15321510 .xsave,
15331511 .xsavec,
......@@ -1560,35 +1538,23 @@ pub const cpu = struct {
15601538 .cx8,
15611539 .ermsb,
15621540 .f16c,
1563 .false_deps_popcnt,
1564 .fast_15bytenop,
1565 .fast_gather,
1566 .fast_scalar_fsqrt,
1567 .fast_shld_rotate,
1568 .fast_variable_shuffle,
1569 .fast_vector_fsqrt,
15701541 .fma,
15711542 .fsgsbase,
15721543 .fxsr,
1573 .idivq_to_divl,
15741544 .invpcid,
15751545 .lzcnt,
1576 .macrofusion,
1577 .merge_to_threeway_branch,
15781546 .mmx,
15791547 .movbe,
15801548 .nopl,
15811549 .pclmul,
15821550 .pku,
15831551 .popcnt,
1584 .prefer_256_bit,
15851552 .prfchw,
15861553 .rdrnd,
15871554 .rdseed,
15881555 .sahf,
1589 .slow_3ops_lea,
1556 .sse2,
15901557 .sse4_2,
1591 .vzeroupper,
15921558 .x87,
15931559 .xsave,
15941560 .xsavec,
......@@ -1606,25 +1572,16 @@ pub const cpu = struct {
16061572 .cx16,
16071573 .cx8,
16081574 .f16c,
1609 .false_deps_popcnt,
1610 .fast_15bytenop,
1611 .fast_scalar_fsqrt,
1612 .fast_shld_rotate,
16131575 .fsgsbase,
16141576 .fxsr,
1615 .idivq_to_divl,
1616 .macrofusion,
1617 .merge_to_threeway_branch,
16181577 .mmx,
16191578 .nopl,
16201579 .pclmul,
16211580 .popcnt,
16221581 .rdrnd,
16231582 .sahf,
1624 .slow_3ops_lea,
1625 .slow_unaligned_mem_32,
1583 .sse2,
16261584 .sse4_2,
1627 .vzeroupper,
16281585 .x87,
16291586 .xsave,
16301587 .xsaveopt,
......@@ -1644,20 +1601,11 @@ pub const cpu = struct {
16441601 .cx8,
16451602 .ermsb,
16461603 .f16c,
1647 .false_deps_lzcnt_tzcnt,
1648 .false_deps_popcnt,
1649 .fast_15bytenop,
1650 .fast_scalar_fsqrt,
1651 .fast_shld_rotate,
1652 .fast_variable_shuffle,
16531604 .fma,
16541605 .fsgsbase,
16551606 .fxsr,
1656 .idivq_to_divl,
16571607 .invpcid,
16581608 .lzcnt,
1659 .macrofusion,
1660 .merge_to_threeway_branch,
16611609 .mmx,
16621610 .movbe,
16631611 .nopl,
......@@ -1665,9 +1613,8 @@ pub const cpu = struct {
16651613 .popcnt,
16661614 .rdrnd,
16671615 .sahf,
1668 .slow_3ops_lea,
1616 .sse2,
16691617 .sse4_2,
1670 .vzeroupper,
16711618 .x87,
16721619 .xsave,
16731620 .xsaveopt,
......@@ -1682,13 +1629,10 @@ pub const cpu = struct {
16821629 .cx16,
16831630 .cx8,
16841631 .fxsr,
1685 .macrofusion,
16861632 .mmx,
16871633 .nopl,
16881634 .sahf,
1689 .slow_unaligned_mem_16,
16901635 .ssse3,
1691 .vzeroupper,
16921636 .x87,
16931637 }),
16941638 };
......@@ -1701,13 +1645,12 @@ pub const cpu = struct {
17011645 .cx16,
17021646 .cx8,
17031647 .fxsr,
1704 .macrofusion,
17051648 .mmx,
17061649 .nopl,
17071650 .popcnt,
17081651 .sahf,
1652 .sse2,
17091653 .sse4_2,
1710 .vzeroupper,
17111654 .x87,
17121655 }),
17131656 };
......@@ -1720,23 +1663,14 @@ pub const cpu = struct {
17201663 .cmov,
17211664 .cx16,
17221665 .cx8,
1723 .false_deps_popcnt,
1724 .fast_15bytenop,
1725 .fast_scalar_fsqrt,
1726 .fast_shld_rotate,
17271666 .fxsr,
1728 .idivq_to_divl,
1729 .macrofusion,
1730 .merge_to_threeway_branch,
17311667 .mmx,
17321668 .nopl,
17331669 .pclmul,
17341670 .popcnt,
17351671 .sahf,
1736 .slow_3ops_lea,
1737 .slow_unaligned_mem_32,
1672 .sse2,
17381673 .sse4_2,
1739 .vzeroupper,
17401674 .x87,
17411675 .xsave,
17421676 .xsaveopt,
......@@ -1746,9 +1680,8 @@ pub const cpu = struct {
17461680 .name = "generic",
17471681 .llvm_name = "generic",
17481682 .features = featureSet(&[_]Feature{
1683 .@"64bit",
17491684 .cx8,
1750 .slow_unaligned_mem_16,
1751 .vzeroupper,
17521685 .x87,
17531686 }),
17541687 };
......@@ -1758,8 +1691,6 @@ pub const cpu = struct {
17581691 .features = featureSet(&[_]Feature{
17591692 .@"3dnowa",
17601693 .cx8,
1761 .slow_unaligned_mem_16,
1762 .vzeroupper,
17631694 .x87,
17641695 }),
17651696 };
......@@ -1773,7 +1704,6 @@ pub const cpu = struct {
17731704 .cmov,
17741705 .cx16,
17751706 .cx8,
1776 .false_deps_popcnt,
17771707 .fsgsbase,
17781708 .fxsr,
17791709 .mmx,
......@@ -1786,13 +1716,8 @@ pub const cpu = struct {
17861716 .rdseed,
17871717 .sahf,
17881718 .sha,
1789 .slow_incdec,
1790 .slow_lea,
1791 .slow_two_mem_ops,
17921719 .sse4_2,
17931720 .ssse3,
1794 .use_glm_div_sqrt_costs,
1795 .vzeroupper,
17961721 .x87,
17971722 .xsave,
17981723 .xsavec,
......@@ -1825,13 +1750,8 @@ pub const cpu = struct {
18251750 .sahf,
18261751 .sgx,
18271752 .sha,
1828 .slow_incdec,
1829 .slow_lea,
1830 .slow_two_mem_ops,
18311753 .sse4_2,
18321754 .ssse3,
1833 .use_glm_div_sqrt_costs,
1834 .vzeroupper,
18351755 .x87,
18361756 .xsave,
18371757 .xsavec,
......@@ -1853,20 +1773,11 @@ pub const cpu = struct {
18531773 .cx8,
18541774 .ermsb,
18551775 .f16c,
1856 .false_deps_lzcnt_tzcnt,
1857 .false_deps_popcnt,
1858 .fast_15bytenop,
1859 .fast_scalar_fsqrt,
1860 .fast_shld_rotate,
1861 .fast_variable_shuffle,
18621776 .fma,
18631777 .fsgsbase,
18641778 .fxsr,
1865 .idivq_to_divl,
18661779 .invpcid,
18671780 .lzcnt,
1868 .macrofusion,
1869 .merge_to_threeway_branch,
18701781 .mmx,
18711782 .movbe,
18721783 .nopl,
......@@ -1874,9 +1785,8 @@ pub const cpu = struct {
18741785 .popcnt,
18751786 .rdrnd,
18761787 .sahf,
1877 .slow_3ops_lea,
1788 .sse2,
18781789 .sse4_2,
1879 .vzeroupper,
18801790 .x87,
18811791 .xsave,
18821792 .xsaveopt,
......@@ -1886,8 +1796,6 @@ pub const cpu = struct {
18861796 .name = "_i386",
18871797 .llvm_name = "i386",
18881798 .features = featureSet(&[_]Feature{
1889 .slow_unaligned_mem_16,
1890 .vzeroupper,
18911799 .x87,
18921800 }),
18931801 };
......@@ -1895,8 +1803,6 @@ pub const cpu = struct {
18951803 .name = "_i486",
18961804 .llvm_name = "i486",
18971805 .features = featureSet(&[_]Feature{
1898 .slow_unaligned_mem_16,
1899 .vzeroupper,
19001806 .x87,
19011807 }),
19021808 };
......@@ -1905,8 +1811,6 @@ pub const cpu = struct {
19051811 .llvm_name = "i586",
19061812 .features = featureSet(&[_]Feature{
19071813 .cx8,
1908 .slow_unaligned_mem_16,
1909 .vzeroupper,
19101814 .x87,
19111815 }),
19121816 };
......@@ -1916,8 +1820,6 @@ pub const cpu = struct {
19161820 .features = featureSet(&[_]Feature{
19171821 .cmov,
19181822 .cx8,
1919 .slow_unaligned_mem_16,
1920 .vzeroupper,
19211823 .x87,
19221824 }),
19231825 };
......@@ -1950,28 +1852,19 @@ pub const cpu = struct {
19501852 .cx8,
19511853 .ermsb,
19521854 .f16c,
1953 .fast_15bytenop,
1954 .fast_gather,
1955 .fast_scalar_fsqrt,
1956 .fast_shld_rotate,
1957 .fast_variable_shuffle,
1958 .fast_vector_fsqrt,
19591855 .fma,
19601856 .fsgsbase,
1857 .fsrm,
19611858 .fxsr,
19621859 .gfni,
1963 .idivq_to_divl,
19641860 .invpcid,
19651861 .lzcnt,
1966 .macrofusion,
1967 .merge_to_threeway_branch,
19681862 .mmx,
19691863 .movbe,
19701864 .nopl,
19711865 .pclmul,
19721866 .pku,
19731867 .popcnt,
1974 .prefer_256_bit,
19751868 .prfchw,
19761869 .rdpid,
19771870 .rdrnd,
......@@ -1979,11 +1872,10 @@ pub const cpu = struct {
19791872 .sahf,
19801873 .sgx,
19811874 .sha,
1982 .slow_3ops_lea,
1875 .sse2,
19831876 .sse4_2,
19841877 .vaes,
19851878 .vpclmulqdq,
1986 .vzeroupper,
19871879 .x87,
19881880 .xsave,
19891881 .xsavec,
......@@ -2020,21 +1912,13 @@ pub const cpu = struct {
20201912 .cx8,
20211913 .ermsb,
20221914 .f16c,
2023 .fast_15bytenop,
2024 .fast_gather,
2025 .fast_scalar_fsqrt,
2026 .fast_shld_rotate,
2027 .fast_variable_shuffle,
2028 .fast_vector_fsqrt,
20291915 .fma,
20301916 .fsgsbase,
1917 .fsrm,
20311918 .fxsr,
20321919 .gfni,
2033 .idivq_to_divl,
20341920 .invpcid,
20351921 .lzcnt,
2036 .macrofusion,
2037 .merge_to_threeway_branch,
20381922 .mmx,
20391923 .movbe,
20401924 .nopl,
......@@ -2042,7 +1926,6 @@ pub const cpu = struct {
20421926 .pconfig,
20431927 .pku,
20441928 .popcnt,
2045 .prefer_256_bit,
20461929 .prfchw,
20471930 .rdpid,
20481931 .rdrnd,
......@@ -2050,11 +1933,10 @@ pub const cpu = struct {
20501933 .sahf,
20511934 .sgx,
20521935 .sha,
2053 .slow_3ops_lea,
1936 .sse2,
20541937 .sse4_2,
20551938 .vaes,
20561939 .vpclmulqdq,
2057 .vzeroupper,
20581940 .wbnoinvd,
20591941 .x87,
20601942 .xsave,
......@@ -2073,25 +1955,16 @@ pub const cpu = struct {
20731955 .cx16,
20741956 .cx8,
20751957 .f16c,
2076 .false_deps_popcnt,
2077 .fast_15bytenop,
2078 .fast_scalar_fsqrt,
2079 .fast_shld_rotate,
20801958 .fsgsbase,
20811959 .fxsr,
2082 .idivq_to_divl,
2083 .macrofusion,
2084 .merge_to_threeway_branch,
20851960 .mmx,
20861961 .nopl,
20871962 .pclmul,
20881963 .popcnt,
20891964 .rdrnd,
20901965 .sahf,
2091 .slow_3ops_lea,
2092 .slow_unaligned_mem_32,
1966 .sse2,
20931967 .sse4_2,
2094 .vzeroupper,
20951968 .x87,
20961969 .xsave,
20971970 .xsaveopt,
......@@ -2103,8 +1976,6 @@ pub const cpu = struct {
21031976 .features = featureSet(&[_]Feature{
21041977 .cx8,
21051978 .mmx,
2106 .slow_unaligned_mem_16,
2107 .vzeroupper,
21081979 .x87,
21091980 }),
21101981 };
......@@ -2114,8 +1985,6 @@ pub const cpu = struct {
21141985 .features = featureSet(&[_]Feature{
21151986 .@"3dnow",
21161987 .cx8,
2117 .slow_unaligned_mem_16,
2118 .vzeroupper,
21191988 .x87,
21201989 }),
21211990 };
......@@ -2125,8 +1994,6 @@ pub const cpu = struct {
21251994 .features = featureSet(&[_]Feature{
21261995 .@"3dnow",
21271996 .cx8,
2128 .slow_unaligned_mem_16,
2129 .vzeroupper,
21301997 .x87,
21311998 }),
21321999 };
......@@ -2138,13 +2005,9 @@ pub const cpu = struct {
21382005 .@"64bit",
21392006 .cmov,
21402007 .cx8,
2141 .fast_scalar_shift_masks,
21422008 .fxsr,
21432009 .nopl,
2144 .slow_shld,
2145 .slow_unaligned_mem_16,
21462010 .sse2,
2147 .vzeroupper,
21482011 .x87,
21492012 }),
21502013 };
......@@ -2157,13 +2020,9 @@ pub const cpu = struct {
21572020 .cmov,
21582021 .cx16,
21592022 .cx8,
2160 .fast_scalar_shift_masks,
21612023 .fxsr,
21622024 .nopl,
2163 .slow_shld,
2164 .slow_unaligned_mem_16,
21652025 .sse3,
2166 .vzeroupper,
21672026 .x87,
21682027 }),
21692028 };
......@@ -2184,27 +2043,20 @@ pub const cpu = struct {
21842043 .cx16,
21852044 .cx8,
21862045 .f16c,
2187 .fast_gather,
21882046 .fma,
21892047 .fsgsbase,
21902048 .fxsr,
2191 .idivq_to_divl,
21922049 .lzcnt,
21932050 .mmx,
21942051 .movbe,
21952052 .nopl,
21962053 .pclmul,
21972054 .popcnt,
2198 .prefer_mask_registers,
21992055 .prefetchwt1,
22002056 .prfchw,
22012057 .rdrnd,
22022058 .rdseed,
22032059 .sahf,
2204 .slow_3ops_lea,
2205 .slow_incdec,
2206 .slow_pmaddwd,
2207 .slow_two_mem_ops,
22082060 .x87,
22092061 .xsave,
22102062 .xsaveopt,
......@@ -2228,27 +2080,20 @@ pub const cpu = struct {
22282080 .cx16,
22292081 .cx8,
22302082 .f16c,
2231 .fast_gather,
22322083 .fma,
22332084 .fsgsbase,
22342085 .fxsr,
2235 .idivq_to_divl,
22362086 .lzcnt,
22372087 .mmx,
22382088 .movbe,
22392089 .nopl,
22402090 .pclmul,
22412091 .popcnt,
2242 .prefer_mask_registers,
22432092 .prefetchwt1,
22442093 .prfchw,
22452094 .rdrnd,
22462095 .rdseed,
22472096 .sahf,
2248 .slow_3ops_lea,
2249 .slow_incdec,
2250 .slow_pmaddwd,
2251 .slow_two_mem_ops,
22522097 .x87,
22532098 .xsave,
22542099 .xsaveopt,
......@@ -2258,7 +2103,7 @@ pub const cpu = struct {
22582103 .name = "lakemont",
22592104 .llvm_name = "lakemont",
22602105 .features = featureSet(&[_]Feature{
2261 .vzeroupper,
2106 .cx8,
22622107 }),
22632108 };
22642109 pub const nehalem = CpuModel{
......@@ -2270,13 +2115,12 @@ pub const cpu = struct {
22702115 .cx16,
22712116 .cx8,
22722117 .fxsr,
2273 .macrofusion,
22742118 .mmx,
22752119 .nopl,
22762120 .popcnt,
22772121 .sahf,
2122 .sse2,
22782123 .sse4_2,
2279 .vzeroupper,
22802124 .x87,
22812125 }),
22822126 };
......@@ -2291,9 +2135,7 @@ pub const cpu = struct {
22912135 .fxsr,
22922136 .mmx,
22932137 .nopl,
2294 .slow_unaligned_mem_16,
22952138 .sse3,
2296 .vzeroupper,
22972139 .x87,
22982140 }),
22992141 };
......@@ -2305,13 +2147,9 @@ pub const cpu = struct {
23052147 .@"64bit",
23062148 .cmov,
23072149 .cx8,
2308 .fast_scalar_shift_masks,
23092150 .fxsr,
23102151 .nopl,
2311 .slow_shld,
2312 .slow_unaligned_mem_16,
23132152 .sse2,
2314 .vzeroupper,
23152153 .x87,
23162154 }),
23172155 };
......@@ -2324,13 +2162,9 @@ pub const cpu = struct {
23242162 .cmov,
23252163 .cx16,
23262164 .cx8,
2327 .fast_scalar_shift_masks,
23282165 .fxsr,
23292166 .nopl,
2330 .slow_shld,
2331 .slow_unaligned_mem_16,
23322167 .sse3,
2333 .vzeroupper,
23342168 .x87,
23352169 }),
23362170 };
......@@ -2343,13 +2177,10 @@ pub const cpu = struct {
23432177 .cx16,
23442178 .cx8,
23452179 .fxsr,
2346 .macrofusion,
23472180 .mmx,
23482181 .nopl,
23492182 .sahf,
2350 .slow_unaligned_mem_16,
23512183 .sse4_1,
2352 .vzeroupper,
23532184 .x87,
23542185 }),
23552186 };
......@@ -2358,8 +2189,6 @@ pub const cpu = struct {
23582189 .llvm_name = "pentium",
23592190 .features = featureSet(&[_]Feature{
23602191 .cx8,
2361 .slow_unaligned_mem_16,
2362 .vzeroupper,
23632192 .x87,
23642193 }),
23652194 };
......@@ -2372,9 +2201,7 @@ pub const cpu = struct {
23722201 .fxsr,
23732202 .mmx,
23742203 .nopl,
2375 .slow_unaligned_mem_16,
23762204 .sse2,
2377 .vzeroupper,
23782205 .x87,
23792206 }),
23802207 };
......@@ -2384,8 +2211,6 @@ pub const cpu = struct {
23842211 .features = featureSet(&[_]Feature{
23852212 .cx8,
23862213 .mmx,
2387 .slow_unaligned_mem_16,
2388 .vzeroupper,
23892214 .x87,
23902215 }),
23912216 };
......@@ -2398,8 +2223,6 @@ pub const cpu = struct {
23982223 .fxsr,
23992224 .mmx,
24002225 .nopl,
2401 .slow_unaligned_mem_16,
2402 .vzeroupper,
24032226 .x87,
24042227 }),
24052228 };
......@@ -2412,9 +2235,7 @@ pub const cpu = struct {
24122235 .fxsr,
24132236 .mmx,
24142237 .nopl,
2415 .slow_unaligned_mem_16,
24162238 .sse,
2417 .vzeroupper,
24182239 .x87,
24192240 }),
24202241 };
......@@ -2427,9 +2248,7 @@ pub const cpu = struct {
24272248 .fxsr,
24282249 .mmx,
24292250 .nopl,
2430 .slow_unaligned_mem_16,
24312251 .sse,
2432 .vzeroupper,
24332252 .x87,
24342253 }),
24352254 };
......@@ -2442,9 +2261,7 @@ pub const cpu = struct {
24422261 .fxsr,
24432262 .mmx,
24442263 .nopl,
2445 .slow_unaligned_mem_16,
24462264 .sse2,
2447 .vzeroupper,
24482265 .x87,
24492266 }),
24502267 };
......@@ -2457,9 +2274,7 @@ pub const cpu = struct {
24572274 .fxsr,
24582275 .mmx,
24592276 .nopl,
2460 .slow_unaligned_mem_16,
24612277 .sse2,
2462 .vzeroupper,
24632278 .x87,
24642279 }),
24652280 };
......@@ -2470,8 +2285,6 @@ pub const cpu = struct {
24702285 .cmov,
24712286 .cx8,
24722287 .nopl,
2473 .slow_unaligned_mem_16,
2474 .vzeroupper,
24752288 .x87,
24762289 }),
24772290 };
......@@ -2484,9 +2297,7 @@ pub const cpu = struct {
24842297 .fxsr,
24852298 .mmx,
24862299 .nopl,
2487 .slow_unaligned_mem_16,
24882300 .sse3,
2489 .vzeroupper,
24902301 .x87,
24912302 }),
24922303 };
......@@ -2499,26 +2310,95 @@ pub const cpu = struct {
24992310 .cmov,
25002311 .cx16,
25012312 .cx8,
2502 .false_deps_popcnt,
2503 .fast_15bytenop,
2504 .fast_scalar_fsqrt,
2505 .fast_shld_rotate,
25062313 .fxsr,
2507 .idivq_to_divl,
2508 .macrofusion,
2509 .merge_to_threeway_branch,
25102314 .mmx,
25112315 .nopl,
25122316 .pclmul,
25132317 .popcnt,
25142318 .sahf,
2515 .slow_3ops_lea,
2516 .slow_unaligned_mem_32,
2319 .sse2,
2320 .sse4_2,
2321 .x87,
2322 .xsave,
2323 .xsaveopt,
2324 }),
2325 };
2326 pub const sapphirerapids = CpuModel{
2327 .name = "sapphirerapids",
2328 .llvm_name = "sapphirerapids",
2329 .features = featureSet(&[_]Feature{
2330 .@"64bit",
2331 .adx,
2332 .aes,
2333 .amx_bf16,
2334 .amx_int8,
2335 .amx_tile,
2336 .avx,
2337 .avx2,
2338 .avx512bf16,
2339 .avx512bitalg,
2340 .avx512bw,
2341 .avx512cd,
2342 .avx512dq,
2343 .avx512f,
2344 .avx512ifma,
2345 .avx512vbmi,
2346 .avx512vbmi2,
2347 .avx512vl,
2348 .avx512vnni,
2349 .avx512vp2intersect,
2350 .avx512vpopcntdq,
2351 .avxvnni,
2352 .bmi,
2353 .bmi2,
2354 .cldemote,
2355 .clflushopt,
2356 .clwb,
2357 .cmov,
2358 .cx16,
2359 .cx8,
2360 .enqcmd,
2361 .ermsb,
2362 .f16c,
2363 .fma,
2364 .fsgsbase,
2365 .fsrm,
2366 .fxsr,
2367 .gfni,
2368 .invpcid,
2369 .lzcnt,
2370 .mmx,
2371 .movbe,
2372 .movdir64b,
2373 .movdiri,
2374 .nopl,
2375 .pclmul,
2376 .pconfig,
2377 .pku,
2378 .popcnt,
2379 .prfchw,
2380 .ptwrite,
2381 .rdpid,
2382 .rdrnd,
2383 .rdseed,
2384 .sahf,
2385 .serialize,
2386 .sgx,
2387 .sha,
2388 .shstk,
2389 .sse2,
25172390 .sse4_2,
2518 .vzeroupper,
2391 .tsxldtrk,
2392 .uintr,
2393 .vaes,
2394 .vpclmulqdq,
2395 .waitpkg,
2396 .wbnoinvd,
25192397 .x87,
25202398 .xsave,
2399 .xsavec,
25212400 .xsaveopt,
2401 .xsaves,
25222402 }),
25232403 };
25242404 pub const silvermont = CpuModel{
......@@ -2529,10 +2409,7 @@ pub const cpu = struct {
25292409 .cmov,
25302410 .cx16,
25312411 .cx8,
2532 .false_deps_popcnt,
2533 .fast_7bytenop,
25342412 .fxsr,
2535 .idivq_to_divl,
25362413 .mmx,
25372414 .movbe,
25382415 .nopl,
......@@ -2541,13 +2418,8 @@ pub const cpu = struct {
25412418 .prfchw,
25422419 .rdrnd,
25432420 .sahf,
2544 .slow_incdec,
2545 .slow_lea,
2546 .slow_pmulld,
2547 .slow_two_mem_ops,
25482421 .sse4_2,
25492422 .ssse3,
2550 .vzeroupper,
25512423 .x87,
25522424 }),
25532425 };
......@@ -2574,35 +2446,23 @@ pub const cpu = struct {
25742446 .cx8,
25752447 .ermsb,
25762448 .f16c,
2577 .false_deps_popcnt,
2578 .fast_15bytenop,
2579 .fast_gather,
2580 .fast_scalar_fsqrt,
2581 .fast_shld_rotate,
2582 .fast_variable_shuffle,
2583 .fast_vector_fsqrt,
25842449 .fma,
25852450 .fsgsbase,
25862451 .fxsr,
2587 .idivq_to_divl,
25882452 .invpcid,
25892453 .lzcnt,
2590 .macrofusion,
2591 .merge_to_threeway_branch,
25922454 .mmx,
25932455 .movbe,
25942456 .nopl,
25952457 .pclmul,
25962458 .pku,
25972459 .popcnt,
2598 .prefer_256_bit,
25992460 .prfchw,
26002461 .rdrnd,
26012462 .rdseed,
26022463 .sahf,
2603 .slow_3ops_lea,
2464 .sse2,
26042465 .sse4_2,
2605 .vzeroupper,
26062466 .x87,
26072467 .xsave,
26082468 .xsavec,
......@@ -2627,21 +2487,11 @@ pub const cpu = struct {
26272487 .cx8,
26282488 .ermsb,
26292489 .f16c,
2630 .false_deps_popcnt,
2631 .fast_15bytenop,
2632 .fast_gather,
2633 .fast_scalar_fsqrt,
2634 .fast_shld_rotate,
2635 .fast_variable_shuffle,
2636 .fast_vector_fsqrt,
26372490 .fma,
26382491 .fsgsbase,
26392492 .fxsr,
2640 .idivq_to_divl,
26412493 .invpcid,
26422494 .lzcnt,
2643 .macrofusion,
2644 .merge_to_threeway_branch,
26452495 .mmx,
26462496 .movbe,
26472497 .nopl,
......@@ -2652,9 +2502,8 @@ pub const cpu = struct {
26522502 .rdseed,
26532503 .sahf,
26542504 .sgx,
2655 .slow_3ops_lea,
2505 .sse2,
26562506 .sse4_2,
2657 .vzeroupper,
26582507 .x87,
26592508 .xsave,
26602509 .xsavec,
......@@ -2685,35 +2534,23 @@ pub const cpu = struct {
26852534 .cx8,
26862535 .ermsb,
26872536 .f16c,
2688 .false_deps_popcnt,
2689 .fast_15bytenop,
2690 .fast_gather,
2691 .fast_scalar_fsqrt,
2692 .fast_shld_rotate,
2693 .fast_variable_shuffle,
2694 .fast_vector_fsqrt,
26952537 .fma,
26962538 .fsgsbase,
26972539 .fxsr,
2698 .idivq_to_divl,
26992540 .invpcid,
27002541 .lzcnt,
2701 .macrofusion,
2702 .merge_to_threeway_branch,
27032542 .mmx,
27042543 .movbe,
27052544 .nopl,
27062545 .pclmul,
27072546 .pku,
27082547 .popcnt,
2709 .prefer_256_bit,
27102548 .prfchw,
27112549 .rdrnd,
27122550 .rdseed,
27132551 .sahf,
2714 .slow_3ops_lea,
2552 .sse2,
27152553 .sse4_2,
2716 .vzeroupper,
27172554 .x87,
27182555 .xsave,
27192556 .xsavec,
......@@ -2729,10 +2566,7 @@ pub const cpu = struct {
27292566 .cmov,
27302567 .cx16,
27312568 .cx8,
2732 .false_deps_popcnt,
2733 .fast_7bytenop,
27342569 .fxsr,
2735 .idivq_to_divl,
27362570 .mmx,
27372571 .movbe,
27382572 .nopl,
......@@ -2741,13 +2575,8 @@ pub const cpu = struct {
27412575 .prfchw,
27422576 .rdrnd,
27432577 .sahf,
2744 .slow_incdec,
2745 .slow_lea,
2746 .slow_pmulld,
2747 .slow_two_mem_ops,
27482578 .sse4_2,
27492579 .ssse3,
2750 .vzeroupper,
27512580 .x87,
27522581 }),
27532582 };
......@@ -2781,21 +2610,13 @@ pub const cpu = struct {
27812610 .cx8,
27822611 .ermsb,
27832612 .f16c,
2784 .fast_15bytenop,
2785 .fast_gather,
2786 .fast_scalar_fsqrt,
2787 .fast_shld_rotate,
2788 .fast_variable_shuffle,
2789 .fast_vector_fsqrt,
27902613 .fma,
27912614 .fsgsbase,
2615 .fsrm,
27922616 .fxsr,
27932617 .gfni,
2794 .idivq_to_divl,
27952618 .invpcid,
27962619 .lzcnt,
2797 .macrofusion,
2798 .merge_to_threeway_branch,
27992620 .mmx,
28002621 .movbe,
28012622 .movdir64b,
......@@ -2804,7 +2625,6 @@ pub const cpu = struct {
28042625 .pclmul,
28052626 .pku,
28062627 .popcnt,
2807 .prefer_256_bit,
28082628 .prfchw,
28092629 .rdpid,
28102630 .rdrnd,
......@@ -2813,11 +2633,10 @@ pub const cpu = struct {
28132633 .sgx,
28142634 .sha,
28152635 .shstk,
2816 .slow_3ops_lea,
2636 .sse2,
28172637 .sse4_2,
28182638 .vaes,
28192639 .vpclmulqdq,
2820 .vzeroupper,
28212640 .x87,
28222641 .xsave,
28232642 .xsavec,
......@@ -2852,13 +2671,8 @@ pub const cpu = struct {
28522671 .sahf,
28532672 .sgx,
28542673 .sha,
2855 .slow_incdec,
2856 .slow_lea,
2857 .slow_two_mem_ops,
28582674 .sse4_2,
28592675 .ssse3,
2860 .use_glm_div_sqrt_costs,
2861 .vzeroupper,
28622676 .x87,
28632677 .xsave,
28642678 .xsavec,
......@@ -2875,14 +2689,13 @@ pub const cpu = struct {
28752689 .cx16,
28762690 .cx8,
28772691 .fxsr,
2878 .macrofusion,
28792692 .mmx,
28802693 .nopl,
28812694 .pclmul,
28822695 .popcnt,
28832696 .sahf,
2697 .sse2,
28842698 .sse4_2,
2885 .vzeroupper,
28862699 .x87,
28872700 }),
28882701 };
......@@ -2891,8 +2704,6 @@ pub const cpu = struct {
28912704 .llvm_name = "winchip-c6",
28922705 .features = featureSet(&[_]Feature{
28932706 .mmx,
2894 .slow_unaligned_mem_16,
2895 .vzeroupper,
28962707 .x87,
28972708 }),
28982709 };
......@@ -2901,8 +2712,6 @@ pub const cpu = struct {
29012712 .llvm_name = "winchip2",
29022713 .features = featureSet(&[_]Feature{
29032714 .@"3dnow",
2904 .slow_unaligned_mem_16,
2905 .vzeroupper,
29062715 .x87,
29072716 }),
29082717 };
......@@ -2914,17 +2723,86 @@ pub const cpu = struct {
29142723 .cmov,
29152724 .cx8,
29162725 .fxsr,
2917 .idivq_to_divl,
2918 .macrofusion,
29192726 .mmx,
29202727 .nopl,
2921 .slow_3ops_lea,
2922 .slow_incdec,
29232728 .sse2,
2924 .vzeroupper,
29252729 .x87,
29262730 }),
29272731 };
2732 pub const x86_64_v2 = CpuModel{
2733 .name = "x86_64_v2",
2734 .llvm_name = "x86-64-v2",
2735 .features = featureSet(&[_]Feature{
2736 .@"64bit",
2737 .cmov,
2738 .cx16,
2739 .cx8,
2740 .fxsr,
2741 .mmx,
2742 .nopl,
2743 .popcnt,
2744 .sahf,
2745 .sse2,
2746 .sse4_2,
2747 .x87,
2748 }),
2749 };
2750 pub const x86_64_v3 = CpuModel{
2751 .name = "x86_64_v3",
2752 .llvm_name = "x86-64-v3",
2753 .features = featureSet(&[_]Feature{
2754 .@"64bit",
2755 .avx2,
2756 .bmi,
2757 .bmi2,
2758 .cmov,
2759 .cx16,
2760 .cx8,
2761 .f16c,
2762 .fma,
2763 .fxsr,
2764 .lzcnt,
2765 .mmx,
2766 .movbe,
2767 .nopl,
2768 .popcnt,
2769 .sahf,
2770 .sse2,
2771 .sse4_2,
2772 .x87,
2773 .xsave,
2774 }),
2775 };
2776 pub const x86_64_v4 = CpuModel{
2777 .name = "x86_64_v4",
2778 .llvm_name = "x86-64-v4",
2779 .features = featureSet(&[_]Feature{
2780 .@"64bit",
2781 .avx2,
2782 .avx512bw,
2783 .avx512cd,
2784 .avx512dq,
2785 .avx512vl,
2786 .bmi,
2787 .bmi2,
2788 .cmov,
2789 .cx16,
2790 .cx8,
2791 .f16c,
2792 .fma,
2793 .fxsr,
2794 .lzcnt,
2795 .mmx,
2796 .movbe,
2797 .nopl,
2798 .popcnt,
2799 .sahf,
2800 .sse2,
2801 .sse4_2,
2802 .x87,
2803 .xsave,
2804 }),
2805 };
29282806 pub const yonah = CpuModel{
29292807 .name = "yonah",
29302808 .llvm_name = "yonah",
......@@ -2934,9 +2812,7 @@ pub const cpu = struct {
29342812 .fxsr,
29352813 .mmx,
29362814 .nopl,
2937 .slow_unaligned_mem_16,
29382815 .sse3,
2939 .vzeroupper,
29402816 .x87,
29412817 }),
29422818 };
......@@ -2950,16 +2826,11 @@ pub const cpu = struct {
29502826 .avx2,
29512827 .bmi,
29522828 .bmi2,
2953 .branchfusion,
29542829 .clflushopt,
29552830 .clzero,
29562831 .cmov,
29572832 .cx16,
29582833 .f16c,
2959 .fast_15bytenop,
2960 .fast_bextr,
2961 .fast_lzcnt,
2962 .fast_scalar_shift_masks,
29632834 .fma,
29642835 .fsgsbase,
29652836 .fxsr,
......@@ -2975,9 +2846,7 @@ pub const cpu = struct {
29752846 .rdseed,
29762847 .sahf,
29772848 .sha,
2978 .slow_shld,
29792849 .sse4a,
2980 .vzeroupper,
29812850 .x87,
29822851 .xsave,
29832852 .xsavec,
......@@ -2995,17 +2864,12 @@ pub const cpu = struct {
29952864 .avx2,
29962865 .bmi,
29972866 .bmi2,
2998 .branchfusion,
29992867 .clflushopt,
30002868 .clwb,
30012869 .clzero,
30022870 .cmov,
30032871 .cx16,
30042872 .f16c,
3005 .fast_15bytenop,
3006 .fast_bextr,
3007 .fast_lzcnt,
3008 .fast_scalar_shift_masks,
30092873 .fma,
30102874 .fsgsbase,
30112875 .fxsr,
......@@ -3022,9 +2886,52 @@ pub const cpu = struct {
30222886 .rdseed,
30232887 .sahf,
30242888 .sha,
3025 .slow_shld,
30262889 .sse4a,
3027 .vzeroupper,
2890 .wbnoinvd,
2891 .x87,
2892 .xsave,
2893 .xsavec,
2894 .xsaveopt,
2895 .xsaves,
2896 }),
2897 };
2898 pub const znver3 = CpuModel{
2899 .name = "znver3",
2900 .llvm_name = "znver3",
2901 .features = featureSet(&[_]Feature{
2902 .@"64bit",
2903 .adx,
2904 .aes,
2905 .avx2,
2906 .bmi,
2907 .bmi2,
2908 .clflushopt,
2909 .clwb,
2910 .clzero,
2911 .cmov,
2912 .cx16,
2913 .f16c,
2914 .fma,
2915 .fsgsbase,
2916 .fxsr,
2917 .invpcid,
2918 .lzcnt,
2919 .mmx,
2920 .movbe,
2921 .mwaitx,
2922 .nopl,
2923 .pclmul,
2924 .pku,
2925 .popcnt,
2926 .prfchw,
2927 .rdpid,
2928 .rdrnd,
2929 .rdseed,
2930 .sahf,
2931 .sha,
2932 .sse4a,
2933 .vaes,
2934 .vpclmulqdq,
30282935 .wbnoinvd,
30292936 .x87,
30302937 .xsave,