authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-05 12:58:32+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-04 06:08:09+02:00
log4de368a1b64c3d5a311b409f31eaa3b8b4157951
treec1a23a36bbc1816d45a7d22658cc44c6d162e65f
parent8ea2e1ded522ae972fc201ca52cbc6e752c1d405
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Update CPU models/features for LLVM 20.

Closes #21818.

17 files changed, 2034 insertions(+), 400 deletions(-)

lib/std/Target/aarch64.zig+279-64
......@@ -16,7 +16,7 @@ pub const Feature = enum {
1616 arith_bcc_fusion,
1717 arith_cbz_fusion,
1818 ascend_store_address,
19 b16b16,
19 avoid_ldapur,
2020 balance_fp_ops,
2121 bf16,
2222 brbe,
......@@ -36,6 +36,7 @@ pub const Feature = enum {
3636 chk,
3737 clrbhb,
3838 cmp_bcc_fusion,
39 cmpbr,
3940 complxnum,
4041 contextidr_el2,
4142 cpa,
......@@ -56,6 +57,8 @@ pub const Feature = enum {
5657 exynos_cheap_as_move,
5758 f32mm,
5859 f64mm,
60 f8f16mm,
61 f8f32mm,
5962 faminmax,
6063 fgt,
6164 fix_cortex_a53_835769,
......@@ -69,7 +72,9 @@ pub const Feature = enum {
6972 fp8fma,
7073 fp_armv8,
7174 fpac,
75 fprcvt,
7276 fptoint,
77 fujitsu_monaka,
7378 fullfp16,
7479 fuse_address,
7580 fuse_addsub_2reg_const1,
......@@ -94,6 +99,8 @@ pub const Feature = enum {
9499 lse,
95100 lse128,
96101 lse2,
102 lsfe,
103 lsui,
97104 lut,
98105 mec,
99106 mops,
......@@ -106,12 +113,15 @@ pub const Feature = enum {
106113 no_sve_fp_ld1r,
107114 no_zcz_fp,
108115 nv,
116 occmo,
109117 outline_atomics,
110118 pan,
111119 pan_rwv,
112120 pauth,
113121 pauth_lr,
122 pcdphint,
114123 perfmon,
124 pops,
115125 predictable_select_expensive,
116126 predres,
117127 prfm_slc_target,
......@@ -159,6 +169,7 @@ pub const Feature = enum {
159169 sme,
160170 sme2,
161171 sme2p1,
172 sme2p2,
162173 sme_b16b16,
163174 sme_f16f16,
164175 sme_f64f64,
......@@ -167,11 +178,15 @@ pub const Feature = enum {
167178 sme_fa64,
168179 sme_i16i64,
169180 sme_lutv2,
181 sme_mop4,
182 sme_tmop,
170183 spe,
171184 spe_eef,
172185 specres2,
173186 specrestrict,
174187 ssbs,
188 ssve_aes,
189 ssve_bitperm,
175190 ssve_fp8dot2,
176191 ssve_fp8dot4,
177192 ssve_fp8fma,
......@@ -185,7 +200,13 @@ pub const Feature = enum {
185200 sve2_sha3,
186201 sve2_sm4,
187202 sve2p1,
203 sve2p2,
204 sve_aes,
205 sve_aes2,
188206 sve_b16b16,
207 sve_bfscale,
208 sve_bitperm,
209 sve_f16f32mm,
189210 tagged_globals,
190211 the,
191212 tlb_rmi,
......@@ -202,7 +223,6 @@ pub const Feature = enum {
202223 use_fixed_over_scalable_if_equal_cost,
203224 use_postra_scheduler,
204225 use_reciprocal_square_root,
205 use_scalar_inc_vl,
206226 v8_1a,
207227 v8_2a,
208228 v8_3a,
......@@ -219,6 +239,7 @@ pub const Feature = enum {
219239 v9_3a,
220240 v9_4a,
221241 v9_5a,
242 v9_6a,
222243 v9a,
223244 vh,
224245 wfxt,
......@@ -264,7 +285,9 @@ pub const all_features = blk: {
264285 result[@intFromEnum(Feature.altnzcv)] = .{
265286 .llvm_name = "altnzcv",
266287 .description = "Enable alternative NZCV format for floating point comparisons",
267 .dependencies = featureSet(&[_]Feature{}),
288 .dependencies = featureSet(&[_]Feature{
289 .flagm,
290 }),
268291 };
269292 result[@intFromEnum(Feature.alu_lsl_fast)] = .{
270293 .llvm_name = "alu-lsl-fast",
......@@ -298,12 +321,10 @@ pub const all_features = blk: {
298321 .description = "Schedule vector stores by ascending address",
299322 .dependencies = featureSet(&[_]Feature{}),
300323 };
301 result[@intFromEnum(Feature.b16b16)] = .{
302 .llvm_name = "b16b16",
303 .description = "Enable SVE2.1 or SME2.1 non-widening BFloat16 to BFloat16 instructions",
304 .dependencies = featureSet(&[_]Feature{
305 .bf16,
306 }),
324 result[@intFromEnum(Feature.avoid_ldapur)] = .{
325 .llvm_name = "avoid-ldapur",
326 .description = "Prefer add+ldapr to offset ldapur",
327 .dependencies = featureSet(&[_]Feature{}),
307328 };
308329 result[@intFromEnum(Feature.balance_fp_ops)] = .{
309330 .llvm_name = "balance-fp-ops",
......@@ -313,7 +334,9 @@ pub const all_features = blk: {
313334 result[@intFromEnum(Feature.bf16)] = .{
314335 .llvm_name = "bf16",
315336 .description = "Enable BFloat16 Extension",
316 .dependencies = featureSet(&[_]Feature{}),
337 .dependencies = featureSet(&[_]Feature{
338 .neon,
339 }),
317340 };
318341 result[@intFromEnum(Feature.brbe)] = .{
319342 .llvm_name = "brbe",
......@@ -373,7 +396,9 @@ pub const all_features = blk: {
373396 result[@intFromEnum(Feature.ccdp)] = .{
374397 .llvm_name = "ccdp",
375398 .description = "Enable Armv8.5-A Cache Clean to Point of Deep Persistence",
376 .dependencies = featureSet(&[_]Feature{}),
399 .dependencies = featureSet(&[_]Feature{
400 .ccpp,
401 }),
377402 };
378403 result[@intFromEnum(Feature.ccidx)] = .{
379404 .llvm_name = "ccidx",
......@@ -400,6 +425,11 @@ pub const all_features = blk: {
400425 .description = "CPU fuses cmp+bcc operations",
401426 .dependencies = featureSet(&[_]Feature{}),
402427 };
428 result[@intFromEnum(Feature.cmpbr)] = .{
429 .llvm_name = "cmpbr",
430 .description = "Enable Armv9.6-A base compare and branch instructions",
431 .dependencies = featureSet(&[_]Feature{}),
432 };
403433 result[@intFromEnum(Feature.complxnum)] = .{
404434 .llvm_name = "complxnum",
405435 .description = "Enable Armv8.3-A Floating-point complex number support",
......@@ -515,10 +545,26 @@ pub const all_features = blk: {
515545 .sve,
516546 }),
517547 };
548 result[@intFromEnum(Feature.f8f16mm)] = .{
549 .llvm_name = "f8f16mm",
550 .description = "Enable Armv9.6-A FP8 to Half-Precision Matrix Multiplication",
551 .dependencies = featureSet(&[_]Feature{
552 .fp8,
553 }),
554 };
555 result[@intFromEnum(Feature.f8f32mm)] = .{
556 .llvm_name = "f8f32mm",
557 .description = "Enable Armv9.6-A FP8 to Single-Precision Matrix Multiplication",
558 .dependencies = featureSet(&[_]Feature{
559 .fp8,
560 }),
561 };
518562 result[@intFromEnum(Feature.faminmax)] = .{
519563 .llvm_name = "faminmax",
520564 .description = "Enable FAMIN and FAMAX instructions",
521 .dependencies = featureSet(&[_]Feature{}),
565 .dependencies = featureSet(&[_]Feature{
566 .neon,
567 }),
522568 };
523569 result[@intFromEnum(Feature.fgt)] = .{
524570 .llvm_name = "fgt",
......@@ -550,29 +596,28 @@ pub const all_features = blk: {
550596 .description = "Enable FP16 FML instructions",
551597 .dependencies = featureSet(&[_]Feature{
552598 .fullfp16,
599 .neon,
553600 }),
554601 };
555602 result[@intFromEnum(Feature.fp8)] = .{
556603 .llvm_name = "fp8",
557604 .description = "Enable FP8 instructions",
558605 .dependencies = featureSet(&[_]Feature{
559 .bf16,
560 .faminmax,
561 .lut,
606 .neon,
562607 }),
563608 };
564609 result[@intFromEnum(Feature.fp8dot2)] = .{
565610 .llvm_name = "fp8dot2",
566611 .description = "Enable FP8 2-way dot instructions",
567612 .dependencies = featureSet(&[_]Feature{
568 .fp8dot4,
613 .fp8,
569614 }),
570615 };
571616 result[@intFromEnum(Feature.fp8dot4)] = .{
572617 .llvm_name = "fp8dot4",
573618 .description = "Enable FP8 4-way dot instructions",
574619 .dependencies = featureSet(&[_]Feature{
575 .fp8fma,
620 .fp8,
576621 }),
577622 };
578623 result[@intFromEnum(Feature.fp8fma)] = .{
......@@ -589,13 +634,32 @@ pub const all_features = blk: {
589634 };
590635 result[@intFromEnum(Feature.fpac)] = .{
591636 .llvm_name = "fpac",
592 .description = "Enable v8.3-A Pointer Authentication Faulting enhancement",
637 .description = "Enable Armv8.3-A Pointer Authentication Faulting enhancement",
593638 .dependencies = featureSet(&[_]Feature{}),
594639 };
640 result[@intFromEnum(Feature.fprcvt)] = .{
641 .llvm_name = "fprcvt",
642 .description = "Enable Armv9.6-A base convert instructions for SIMD&FP scalar register operands of different input and output sizes",
643 .dependencies = featureSet(&[_]Feature{
644 .fp_armv8,
645 }),
646 };
595647 result[@intFromEnum(Feature.fptoint)] = .{
596648 .llvm_name = "fptoint",
597649 .description = "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int",
598 .dependencies = featureSet(&[_]Feature{}),
650 .dependencies = featureSet(&[_]Feature{
651 .fp_armv8,
652 }),
653 };
654 result[@intFromEnum(Feature.fujitsu_monaka)] = .{
655 .llvm_name = "fujitsu-monaka",
656 .description = "Fujitsu FUJITSU-MONAKA processors",
657 .dependencies = featureSet(&[_]Feature{
658 .arith_bcc_fusion,
659 .enable_select_opt,
660 .predictable_select_expensive,
661 .use_postra_scheduler,
662 }),
599663 };
600664 result[@intFromEnum(Feature.fullfp16)] = .{
601665 .llvm_name = "fullfp16",
......@@ -679,7 +743,9 @@ pub const all_features = blk: {
679743 result[@intFromEnum(Feature.i8mm)] = .{
680744 .llvm_name = "i8mm",
681745 .description = "Enable Matrix Multiply Int8 Extension",
682 .dependencies = featureSet(&[_]Feature{}),
746 .dependencies = featureSet(&[_]Feature{
747 .neon,
748 }),
683749 };
684750 result[@intFromEnum(Feature.ite)] = .{
685751 .llvm_name = "ite",
......@@ -727,10 +793,24 @@ pub const all_features = blk: {
727793 .description = "Enable Armv8.4-A Large System Extension 2 (LSE2) atomicity rules",
728794 .dependencies = featureSet(&[_]Feature{}),
729795 };
796 result[@intFromEnum(Feature.lsfe)] = .{
797 .llvm_name = "lsfe",
798 .description = "Enable Armv9.6-A base Atomic floating-point in-memory instructions",
799 .dependencies = featureSet(&[_]Feature{
800 .fp_armv8,
801 }),
802 };
803 result[@intFromEnum(Feature.lsui)] = .{
804 .llvm_name = "lsui",
805 .description = "Enable Armv9.6-A unprivileged load/store instructions",
806 .dependencies = featureSet(&[_]Feature{}),
807 };
730808 result[@intFromEnum(Feature.lut)] = .{
731809 .llvm_name = "lut",
732810 .description = "Enable Lookup Table instructions",
733 .dependencies = featureSet(&[_]Feature{}),
811 .dependencies = featureSet(&[_]Feature{
812 .neon,
813 }),
734814 };
735815 result[@intFromEnum(Feature.mec)] = .{
736816 .llvm_name = "mec",
......@@ -791,6 +871,11 @@ pub const all_features = blk: {
791871 .description = "Enable Armv8.4-A Nested Virtualization Enchancement",
792872 .dependencies = featureSet(&[_]Feature{}),
793873 };
874 result[@intFromEnum(Feature.occmo)] = .{
875 .llvm_name = "occmo",
876 .description = "Enable Armv9.6-A Outer cacheable cache maintenance operations",
877 .dependencies = featureSet(&[_]Feature{}),
878 };
794879 result[@intFromEnum(Feature.outline_atomics)] = .{
795880 .llvm_name = "outline-atomics",
796881 .description = "Enable out of line atomics to support LSE instructions",
......@@ -818,11 +903,21 @@ pub const all_features = blk: {
818903 .description = "Enable Armv9.5-A PAC enhancements",
819904 .dependencies = featureSet(&[_]Feature{}),
820905 };
906 result[@intFromEnum(Feature.pcdphint)] = .{
907 .llvm_name = "pcdphint",
908 .description = "Enable Armv9.6-A Producer Consumer Data Placement hints",
909 .dependencies = featureSet(&[_]Feature{}),
910 };
821911 result[@intFromEnum(Feature.perfmon)] = .{
822912 .llvm_name = "perfmon",
823913 .description = "Enable Armv8.0-A PMUv3 Performance Monitors extension",
824914 .dependencies = featureSet(&[_]Feature{}),
825915 };
916 result[@intFromEnum(Feature.pops)] = .{
917 .llvm_name = "pops",
918 .description = "Enable Armv9.6-A Point Of Physical Storage (PoPS) DC instructions",
919 .dependencies = featureSet(&[_]Feature{}),
920 };
826921 result[@intFromEnum(Feature.predictable_select_expensive)] = .{
827922 .llvm_name = "predictable-select-expensive",
828923 .description = "Prefer likely predicted branches over selects",
......@@ -1062,7 +1157,7 @@ pub const all_features = blk: {
10621157 .description = "Enable Scalable Matrix Extension (SME)",
10631158 .dependencies = featureSet(&[_]Feature{
10641159 .bf16,
1065 .use_scalar_inc_vl,
1160 .fullfp16,
10661161 }),
10671162 };
10681163 result[@intFromEnum(Feature.sme2)] = .{
......@@ -1079,12 +1174,19 @@ pub const all_features = blk: {
10791174 .sme2,
10801175 }),
10811176 };
1177 result[@intFromEnum(Feature.sme2p2)] = .{
1178 .llvm_name = "sme2p2",
1179 .description = "Enable Armv9.6-A Scalable Matrix Extension 2.2 instructions",
1180 .dependencies = featureSet(&[_]Feature{
1181 .sme2p1,
1182 }),
1183 };
10821184 result[@intFromEnum(Feature.sme_b16b16)] = .{
10831185 .llvm_name = "sme-b16b16",
10841186 .description = "Enable SME2.1 ZA-targeting non-widening BFloat16 instructions",
10851187 .dependencies = featureSet(&[_]Feature{
1086 .b16b16,
10871188 .sme2,
1189 .sve_b16b16,
10881190 }),
10891191 };
10901192 result[@intFromEnum(Feature.sme_f16f16)] = .{
......@@ -1105,7 +1207,8 @@ pub const all_features = blk: {
11051207 .llvm_name = "sme-f8f16",
11061208 .description = "Enable Scalable Matrix Extension (SME) F8F16 instructions",
11071209 .dependencies = featureSet(&[_]Feature{
1108 .sme_f8f32,
1210 .fp8,
1211 .sme2,
11091212 }),
11101213 };
11111214 result[@intFromEnum(Feature.sme_f8f32)] = .{
......@@ -1134,7 +1237,23 @@ pub const all_features = blk: {
11341237 result[@intFromEnum(Feature.sme_lutv2)] = .{
11351238 .llvm_name = "sme-lutv2",
11361239 .description = "Enable Scalable Matrix Extension (SME) LUTv2 instructions",
1137 .dependencies = featureSet(&[_]Feature{}),
1240 .dependencies = featureSet(&[_]Feature{
1241 .sme2,
1242 }),
1243 };
1244 result[@intFromEnum(Feature.sme_mop4)] = .{
1245 .llvm_name = "sme-mop4",
1246 .description = "Enable SME Quarter-tile outer product instructions",
1247 .dependencies = featureSet(&[_]Feature{
1248 .sme2,
1249 }),
1250 };
1251 result[@intFromEnum(Feature.sme_tmop)] = .{
1252 .llvm_name = "sme-tmop",
1253 .description = "Enable SME Structured sparsity outer product instructions.",
1254 .dependencies = featureSet(&[_]Feature{
1255 .sme2,
1256 }),
11381257 };
11391258 result[@intFromEnum(Feature.spe)] = .{
11401259 .llvm_name = "spe",
......@@ -1163,18 +1282,36 @@ pub const all_features = blk: {
11631282 .description = "Enable Speculative Store Bypass Safe bit",
11641283 .dependencies = featureSet(&[_]Feature{}),
11651284 };
1285 result[@intFromEnum(Feature.ssve_aes)] = .{
1286 .llvm_name = "ssve-aes",
1287 .description = "Enable Armv9.6-A SVE AES support in streaming SVE mode",
1288 .dependencies = featureSet(&[_]Feature{
1289 .sme2,
1290 .sve_aes,
1291 }),
1292 };
1293 result[@intFromEnum(Feature.ssve_bitperm)] = .{
1294 .llvm_name = "ssve-bitperm",
1295 .description = "Enable Armv9.6-A SVE BitPerm support in streaming SVE mode",
1296 .dependencies = featureSet(&[_]Feature{
1297 .sme2,
1298 .sve_bitperm,
1299 }),
1300 };
11661301 result[@intFromEnum(Feature.ssve_fp8dot2)] = .{
11671302 .llvm_name = "ssve-fp8dot2",
11681303 .description = "Enable SVE2 FP8 2-way dot product instructions",
11691304 .dependencies = featureSet(&[_]Feature{
1170 .ssve_fp8dot4,
1305 .fp8,
1306 .sme2,
11711307 }),
11721308 };
11731309 result[@intFromEnum(Feature.ssve_fp8dot4)] = .{
11741310 .llvm_name = "ssve-fp8dot4",
11751311 .description = "Enable SVE2 FP8 4-way dot product instructions",
11761312 .dependencies = featureSet(&[_]Feature{
1177 .ssve_fp8fma,
1313 .fp8,
1314 .sme2,
11781315 }),
11791316 };
11801317 result[@intFromEnum(Feature.ssve_fp8fma)] = .{
......@@ -1212,22 +1349,22 @@ pub const all_features = blk: {
12121349 .description = "Enable Scalable Vector Extension 2 (SVE2) instructions",
12131350 .dependencies = featureSet(&[_]Feature{
12141351 .sve,
1215 .use_scalar_inc_vl,
12161352 }),
12171353 };
12181354 result[@intFromEnum(Feature.sve2_aes)] = .{
12191355 .llvm_name = "sve2-aes",
1220 .description = "Enable AES SVE2 instructions",
1356 .description = "Shorthand for +sve2+sve-aes",
12211357 .dependencies = featureSet(&[_]Feature{
1222 .aes,
12231358 .sve2,
1359 .sve_aes,
12241360 }),
12251361 };
12261362 result[@intFromEnum(Feature.sve2_bitperm)] = .{
12271363 .llvm_name = "sve2-bitperm",
1228 .description = "Enable bit permutation SVE2 instructions",
1364 .description = "Shorthand for +sve2+sve-bitperm",
12291365 .dependencies = featureSet(&[_]Feature{
12301366 .sve2,
1367 .sve_bitperm,
12311368 }),
12321369 };
12331370 result[@intFromEnum(Feature.sve2_sha3)] = .{
......@@ -1253,11 +1390,45 @@ pub const all_features = blk: {
12531390 .sve2,
12541391 }),
12551392 };
1393 result[@intFromEnum(Feature.sve2p2)] = .{
1394 .llvm_name = "sve2p2",
1395 .description = "Enable Armv9.6-A Scalable Vector Extension 2.2 instructions",
1396 .dependencies = featureSet(&[_]Feature{
1397 .sve2p1,
1398 }),
1399 };
1400 result[@intFromEnum(Feature.sve_aes)] = .{
1401 .llvm_name = "sve-aes",
1402 .description = "Enable SVE AES and quadword SVE polynomial multiply instructions",
1403 .dependencies = featureSet(&[_]Feature{
1404 .aes,
1405 }),
1406 };
1407 result[@intFromEnum(Feature.sve_aes2)] = .{
1408 .llvm_name = "sve-aes2",
1409 .description = "Enable Armv9.6-A SVE multi-vector AES and multi-vector quadword polynomial multiply instructions",
1410 .dependencies = featureSet(&[_]Feature{}),
1411 };
12561412 result[@intFromEnum(Feature.sve_b16b16)] = .{
12571413 .llvm_name = "sve-b16b16",
12581414 .description = "Enable SVE2 non-widening and SME2 Z-targeting non-widening BFloat16 instructions",
1415 .dependencies = featureSet(&[_]Feature{}),
1416 };
1417 result[@intFromEnum(Feature.sve_bfscale)] = .{
1418 .llvm_name = "sve-bfscale",
1419 .description = "Enable Armv9.6-A SVE BFloat16 scaling instructions",
1420 .dependencies = featureSet(&[_]Feature{}),
1421 };
1422 result[@intFromEnum(Feature.sve_bitperm)] = .{
1423 .llvm_name = "sve-bitperm",
1424 .description = "Enable bit permutation SVE2 instructions",
1425 .dependencies = featureSet(&[_]Feature{}),
1426 };
1427 result[@intFromEnum(Feature.sve_f16f32mm)] = .{
1428 .llvm_name = "sve-f16f32mm",
1429 .description = "Enable Armv9.6-A FP16 to FP32 Matrix Multiply instructions",
12591430 .dependencies = featureSet(&[_]Feature{
1260 .b16b16,
1431 .sve,
12611432 }),
12621433 };
12631434 result[@intFromEnum(Feature.tagged_globals)] = .{
......@@ -1340,11 +1511,6 @@ pub const all_features = blk: {
13401511 .description = "Use the reciprocal square root approximation",
13411512 .dependencies = featureSet(&[_]Feature{}),
13421513 };
1343 result[@intFromEnum(Feature.use_scalar_inc_vl)] = .{
1344 .llvm_name = "use-scalar-inc-vl",
1345 .description = "Prefer inc/dec over add+cnt",
1346 .dependencies = featureSet(&[_]Feature{}),
1347 };
13481514 result[@intFromEnum(Feature.v8_1a)] = .{
13491515 .llvm_name = "v8.1a",
13501516 .description = "Support ARM v8.1a architecture",
......@@ -1431,6 +1597,7 @@ pub const all_features = blk: {
14311597 .description = "Support ARM v8.7a architecture",
14321598 .dependencies = featureSet(&[_]Feature{
14331599 .hcx,
1600 .spe_eef,
14341601 .v8_6a,
14351602 .wfxt,
14361603 .xs,
......@@ -1527,6 +1694,7 @@ pub const all_features = blk: {
15271694 .llvm_name = "v9.4a",
15281695 .description = "Support ARM v9.4a architecture",
15291696 .dependencies = featureSet(&[_]Feature{
1697 .sve2p1,
15301698 .v8_9a,
15311699 .v9_3a,
15321700 }),
......@@ -1541,6 +1709,18 @@ pub const all_features = blk: {
15411709 .v9_4a,
15421710 }),
15431711 };
1712 result[@intFromEnum(Feature.v9_6a)] = .{
1713 .llvm_name = "v9.6a",
1714 .description = "Support ARM v9.6a architecture",
1715 .dependencies = featureSet(&[_]Feature{
1716 .cmpbr,
1717 .fprcvt,
1718 .lsui,
1719 .occmo,
1720 .sve2p2,
1721 .v9_5a,
1722 }),
1723 };
15441724 result[@intFromEnum(Feature.v9a)] = .{
15451725 .llvm_name = "v9a",
15461726 .description = "Support ARM v9a architecture",
......@@ -1820,7 +2000,9 @@ pub const cpu = struct {
18202000 .arith_cbz_fusion,
18212001 .disable_latency_sched_heuristic,
18222002 .fp16fml,
2003 .fpac,
18232004 .fuse_address,
2005 .fuse_adrp_add,
18242006 .fuse_aes,
18252007 .fuse_arith_logic,
18262008 .fuse_crypto_eor,
......@@ -1844,6 +2026,7 @@ pub const cpu = struct {
18442026 .arith_cbz_fusion,
18452027 .disable_latency_sched_heuristic,
18462028 .fp16fml,
2029 .fpac,
18472030 .fuse_address,
18482031 .fuse_adrp_add,
18492032 .fuse_aes,
......@@ -1870,6 +2053,7 @@ pub const cpu = struct {
18702053 .arith_cbz_fusion,
18712054 .disable_latency_sched_heuristic,
18722055 .fp16fml,
2056 .fpac,
18732057 .fuse_address,
18742058 .fuse_adrp_add,
18752059 .fuse_aes,
......@@ -1988,7 +2172,9 @@ pub const cpu = struct {
19882172 .arith_cbz_fusion,
19892173 .disable_latency_sched_heuristic,
19902174 .fp16fml,
2175 .fpac,
19912176 .fuse_address,
2177 .fuse_adrp_add,
19922178 .fuse_aes,
19932179 .fuse_arith_logic,
19942180 .fuse_crypto_eor,
......@@ -2012,6 +2198,7 @@ pub const cpu = struct {
20122198 .arith_cbz_fusion,
20132199 .disable_latency_sched_heuristic,
20142200 .fp16fml,
2201 .fpac,
20152202 .fuse_address,
20162203 .fuse_adrp_add,
20172204 .fuse_aes,
......@@ -2038,7 +2225,9 @@ pub const cpu = struct {
20382225 .arith_cbz_fusion,
20392226 .disable_latency_sched_heuristic,
20402227 .fp16fml,
2228 .fpac,
20412229 .fuse_address,
2230 .fuse_adrp_add,
20422231 .fuse_aes,
20432232 .fuse_arith_logic,
20442233 .fuse_crypto_eor,
......@@ -2119,7 +2308,7 @@ pub const cpu = struct {
21192308 .mte,
21202309 .perfmon,
21212310 .predictable_select_expensive,
2122 .sve2_bitperm,
2311 .sve_bitperm,
21232312 .use_postra_scheduler,
21242313 .v9a,
21252314 }),
......@@ -2158,7 +2347,7 @@ pub const cpu = struct {
21582347 .i8mm,
21592348 .mte,
21602349 .perfmon,
2161 .sve2_bitperm,
2350 .sve_bitperm,
21622351 .use_postra_scheduler,
21632352 .v9a,
21642353 }),
......@@ -2173,7 +2362,7 @@ pub const cpu = struct {
21732362 .fuse_aes,
21742363 .mte,
21752364 .perfmon,
2176 .sve2_bitperm,
2365 .sve_bitperm,
21772366 .use_postra_scheduler,
21782367 .v9_2a,
21792368 }),
......@@ -2188,7 +2377,7 @@ pub const cpu = struct {
21882377 .fuse_aes,
21892378 .mte,
21902379 .perfmon,
2191 .sve2_bitperm,
2380 .sve_bitperm,
21922381 .use_postra_scheduler,
21932382 .v9_2a,
21942383 }),
......@@ -2300,7 +2489,7 @@ pub const cpu = struct {
23002489 .mte,
23012490 .perfmon,
23022491 .predictable_select_expensive,
2303 .sve2_bitperm,
2492 .sve_bitperm,
23042493 .use_postra_scheduler,
23052494 .v9a,
23062495 }),
......@@ -2322,7 +2511,7 @@ pub const cpu = struct {
23222511 .perfmon,
23232512 .predictable_select_expensive,
23242513 .spe,
2325 .sve2_bitperm,
2514 .sve_bitperm,
23262515 .use_postra_scheduler,
23272516 .v9a,
23282517 }),
......@@ -2359,8 +2548,7 @@ pub const cpu = struct {
23592548 .perfmon,
23602549 .predictable_select_expensive,
23612550 .spe,
2362 .spe_eef,
2363 .sve2_bitperm,
2551 .sve_bitperm,
23642552 .use_postra_scheduler,
23652553 .v9_2a,
23662554 }),
......@@ -2380,8 +2568,7 @@ pub const cpu = struct {
23802568 .perfmon,
23812569 .predictable_select_expensive,
23822570 .spe,
2383 .spe_eef,
2384 .sve2_bitperm,
2571 .sve_bitperm,
23852572 .use_postra_scheduler,
23862573 .v9_2a,
23872574 }),
......@@ -2401,8 +2588,7 @@ pub const cpu = struct {
24012588 .perfmon,
24022589 .predictable_select_expensive,
24032590 .spe,
2404 .spe_eef,
2405 .sve2_bitperm,
2591 .sve_bitperm,
24062592 .use_postra_scheduler,
24072593 .v9_2a,
24082594 }),
......@@ -2660,7 +2846,8 @@ pub const cpu = struct {
26602846 .mte,
26612847 .perfmon,
26622848 .predictable_select_expensive,
2663 .sve2_bitperm,
2849 .sve_bitperm,
2850 .use_fixed_over_scalable_if_equal_cost,
26642851 .use_postra_scheduler,
26652852 .v9a,
26662853 }),
......@@ -2670,6 +2857,7 @@ pub const cpu = struct {
26702857 .llvm_name = "cortex-x3",
26712858 .features = featureSet(&[_]Feature{
26722859 .alu_lsl_fast,
2860 .avoid_ldapur,
26732861 .bf16,
26742862 .enable_select_opt,
26752863 .ete,
......@@ -2681,7 +2869,8 @@ pub const cpu = struct {
26812869 .perfmon,
26822870 .predictable_select_expensive,
26832871 .spe,
2684 .sve2_bitperm,
2872 .sve_bitperm,
2873 .use_fixed_over_scalable_if_equal_cost,
26852874 .use_postra_scheduler,
26862875 .v9a,
26872876 }),
......@@ -2691,6 +2880,7 @@ pub const cpu = struct {
26912880 .llvm_name = "cortex-x4",
26922881 .features = featureSet(&[_]Feature{
26932882 .alu_lsl_fast,
2883 .avoid_ldapur,
26942884 .enable_select_opt,
26952885 .ete,
26962886 .fp16fml,
......@@ -2700,8 +2890,8 @@ pub const cpu = struct {
27002890 .perfmon,
27012891 .predictable_select_expensive,
27022892 .spe,
2703 .spe_eef,
2704 .sve2_bitperm,
2893 .sve_bitperm,
2894 .use_fixed_over_scalable_if_equal_cost,
27052895 .use_postra_scheduler,
27062896 .v9_2a,
27072897 }),
......@@ -2711,6 +2901,7 @@ pub const cpu = struct {
27112901 .llvm_name = "cortex-x925",
27122902 .features = featureSet(&[_]Feature{
27132903 .alu_lsl_fast,
2904 .avoid_ldapur,
27142905 .enable_select_opt,
27152906 .ete,
27162907 .fp16fml,
......@@ -2720,8 +2911,8 @@ pub const cpu = struct {
27202911 .perfmon,
27212912 .predictable_select_expensive,
27222913 .spe,
2723 .spe_eef,
2724 .sve2_bitperm,
2914 .sve_bitperm,
2915 .use_fixed_over_scalable_if_equal_cost,
27252916 .use_postra_scheduler,
27262917 .v9_2a,
27272918 }),
......@@ -2881,6 +3072,29 @@ pub const cpu = struct {
28813072 .zcz,
28823073 }),
28833074 };
3075 pub const fujitsu_monaka: CpuModel = .{
3076 .name = "fujitsu_monaka",
3077 .llvm_name = "fujitsu-monaka",
3078 .features = featureSet(&[_]Feature{
3079 .clrbhb,
3080 .ete,
3081 .faminmax,
3082 .fp16fml,
3083 .fp8dot2,
3084 .fpac,
3085 .fujitsu_monaka,
3086 .ls64,
3087 .lut,
3088 .perfmon,
3089 .rand,
3090 .specres2,
3091 .sve2_sha3,
3092 .sve2_sm4,
3093 .sve_aes,
3094 .sve_bitperm,
3095 .v9_3a,
3096 }),
3097 };
28843098 pub const generic: CpuModel = .{
28853099 .name = "generic",
28863100 .llvm_name = "generic",
......@@ -2898,6 +3112,7 @@ pub const cpu = struct {
28983112 .llvm_name = "grace",
28993113 .features = featureSet(&[_]Feature{
29003114 .alu_lsl_fast,
3115 .avoid_ldapur,
29013116 .bf16,
29023117 .cmp_bcc_fusion,
29033118 .enable_select_opt,
......@@ -2911,7 +3126,7 @@ pub const cpu = struct {
29113126 .predictable_select_expensive,
29123127 .rand,
29133128 .spe,
2914 .sve2_bitperm,
3129 .sve_bitperm,
29153130 .use_fixed_over_scalable_if_equal_cost,
29163131 .use_postra_scheduler,
29173132 .v9a,
......@@ -3012,7 +3227,7 @@ pub const cpu = struct {
30123227 .mte,
30133228 .perfmon,
30143229 .predictable_select_expensive,
3015 .sve2_bitperm,
3230 .sve_bitperm,
30163231 .use_postra_scheduler,
30173232 .v9a,
30183233 }),
......@@ -3032,8 +3247,7 @@ pub const cpu = struct {
30323247 .predictable_select_expensive,
30333248 .rand,
30343249 .spe,
3035 .spe_eef,
3036 .sve2_bitperm,
3250 .sve_bitperm,
30373251 .use_postra_scheduler,
30383252 .v9_2a,
30393253 }),
......@@ -3070,6 +3284,7 @@ pub const cpu = struct {
30703284 .llvm_name = "neoverse-v2",
30713285 .features = featureSet(&[_]Feature{
30723286 .alu_lsl_fast,
3287 .avoid_ldapur,
30733288 .bf16,
30743289 .cmp_bcc_fusion,
30753290 .enable_select_opt,
......@@ -3083,7 +3298,7 @@ pub const cpu = struct {
30833298 .predictable_select_expensive,
30843299 .rand,
30853300 .spe,
3086 .sve2_bitperm,
3301 .sve_bitperm,
30873302 .use_fixed_over_scalable_if_equal_cost,
30883303 .use_postra_scheduler,
30893304 .v9a,
......@@ -3094,6 +3309,7 @@ pub const cpu = struct {
30943309 .llvm_name = "neoverse-v3",
30953310 .features = featureSet(&[_]Feature{
30963311 .alu_lsl_fast,
3312 .avoid_ldapur,
30973313 .brbe,
30983314 .enable_select_opt,
30993315 .ete,
......@@ -3106,8 +3322,7 @@ pub const cpu = struct {
31063322 .predictable_select_expensive,
31073323 .rand,
31083324 .spe,
3109 .spe_eef,
3110 .sve2_bitperm,
3325 .sve_bitperm,
31113326 .use_postra_scheduler,
31123327 .v9_2a,
31133328 }),
......@@ -3117,6 +3332,7 @@ pub const cpu = struct {
31173332 .llvm_name = "neoverse-v3ae",
31183333 .features = featureSet(&[_]Feature{
31193334 .alu_lsl_fast,
3335 .avoid_ldapur,
31203336 .brbe,
31213337 .enable_select_opt,
31223338 .ete,
......@@ -3129,8 +3345,7 @@ pub const cpu = struct {
31293345 .predictable_select_expensive,
31303346 .rand,
31313347 .spe,
3132 .spe_eef,
3133 .sve2_bitperm,
3348 .sve_bitperm,
31343349 .use_postra_scheduler,
31353350 .v9_2a,
31363351 }),
lib/std/Target/amdgcn.zig+327-36
......@@ -8,11 +8,15 @@ pub const Feature = enum {
88 @"16_bit_insts",
99 a16,
1010 add_no_carry_insts,
11 addressablelocalmemorysize163840,
12 addressablelocalmemorysize32768,
13 addressablelocalmemorysize65536,
1114 agent_scope_fine_grained_remote_memory_atomics,
1215 allocate1_5xvgprs,
1316 aperture_regs,
1417 architected_flat_scratch,
1518 architected_sgprs,
19 ashr_pk_insts,
1620 atomic_buffer_global_pk_add_f16_insts,
1721 atomic_buffer_global_pk_add_f16_no_rtn_insts,
1822 atomic_buffer_pk_add_bf16_inst,
......@@ -28,13 +32,20 @@ pub const Feature = enum {
2832 atomic_global_pk_add_bf16_inst,
2933 auto_waitcnt_before_barrier,
3034 back_off_barrier,
35 bf16_cvt_insts,
36 bf8_cvt_scale_insts,
37 bitop3_insts,
3138 ci_insts,
3239 cumode,
40 cvt_fp8_vop1_bug,
41 cvt_pk_f16_f32_inst,
3342 default_component_broadcast,
3443 default_component_zero,
3544 dl_insts,
3645 dot10_insts,
3746 dot11_insts,
47 dot12_insts,
48 dot13_insts,
3849 dot1_insts,
3950 dot2_insts,
4051 dot3_insts,
......@@ -51,6 +62,8 @@ pub const Feature = enum {
5162 ds128,
5263 ds_src2_insts,
5364 extended_image_insts,
65 f16bf16_to_fp6bf6_cvt_scale_insts,
66 f32_to_f16bf16_cvt_sr_insts,
5467 fast_denormal_f32,
5568 fast_fmaf,
5669 flat_address_space,
......@@ -66,8 +79,11 @@ pub const Feature = enum {
6679 fmacf64_inst,
6780 fmaf,
6881 force_store_sc0_sc1,
82 fp4_cvt_scale_insts,
6983 fp64,
84 fp6bf6_cvt_scale_insts,
7085 fp8_conversion_insts,
86 fp8_cvt_scale_insts,
7187 fp8_insts,
7288 full_rate_64_ops,
7389 g16,
......@@ -88,6 +104,7 @@ pub const Feature = enum {
88104 gfx9,
89105 gfx90a_insts,
90106 gfx940_insts,
107 gfx950_insts,
91108 gfx9_insts,
92109 gws,
93110 half_rate_64_ops,
......@@ -103,8 +120,6 @@ pub const Feature = enum {
103120 ldsbankcount16,
104121 ldsbankcount32,
105122 load_store_opt,
106 localmemorysize32768,
107 localmemorysize65536,
108123 mad_intra_fwd_bug,
109124 mad_mac_f32_insts,
110125 mad_mix_insts,
......@@ -117,6 +132,9 @@ pub const Feature = enum {
117132 memory_atomic_fadd_f32_denormal_support,
118133 mfma_inline_literal_bug,
119134 mimg_r128,
135 minimum3_maximum3_f16,
136 minimum3_maximum3_f32,
137 minimum3_maximum3_pkf16,
120138 movrel,
121139 msaa_load_dst_sel_bug,
122140 negative_scratch_offset_bug,
......@@ -130,9 +148,12 @@ pub const Feature = enum {
130148 packed_fp32_ops,
131149 packed_tid,
132150 partial_nsa_encoding,
151 permlane16_swap,
152 permlane32_swap,
133153 pk_fmac_f16_inst,
134154 precise_memory,
135155 priv_enabled_trap2_nop_bug,
156 prng_inst,
136157 promote_alloca,
137158 prt_strict_null,
138159 pseudo_scalar_trans,
......@@ -178,7 +199,6 @@ pub const Feature = enum {
178199 vcmpx_exec_war_hazard,
179200 vcmpx_permlane_hazard,
180201 vgpr_index_mode,
181 vgpr_singleuse_hint,
182202 vmem_to_scalar_write_hazard,
183203 vmem_write_vgpr_in_order,
184204 volcanic_islands,
......@@ -189,6 +209,7 @@ pub const Feature = enum {
189209 wavefrontsize16,
190210 wavefrontsize32,
191211 wavefrontsize64,
212 xf32_insts,
192213 xnack,
193214 xnack_support,
194215};
......@@ -217,6 +238,21 @@ pub const all_features = blk: {
217238 .description = "Have VALU add/sub instructions without carry out",
218239 .dependencies = featureSet(&[_]Feature{}),
219240 };
241 result[@intFromEnum(Feature.addressablelocalmemorysize163840)] = .{
242 .llvm_name = "addressablelocalmemorysize163840",
243 .description = "The size of local memory in bytes",
244 .dependencies = featureSet(&[_]Feature{}),
245 };
246 result[@intFromEnum(Feature.addressablelocalmemorysize32768)] = .{
247 .llvm_name = "addressablelocalmemorysize32768",
248 .description = "The size of local memory in bytes",
249 .dependencies = featureSet(&[_]Feature{}),
250 };
251 result[@intFromEnum(Feature.addressablelocalmemorysize65536)] = .{
252 .llvm_name = "addressablelocalmemorysize65536",
253 .description = "The size of local memory in bytes",
254 .dependencies = featureSet(&[_]Feature{}),
255 };
220256 result[@intFromEnum(Feature.agent_scope_fine_grained_remote_memory_atomics)] = .{
221257 .llvm_name = "agent-scope-fine-grained-remote-memory-atomics",
222258 .description = "Agent (device) scoped atomic operations, excluding those directly supported by PCIe (i.e. integer atomic add, exchange, and compare-and-swap), are functional for allocations in host or peer device memory.",
......@@ -242,6 +278,11 @@ pub const all_features = blk: {
242278 .description = "Enable the architected SGPRs",
243279 .dependencies = featureSet(&[_]Feature{}),
244280 };
281 result[@intFromEnum(Feature.ashr_pk_insts)] = .{
282 .llvm_name = "ashr-pk-insts",
283 .description = "Has Arithmetic Shift Pack instructions",
284 .dependencies = featureSet(&[_]Feature{}),
285 };
245286 result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_insts)] = .{
246287 .llvm_name = "atomic-buffer-global-pk-add-f16-insts",
247288 .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that can return original value",
......@@ -327,6 +368,21 @@ pub const all_features = blk: {
327368 .description = "Hardware supports backing off s_barrier if an exception occurs",
328369 .dependencies = featureSet(&[_]Feature{}),
329370 };
371 result[@intFromEnum(Feature.bf16_cvt_insts)] = .{
372 .llvm_name = "bf16-cvt-insts",
373 .description = "Has bf16 conversion instructions",
374 .dependencies = featureSet(&[_]Feature{}),
375 };
376 result[@intFromEnum(Feature.bf8_cvt_scale_insts)] = .{
377 .llvm_name = "bf8-cvt-scale-insts",
378 .description = "Has bf8 conversion scale instructions",
379 .dependencies = featureSet(&[_]Feature{}),
380 };
381 result[@intFromEnum(Feature.bitop3_insts)] = .{
382 .llvm_name = "bitop3-insts",
383 .description = "Has v_bitop3_b32/v_bitop3_b16 instructions",
384 .dependencies = featureSet(&[_]Feature{}),
385 };
330386 result[@intFromEnum(Feature.ci_insts)] = .{
331387 .llvm_name = "ci-insts",
332388 .description = "Additional instructions for CI+",
......@@ -337,6 +393,18 @@ pub const all_features = blk: {
337393 .description = "Enable CU wavefront execution mode",
338394 .dependencies = featureSet(&[_]Feature{}),
339395 };
396 result[@intFromEnum(Feature.cvt_fp8_vop1_bug)] = .{
397 .llvm_name = "cvt-fp8-vop1-bug",
398 .description = "FP8/BF8 VOP1 form of conversion to F32 is unreliable",
399 .dependencies = featureSet(&[_]Feature{
400 .fp8_conversion_insts,
401 }),
402 };
403 result[@intFromEnum(Feature.cvt_pk_f16_f32_inst)] = .{
404 .llvm_name = "cvt-pk-f16-f32-inst",
405 .description = "Has cvt_pk_f16_f32 instruction",
406 .dependencies = featureSet(&[_]Feature{}),
407 };
340408 result[@intFromEnum(Feature.default_component_broadcast)] = .{
341409 .llvm_name = "default-component-broadcast",
342410 .description = "BUFFER/IMAGE store instructions set unspecified components to x component (GFX12)",
......@@ -362,6 +430,16 @@ pub const all_features = blk: {
362430 .description = "Has v_dot4_f32_fp8_fp8, v_dot4_f32_fp8_bf8, v_dot4_f32_bf8_fp8, v_dot4_f32_bf8_bf8 instructions",
363431 .dependencies = featureSet(&[_]Feature{}),
364432 };
433 result[@intFromEnum(Feature.dot12_insts)] = .{
434 .llvm_name = "dot12-insts",
435 .description = "Has v_dot2_f32_bf16 instructions",
436 .dependencies = featureSet(&[_]Feature{}),
437 };
438 result[@intFromEnum(Feature.dot13_insts)] = .{
439 .llvm_name = "dot13-insts",
440 .description = "Has v_dot2c_f32_bf16 instructions",
441 .dependencies = featureSet(&[_]Feature{}),
442 };
365443 result[@intFromEnum(Feature.dot1_insts)] = .{
366444 .llvm_name = "dot1-insts",
367445 .description = "Has v_dot4_i32_i8 and v_dot8_i32_i4 instructions",
......@@ -404,7 +482,7 @@ pub const all_features = blk: {
404482 };
405483 result[@intFromEnum(Feature.dot9_insts)] = .{
406484 .llvm_name = "dot9-insts",
407 .description = "Has v_dot2_f16_f16, v_dot2_bf16_bf16, v_dot2_f32_bf16 instructions",
485 .description = "Has v_dot2_f16_f16, v_dot2_bf16_bf16 instructions",
408486 .dependencies = featureSet(&[_]Feature{}),
409487 };
410488 result[@intFromEnum(Feature.dpp)] = .{
......@@ -442,6 +520,16 @@ pub const all_features = blk: {
442520 .description = "Support mips != 0, lod != 0, gather4, and get_lod",
443521 .dependencies = featureSet(&[_]Feature{}),
444522 };
523 result[@intFromEnum(Feature.f16bf16_to_fp6bf6_cvt_scale_insts)] = .{
524 .llvm_name = "f16bf16-to-fp6bf6-cvt-scale-insts",
525 .description = "Has f16bf16 to fp6bf6 conversion scale instructions",
526 .dependencies = featureSet(&[_]Feature{}),
527 };
528 result[@intFromEnum(Feature.f32_to_f16bf16_cvt_sr_insts)] = .{
529 .llvm_name = "f32-to-f16bf16-cvt-sr-insts",
530 .description = "Has f32 to f16bf16 conversion scale instructions",
531 .dependencies = featureSet(&[_]Feature{}),
532 };
445533 result[@intFromEnum(Feature.fast_denormal_f32)] = .{
446534 .llvm_name = "fast-denormal-f32",
447535 .description = "Enabling denormals does not cause f32 instructions to run at f64 rates",
......@@ -517,16 +605,31 @@ pub const all_features = blk: {
517605 .description = "Has SC0 and SC1 on stores",
518606 .dependencies = featureSet(&[_]Feature{}),
519607 };
608 result[@intFromEnum(Feature.fp4_cvt_scale_insts)] = .{
609 .llvm_name = "fp4-cvt-scale-insts",
610 .description = "Has fp4 conversion scale instructions",
611 .dependencies = featureSet(&[_]Feature{}),
612 };
520613 result[@intFromEnum(Feature.fp64)] = .{
521614 .llvm_name = "fp64",
522615 .description = "Enable double precision operations",
523616 .dependencies = featureSet(&[_]Feature{}),
524617 };
618 result[@intFromEnum(Feature.fp6bf6_cvt_scale_insts)] = .{
619 .llvm_name = "fp6bf6-cvt-scale-insts",
620 .description = "Has fp6 and bf6 conversion scale instructions",
621 .dependencies = featureSet(&[_]Feature{}),
622 };
525623 result[@intFromEnum(Feature.fp8_conversion_insts)] = .{
526624 .llvm_name = "fp8-conversion-insts",
527625 .description = "Has fp8 and bf8 conversion instructions",
528626 .dependencies = featureSet(&[_]Feature{}),
529627 };
628 result[@intFromEnum(Feature.fp8_cvt_scale_insts)] = .{
629 .llvm_name = "fp8-cvt-scale-insts",
630 .description = "Has fp8 conversion scale instructions",
631 .dependencies = featureSet(&[_]Feature{}),
632 };
530633 result[@intFromEnum(Feature.fp8_insts)] = .{
531634 .llvm_name = "fp8-insts",
532635 .description = "Has fp8 and bf8 instructions",
......@@ -564,6 +667,7 @@ pub const all_features = blk: {
564667 .@"16_bit_insts",
565668 .a16,
566669 .add_no_carry_insts,
670 .addressablelocalmemorysize65536,
567671 .aperture_regs,
568672 .atomic_fmin_fmax_flat_f32,
569673 .atomic_fmin_fmax_flat_f64,
......@@ -591,7 +695,6 @@ pub const all_features = blk: {
591695 .image_insts,
592696 .int_clamp_insts,
593697 .inv_2pi_inline_imm,
594 .localmemorysize65536,
595698 .max_hard_clause_length_63,
596699 .mimg_r128,
597700 .movrel,
......@@ -606,6 +709,7 @@ pub const all_features = blk: {
606709 .sdwa_sdst,
607710 .unaligned_buffer_access,
608711 .unaligned_ds_access,
712 .unaligned_scratch_access,
609713 .vmem_write_vgpr_in_order,
610714 .vop3_literal,
611715 .vop3p,
......@@ -639,6 +743,7 @@ pub const all_features = blk: {
639743 .@"16_bit_insts",
640744 .a16,
641745 .add_no_carry_insts,
746 .addressablelocalmemorysize65536,
642747 .aperture_regs,
643748 .atomic_fmin_fmax_flat_f32,
644749 .atomic_fmin_fmax_global_f32,
......@@ -667,7 +772,6 @@ pub const all_features = blk: {
667772 .gws,
668773 .int_clamp_insts,
669774 .inv_2pi_inline_imm,
670 .localmemorysize65536,
671775 .max_hard_clause_length_32,
672776 .mimg_r128,
673777 .movrel,
......@@ -677,6 +781,7 @@ pub const all_features = blk: {
677781 .true16,
678782 .unaligned_buffer_access,
679783 .unaligned_ds_access,
784 .unaligned_scratch_access,
680785 .vmem_write_vgpr_in_order,
681786 .vop3_literal,
682787 .vop3p,
......@@ -696,6 +801,7 @@ pub const all_features = blk: {
696801 .@"16_bit_insts",
697802 .a16,
698803 .add_no_carry_insts,
804 .addressablelocalmemorysize65536,
699805 .agent_scope_fine_grained_remote_memory_atomics,
700806 .aperture_regs,
701807 .atomic_fmin_fmax_flat_f32,
......@@ -723,9 +829,10 @@ pub const all_features = blk: {
723829 .gfx9_insts,
724830 .int_clamp_insts,
725831 .inv_2pi_inline_imm,
726 .localmemorysize65536,
727832 .max_hard_clause_length_32,
728833 .mimg_r128,
834 .minimum3_maximum3_f16,
835 .minimum3_maximum3_f32,
729836 .movrel,
730837 .no_data_dep_hazard,
731838 .no_sdst_cmpx,
......@@ -733,6 +840,7 @@ pub const all_features = blk: {
733840 .true16,
734841 .unaligned_buffer_access,
735842 .unaligned_ds_access,
843 .unaligned_scratch_access,
736844 .vop3_literal,
737845 .vop3p,
738846 .vopd,
......@@ -779,7 +887,6 @@ pub const all_features = blk: {
779887 .gws,
780888 .int_clamp_insts,
781889 .inv_2pi_inline_imm,
782 .localmemorysize65536,
783890 .negative_scratch_offset_bug,
784891 .r128_a16,
785892 .s_memrealtime,
......@@ -793,6 +900,7 @@ pub const all_features = blk: {
793900 .sdwa_sdst,
794901 .unaligned_buffer_access,
795902 .unaligned_ds_access,
903 .unaligned_scratch_access,
796904 .vgpr_index_mode,
797905 .vmem_write_vgpr_in_order,
798906 .vop3p,
......@@ -810,6 +918,24 @@ pub const all_features = blk: {
810918 .description = "Additional instructions for GFX940+",
811919 .dependencies = featureSet(&[_]Feature{}),
812920 };
921 result[@intFromEnum(Feature.gfx950_insts)] = .{
922 .llvm_name = "gfx950-insts",
923 .description = "Additional instructions for GFX950+",
924 .dependencies = featureSet(&[_]Feature{
925 .ashr_pk_insts,
926 .bf8_cvt_scale_insts,
927 .cvt_pk_f16_f32_inst,
928 .f16bf16_to_fp6bf6_cvt_scale_insts,
929 .f32_to_f16bf16_cvt_sr_insts,
930 .fp4_cvt_scale_insts,
931 .fp6bf6_cvt_scale_insts,
932 .fp8_cvt_scale_insts,
933 .minimum3_maximum3_f32,
934 .minimum3_maximum3_pkf16,
935 .permlane16_swap,
936 .permlane32_swap,
937 }),
938 };
813939 result[@intFromEnum(Feature.gfx9_insts)] = .{
814940 .llvm_name = "gfx9-insts",
815941 .description = "Additional instructions for GFX9+",
......@@ -885,16 +1011,6 @@ pub const all_features = blk: {
8851011 .description = "Enable SI load/store optimizer pass",
8861012 .dependencies = featureSet(&[_]Feature{}),
8871013 };
888 result[@intFromEnum(Feature.localmemorysize32768)] = .{
889 .llvm_name = "localmemorysize32768",
890 .description = "The size of local memory in bytes",
891 .dependencies = featureSet(&[_]Feature{}),
892 };
893 result[@intFromEnum(Feature.localmemorysize65536)] = .{
894 .llvm_name = "localmemorysize65536",
895 .description = "The size of local memory in bytes",
896 .dependencies = featureSet(&[_]Feature{}),
897 };
8981014 result[@intFromEnum(Feature.mad_intra_fwd_bug)] = .{
8991015 .llvm_name = "mad-intra-fwd-bug",
9001016 .description = "MAD_U64/I64 intra instruction forwarding bug",
......@@ -955,6 +1071,21 @@ pub const all_features = blk: {
9551071 .description = "Support 128-bit texture resources",
9561072 .dependencies = featureSet(&[_]Feature{}),
9571073 };
1074 result[@intFromEnum(Feature.minimum3_maximum3_f16)] = .{
1075 .llvm_name = "minimum3-maximum3-f16",
1076 .description = "Has v_minimum3_f16 and v_maximum3_f16 instructions",
1077 .dependencies = featureSet(&[_]Feature{}),
1078 };
1079 result[@intFromEnum(Feature.minimum3_maximum3_f32)] = .{
1080 .llvm_name = "minimum3-maximum3-f32",
1081 .description = "Has v_minimum3_f32 and v_maximum3_f32 instructions",
1082 .dependencies = featureSet(&[_]Feature{}),
1083 };
1084 result[@intFromEnum(Feature.minimum3_maximum3_pkf16)] = .{
1085 .llvm_name = "minimum3-maximum3-pkf16",
1086 .description = "Has v_pk_minimum3_f16 and v_pk_maximum3_f16 instructions",
1087 .dependencies = featureSet(&[_]Feature{}),
1088 };
9581089 result[@intFromEnum(Feature.movrel)] = .{
9591090 .llvm_name = "movrel",
9601091 .description = "Has v_movrel*_b32 instructions",
......@@ -1020,6 +1151,16 @@ pub const all_features = blk: {
10201151 .description = "Support partial NSA encoding for image instructions",
10211152 .dependencies = featureSet(&[_]Feature{}),
10221153 };
1154 result[@intFromEnum(Feature.permlane16_swap)] = .{
1155 .llvm_name = "permlane16-swap",
1156 .description = "Has v_permlane16_swap_b32 instructions",
1157 .dependencies = featureSet(&[_]Feature{}),
1158 };
1159 result[@intFromEnum(Feature.permlane32_swap)] = .{
1160 .llvm_name = "permlane32-swap",
1161 .description = "Has v_permlane32_swap_b32 instructions",
1162 .dependencies = featureSet(&[_]Feature{}),
1163 };
10231164 result[@intFromEnum(Feature.pk_fmac_f16_inst)] = .{
10241165 .llvm_name = "pk-fmac-f16-inst",
10251166 .description = "Has v_pk_fmac_f16 instruction",
......@@ -1035,6 +1176,11 @@ pub const all_features = blk: {
10351176 .description = "Hardware that runs with PRIV=1 interpreting 's_trap 2' as a nop bug",
10361177 .dependencies = featureSet(&[_]Feature{}),
10371178 };
1179 result[@intFromEnum(Feature.prng_inst)] = .{
1180 .llvm_name = "prng-inst",
1181 .description = "Has v_prng_b32 instruction",
1182 .dependencies = featureSet(&[_]Feature{}),
1183 };
10381184 result[@intFromEnum(Feature.promote_alloca)] = .{
10391185 .llvm_name = "promote-alloca",
10401186 .description = "Enable promote alloca pass",
......@@ -1144,6 +1290,7 @@ pub const all_features = blk: {
11441290 .llvm_name = "sea-islands",
11451291 .description = "SEA_ISLANDS GPU generation",
11461292 .dependencies = featureSet(&[_]Feature{
1293 .addressablelocalmemorysize65536,
11471294 .atomic_fmin_fmax_flat_f32,
11481295 .atomic_fmin_fmax_flat_f64,
11491296 .atomic_fmin_fmax_global_f32,
......@@ -1158,7 +1305,6 @@ pub const all_features = blk: {
11581305 .gfx7_gfx8_gfx9_insts,
11591306 .gws,
11601307 .image_insts,
1161 .localmemorysize65536,
11621308 .mad_mac_f32_insts,
11631309 .mimg_r128,
11641310 .movrel,
......@@ -1198,6 +1344,7 @@ pub const all_features = blk: {
11981344 .llvm_name = "southern-islands",
11991345 .description = "SOUTHERN_ISLANDS GPU generation",
12001346 .dependencies = featureSet(&[_]Feature{
1347 .addressablelocalmemorysize32768,
12011348 .atomic_fmin_fmax_global_f32,
12021349 .atomic_fmin_fmax_global_f64,
12031350 .default_component_zero,
......@@ -1208,7 +1355,6 @@ pub const all_features = blk: {
12081355 .gws,
12091356 .image_insts,
12101357 .ldsbankcount32,
1211 .localmemorysize32768,
12121358 .mad_mac_f32_insts,
12131359 .mimg_r128,
12141360 .movrel,
......@@ -1303,11 +1449,6 @@ pub const all_features = blk: {
13031449 .description = "Has VGPR mode register indexing",
13041450 .dependencies = featureSet(&[_]Feature{}),
13051451 };
1306 result[@intFromEnum(Feature.vgpr_singleuse_hint)] = .{
1307 .llvm_name = "vgpr-singleuse-hint",
1308 .description = "Has single-use VGPR hint instructions",
1309 .dependencies = featureSet(&[_]Feature{}),
1310 };
13111452 result[@intFromEnum(Feature.vmem_to_scalar_write_hazard)] = .{
13121453 .llvm_name = "vmem-to-scalar-write-hazard",
13131454 .description = "VMEM instruction followed by scalar writing to EXEC mask, M0 or SGPR leads to incorrect execution.",
......@@ -1323,6 +1464,7 @@ pub const all_features = blk: {
13231464 .description = "VOLCANIC_ISLANDS GPU generation",
13241465 .dependencies = featureSet(&[_]Feature{
13251466 .@"16_bit_insts",
1467 .addressablelocalmemorysize65536,
13261468 .ci_insts,
13271469 .default_component_zero,
13281470 .dpp,
......@@ -1339,7 +1481,6 @@ pub const all_features = blk: {
13391481 .image_insts,
13401482 .int_clamp_insts,
13411483 .inv_2pi_inline_imm,
1342 .localmemorysize65536,
13431484 .mad_mac_f32_insts,
13441485 .mimg_r128,
13451486 .movrel,
......@@ -1391,6 +1532,11 @@ pub const all_features = blk: {
13911532 .description = "The number of threads per wavefront",
13921533 .dependencies = featureSet(&[_]Feature{}),
13931534 };
1535 result[@intFromEnum(Feature.xf32_insts)] = .{
1536 .llvm_name = "xf32-insts",
1537 .description = "Has instructions that support xf32 format, such as v_mfma_f32_16x16x8_xf32 and v_mfma_f32_32x32x4_xf32",
1538 .dependencies = featureSet(&[_]Feature{}),
1539 };
13941540 result[@intFromEnum(Feature.xnack)] = .{
13951541 .llvm_name = "xnack",
13961542 .description = "Enable XNACK support",
......@@ -1445,7 +1591,6 @@ pub const cpu = struct {
14451591 .features = featureSet(&[_]Feature{
14461592 .gds,
14471593 .gws,
1448 .wavefrontsize64,
14491594 }),
14501595 };
14511596 pub const generic_hsa: CpuModel = .{
......@@ -1455,7 +1600,6 @@ pub const cpu = struct {
14551600 .flat_address_space,
14561601 .gds,
14571602 .gws,
1458 .wavefrontsize64,
14591603 }),
14601604 };
14611605 pub const gfx1010: CpuModel = .{
......@@ -1801,6 +1945,7 @@ pub const cpu = struct {
18011945 .atomic_fadd_rtn_insts,
18021946 .dl_insts,
18031947 .dot10_insts,
1948 .dot12_insts,
18041949 .dot5_insts,
18051950 .dot7_insts,
18061951 .dot8_insts,
......@@ -1832,6 +1977,7 @@ pub const cpu = struct {
18321977 .atomic_fadd_rtn_insts,
18331978 .dl_insts,
18341979 .dot10_insts,
1980 .dot12_insts,
18351981 .dot5_insts,
18361982 .dot7_insts,
18371983 .dot8_insts,
......@@ -1861,6 +2007,7 @@ pub const cpu = struct {
18612007 .atomic_fadd_rtn_insts,
18622008 .dl_insts,
18632009 .dot10_insts,
2010 .dot12_insts,
18642011 .dot5_insts,
18652012 .dot7_insts,
18662013 .dot8_insts,
......@@ -1891,6 +2038,7 @@ pub const cpu = struct {
18912038 .atomic_fadd_rtn_insts,
18922039 .dl_insts,
18932040 .dot10_insts,
2041 .dot12_insts,
18942042 .dot5_insts,
18952043 .dot7_insts,
18962044 .dot8_insts,
......@@ -1920,6 +2068,7 @@ pub const cpu = struct {
19202068 .atomic_fadd_rtn_insts,
19212069 .dl_insts,
19222070 .dot10_insts,
2071 .dot12_insts,
19232072 .dot5_insts,
19242073 .dot7_insts,
19252074 .dot8_insts,
......@@ -1937,7 +2086,6 @@ pub const cpu = struct {
19372086 .salu_float,
19382087 .shader_cycles_register,
19392088 .vcmpx_permlane_hazard,
1940 .vgpr_singleuse_hint,
19412089 }),
19422090 };
19432091 pub const gfx1151: CpuModel = .{
......@@ -1950,6 +2098,7 @@ pub const cpu = struct {
19502098 .atomic_fadd_rtn_insts,
19512099 .dl_insts,
19522100 .dot10_insts,
2101 .dot12_insts,
19532102 .dot5_insts,
19542103 .dot7_insts,
19552104 .dot8_insts,
......@@ -1967,7 +2116,6 @@ pub const cpu = struct {
19672116 .salu_float,
19682117 .shader_cycles_register,
19692118 .vcmpx_permlane_hazard,
1970 .vgpr_singleuse_hint,
19712119 }),
19722120 };
19732121 pub const gfx1152: CpuModel = .{
......@@ -1979,6 +2127,36 @@ pub const cpu = struct {
19792127 .atomic_fadd_rtn_insts,
19802128 .dl_insts,
19812129 .dot10_insts,
2130 .dot12_insts,
2131 .dot5_insts,
2132 .dot7_insts,
2133 .dot8_insts,
2134 .dot9_insts,
2135 .dpp_src1_sgpr,
2136 .flat_atomic_fadd_f32_inst,
2137 .gfx11,
2138 .image_insts,
2139 .ldsbankcount32,
2140 .memory_atomic_fadd_f32_denormal_support,
2141 .nsa_encoding,
2142 .packed_tid,
2143 .partial_nsa_encoding,
2144 .required_export_priority,
2145 .salu_float,
2146 .shader_cycles_register,
2147 .vcmpx_permlane_hazard,
2148 }),
2149 };
2150 pub const gfx1153: CpuModel = .{
2151 .name = "gfx1153",
2152 .llvm_name = "gfx1153",
2153 .features = featureSet(&[_]Feature{
2154 .architected_flat_scratch,
2155 .atomic_fadd_no_rtn_insts,
2156 .atomic_fadd_rtn_insts,
2157 .dl_insts,
2158 .dot10_insts,
2159 .dot12_insts,
19822160 .dot5_insts,
19832161 .dot7_insts,
19842162 .dot8_insts,
......@@ -1996,7 +2174,6 @@ pub const cpu = struct {
19962174 .salu_float,
19972175 .shader_cycles_register,
19982176 .vcmpx_permlane_hazard,
1999 .vgpr_singleuse_hint,
20002177 }),
20012178 };
20022179 pub const gfx11_generic: CpuModel = .{
......@@ -2008,6 +2185,7 @@ pub const cpu = struct {
20082185 .atomic_fadd_rtn_insts,
20092186 .dl_insts,
20102187 .dot10_insts,
2188 .dot12_insts,
20112189 .dot5_insts,
20122190 .dot7_insts,
20132191 .dot8_insts,
......@@ -2048,6 +2226,7 @@ pub const cpu = struct {
20482226 .dl_insts,
20492227 .dot10_insts,
20502228 .dot11_insts,
2229 .dot12_insts,
20512230 .dot7_insts,
20522231 .dot8_insts,
20532232 .dot9_insts,
......@@ -2068,7 +2247,6 @@ pub const cpu = struct {
20682247 .scalar_dwordx3_loads,
20692248 .shader_cycles_hi_lo_registers,
20702249 .vcmpx_permlane_hazard,
2071 .vgpr_singleuse_hint,
20722250 }),
20732251 };
20742252 pub const gfx1201: CpuModel = .{
......@@ -2088,6 +2266,7 @@ pub const cpu = struct {
20882266 .dl_insts,
20892267 .dot10_insts,
20902268 .dot11_insts,
2269 .dot12_insts,
20912270 .dot7_insts,
20922271 .dot8_insts,
20932272 .dot9_insts,
......@@ -2108,7 +2287,6 @@ pub const cpu = struct {
21082287 .scalar_dwordx3_loads,
21092288 .shader_cycles_hi_lo_registers,
21102289 .vcmpx_permlane_hazard,
2111 .vgpr_singleuse_hint,
21122290 }),
21132291 };
21142292 pub const gfx12_generic: CpuModel = .{
......@@ -2128,6 +2306,7 @@ pub const cpu = struct {
21282306 .dl_insts,
21292307 .dot10_insts,
21302308 .dot11_insts,
2309 .dot12_insts,
21312310 .dot7_insts,
21322311 .dot8_insts,
21332312 .dot9_insts,
......@@ -2149,7 +2328,6 @@ pub const cpu = struct {
21492328 .scalar_dwordx3_loads,
21502329 .shader_cycles_hi_lo_registers,
21512330 .vcmpx_permlane_hazard,
2152 .vgpr_singleuse_hint,
21532331 }),
21542332 };
21552333 pub const gfx600: CpuModel = .{
......@@ -2282,6 +2460,7 @@ pub const cpu = struct {
22822460 .name = "gfx900",
22832461 .llvm_name = "gfx900",
22842462 .features = featureSet(&[_]Feature{
2463 .addressablelocalmemorysize65536,
22852464 .ds_src2_insts,
22862465 .extended_image_insts,
22872466 .gds,
......@@ -2297,6 +2476,7 @@ pub const cpu = struct {
22972476 .name = "gfx902",
22982477 .llvm_name = "gfx902",
22992478 .features = featureSet(&[_]Feature{
2479 .addressablelocalmemorysize65536,
23002480 .ds_src2_insts,
23012481 .extended_image_insts,
23022482 .gds,
......@@ -2312,6 +2492,7 @@ pub const cpu = struct {
23122492 .name = "gfx904",
23132493 .llvm_name = "gfx904",
23142494 .features = featureSet(&[_]Feature{
2495 .addressablelocalmemorysize65536,
23152496 .ds_src2_insts,
23162497 .extended_image_insts,
23172498 .fma_mix_insts,
......@@ -2327,6 +2508,7 @@ pub const cpu = struct {
23272508 .name = "gfx906",
23282509 .llvm_name = "gfx906",
23292510 .features = featureSet(&[_]Feature{
2511 .addressablelocalmemorysize65536,
23302512 .dl_insts,
23312513 .dot10_insts,
23322514 .dot1_insts,
......@@ -2349,6 +2531,7 @@ pub const cpu = struct {
23492531 .name = "gfx908",
23502532 .llvm_name = "gfx908",
23512533 .features = featureSet(&[_]Feature{
2534 .addressablelocalmemorysize65536,
23522535 .atomic_buffer_global_pk_add_f16_no_rtn_insts,
23532536 .atomic_fadd_no_rtn_insts,
23542537 .dl_insts,
......@@ -2380,6 +2563,7 @@ pub const cpu = struct {
23802563 .name = "gfx909",
23812564 .llvm_name = "gfx909",
23822565 .features = featureSet(&[_]Feature{
2566 .addressablelocalmemorysize65536,
23832567 .ds_src2_insts,
23842568 .extended_image_insts,
23852569 .gds,
......@@ -2395,6 +2579,7 @@ pub const cpu = struct {
23952579 .name = "gfx90a",
23962580 .llvm_name = "gfx90a",
23972581 .features = featureSet(&[_]Feature{
2582 .addressablelocalmemorysize65536,
23982583 .atomic_buffer_global_pk_add_f16_insts,
23992584 .atomic_fadd_no_rtn_insts,
24002585 .atomic_fadd_rtn_insts,
......@@ -2432,6 +2617,7 @@ pub const cpu = struct {
24322617 .name = "gfx90c",
24332618 .llvm_name = "gfx90c",
24342619 .features = featureSet(&[_]Feature{
2620 .addressablelocalmemorysize65536,
24352621 .ds_src2_insts,
24362622 .extended_image_insts,
24372623 .gds,
......@@ -2447,6 +2633,7 @@ pub const cpu = struct {
24472633 .name = "gfx940",
24482634 .llvm_name = "gfx940",
24492635 .features = featureSet(&[_]Feature{
2636 .addressablelocalmemorysize65536,
24502637 .agent_scope_fine_grained_remote_memory_atomics,
24512638 .architected_flat_scratch,
24522639 .atomic_buffer_global_pk_add_f16_insts,
......@@ -2458,6 +2645,7 @@ pub const cpu = struct {
24582645 .atomic_fmin_fmax_global_f64,
24592646 .atomic_global_pk_add_bf16_inst,
24602647 .back_off_barrier,
2648 .cvt_fp8_vop1_bug,
24612649 .dl_insts,
24622650 .dot10_insts,
24632651 .dot1_insts,
......@@ -2473,7 +2661,6 @@ pub const cpu = struct {
24732661 .fma_mix_insts,
24742662 .fmacf64_inst,
24752663 .force_store_sc0_sc1,
2476 .fp8_conversion_insts,
24772664 .fp8_insts,
24782665 .full_rate_64_ops,
24792666 .gfx9,
......@@ -2487,12 +2674,14 @@ pub const cpu = struct {
24872674 .packed_tid,
24882675 .pk_fmac_f16_inst,
24892676 .sramecc_support,
2677 .xf32_insts,
24902678 }),
24912679 };
24922680 pub const gfx941: CpuModel = .{
24932681 .name = "gfx941",
24942682 .llvm_name = "gfx941",
24952683 .features = featureSet(&[_]Feature{
2684 .addressablelocalmemorysize65536,
24962685 .agent_scope_fine_grained_remote_memory_atomics,
24972686 .architected_flat_scratch,
24982687 .atomic_buffer_global_pk_add_f16_insts,
......@@ -2504,6 +2693,7 @@ pub const cpu = struct {
25042693 .atomic_fmin_fmax_global_f64,
25052694 .atomic_global_pk_add_bf16_inst,
25062695 .back_off_barrier,
2696 .cvt_fp8_vop1_bug,
25072697 .dl_insts,
25082698 .dot10_insts,
25092699 .dot1_insts,
......@@ -2519,7 +2709,6 @@ pub const cpu = struct {
25192709 .fma_mix_insts,
25202710 .fmacf64_inst,
25212711 .force_store_sc0_sc1,
2522 .fp8_conversion_insts,
25232712 .fp8_insts,
25242713 .full_rate_64_ops,
25252714 .gfx9,
......@@ -2533,12 +2722,14 @@ pub const cpu = struct {
25332722 .packed_tid,
25342723 .pk_fmac_f16_inst,
25352724 .sramecc_support,
2725 .xf32_insts,
25362726 }),
25372727 };
25382728 pub const gfx942: CpuModel = .{
25392729 .name = "gfx942",
25402730 .llvm_name = "gfx942",
25412731 .features = featureSet(&[_]Feature{
2732 .addressablelocalmemorysize65536,
25422733 .agent_scope_fine_grained_remote_memory_atomics,
25432734 .architected_flat_scratch,
25442735 .atomic_buffer_global_pk_add_f16_insts,
......@@ -2550,6 +2741,7 @@ pub const cpu = struct {
25502741 .atomic_fmin_fmax_global_f64,
25512742 .atomic_global_pk_add_bf16_inst,
25522743 .back_off_barrier,
2744 .cvt_fp8_vop1_bug,
25532745 .dl_insts,
25542746 .dot10_insts,
25552747 .dot1_insts,
......@@ -2564,12 +2756,64 @@ pub const cpu = struct {
25642756 .flat_buffer_global_fadd_f64_inst,
25652757 .fma_mix_insts,
25662758 .fmacf64_inst,
2759 .fp8_insts,
2760 .full_rate_64_ops,
2761 .gfx9,
2762 .gfx90a_insts,
2763 .gfx940_insts,
2764 .kernarg_preload,
2765 .ldsbankcount32,
2766 .mai_insts,
2767 .memory_atomic_fadd_f32_denormal_support,
2768 .packed_fp32_ops,
2769 .packed_tid,
2770 .pk_fmac_f16_inst,
2771 .sramecc_support,
2772 .xf32_insts,
2773 }),
2774 };
2775 pub const gfx950: CpuModel = .{
2776 .name = "gfx950",
2777 .llvm_name = "gfx950",
2778 .features = featureSet(&[_]Feature{
2779 .addressablelocalmemorysize163840,
2780 .agent_scope_fine_grained_remote_memory_atomics,
2781 .architected_flat_scratch,
2782 .atomic_buffer_global_pk_add_f16_insts,
2783 .atomic_buffer_pk_add_bf16_inst,
2784 .atomic_ds_pk_add_16_insts,
2785 .atomic_fadd_no_rtn_insts,
2786 .atomic_fadd_rtn_insts,
2787 .atomic_flat_pk_add_16_insts,
2788 .atomic_fmin_fmax_flat_f64,
2789 .atomic_fmin_fmax_global_f64,
2790 .atomic_global_pk_add_bf16_inst,
2791 .back_off_barrier,
2792 .bf16_cvt_insts,
2793 .bitop3_insts,
2794 .dl_insts,
2795 .dot10_insts,
2796 .dot12_insts,
2797 .dot13_insts,
2798 .dot1_insts,
2799 .dot2_insts,
2800 .dot3_insts,
2801 .dot4_insts,
2802 .dot5_insts,
2803 .dot6_insts,
2804 .dot7_insts,
2805 .dpp_64bit,
2806 .flat_atomic_fadd_f32_inst,
2807 .flat_buffer_global_fadd_f64_inst,
2808 .fma_mix_insts,
2809 .fmacf64_inst,
25672810 .fp8_conversion_insts,
25682811 .fp8_insts,
25692812 .full_rate_64_ops,
25702813 .gfx9,
25712814 .gfx90a_insts,
25722815 .gfx940_insts,
2816 .gfx950_insts,
25732817 .kernarg_preload,
25742818 .ldsbankcount32,
25752819 .mai_insts,
......@@ -2577,6 +2821,52 @@ pub const cpu = struct {
25772821 .packed_fp32_ops,
25782822 .packed_tid,
25792823 .pk_fmac_f16_inst,
2824 .prng_inst,
2825 .sramecc_support,
2826 }),
2827 };
2828 pub const gfx9_4_generic: CpuModel = .{
2829 .name = "gfx9_4_generic",
2830 .llvm_name = "gfx9-4-generic",
2831 .features = featureSet(&[_]Feature{
2832 .addressablelocalmemorysize65536,
2833 .agent_scope_fine_grained_remote_memory_atomics,
2834 .architected_flat_scratch,
2835 .atomic_buffer_global_pk_add_f16_insts,
2836 .atomic_ds_pk_add_16_insts,
2837 .atomic_fadd_no_rtn_insts,
2838 .atomic_fadd_rtn_insts,
2839 .atomic_flat_pk_add_16_insts,
2840 .atomic_fmin_fmax_flat_f64,
2841 .atomic_fmin_fmax_global_f64,
2842 .atomic_global_pk_add_bf16_inst,
2843 .back_off_barrier,
2844 .dl_insts,
2845 .dot10_insts,
2846 .dot1_insts,
2847 .dot2_insts,
2848 .dot3_insts,
2849 .dot4_insts,
2850 .dot5_insts,
2851 .dot6_insts,
2852 .dot7_insts,
2853 .dpp_64bit,
2854 .flat_atomic_fadd_f32_inst,
2855 .flat_buffer_global_fadd_f64_inst,
2856 .fma_mix_insts,
2857 .fmacf64_inst,
2858 .full_rate_64_ops,
2859 .gfx9,
2860 .gfx90a_insts,
2861 .gfx940_insts,
2862 .kernarg_preload,
2863 .ldsbankcount32,
2864 .mai_insts,
2865 .memory_atomic_fadd_f32_denormal_support,
2866 .packed_fp32_ops,
2867 .packed_tid,
2868 .pk_fmac_f16_inst,
2869 .requires_cov6,
25802870 .sramecc_support,
25812871 }),
25822872 };
......@@ -2584,6 +2874,7 @@ pub const cpu = struct {
25842874 .name = "gfx9_generic",
25852875 .llvm_name = "gfx9-generic",
25862876 .features = featureSet(&[_]Feature{
2877 .addressablelocalmemorysize65536,
25872878 .ds_src2_insts,
25882879 .extended_image_insts,
25892880 .gds,
lib/std/Target/arm.zig+86-1
......@@ -13,9 +13,11 @@ pub const Feature = enum {
1313 aes,
1414 atomics_32,
1515 avoid_movs_shop,
16 avoid_muls,
1617 avoid_partial_cpsr,
1718 bf16,
1819 big_endian_instructions,
20 branch_align_64,
1921 cde,
2022 cdecp0,
2123 cdecp1,
......@@ -27,6 +29,7 @@ pub const Feature = enum {
2729 cdecp7,
2830 cheap_predicable_cpsr,
2931 clrbhb,
32 cortex_a510,
3033 crc,
3134 crypto,
3235 d32,
......@@ -84,6 +87,7 @@ pub const Feature = enum {
8487 has_v9_3a,
8588 has_v9_4a,
8689 has_v9_5a,
90 has_v9_6a,
8791 has_v9a,
8892 hwdiv,
8993 hwdiv_arm,
......@@ -93,6 +97,8 @@ pub const Feature = enum {
9397 lob,
9498 long_calls,
9599 loop_align,
100 m55,
101 m85,
96102 mclass,
97103 mp,
98104 muxed_units,
......@@ -180,6 +186,7 @@ pub const Feature = enum {
180186 v9_3a,
181187 v9_4a,
182188 v9_5a,
189 v9_6a,
183190 v9a,
184191 vfp2,
185192 vfp2sp,
......@@ -252,6 +259,11 @@ pub const all_features = blk: {
252259 .description = "Avoid movs instructions with shifter operand",
253260 .dependencies = featureSet(&[_]Feature{}),
254261 };
262 result[@intFromEnum(Feature.avoid_muls)] = .{
263 .llvm_name = "avoid-muls",
264 .description = "Avoid MULS instructions for M class cores",
265 .dependencies = featureSet(&[_]Feature{}),
266 };
255267 result[@intFromEnum(Feature.avoid_partial_cpsr)] = .{
256268 .llvm_name = "avoid-partial-cpsr",
257269 .description = "Avoid CPSR partial update for OOO execution",
......@@ -269,6 +281,11 @@ pub const all_features = blk: {
269281 .description = "Expect instructions to be stored big-endian.",
270282 .dependencies = featureSet(&[_]Feature{}),
271283 };
284 result[@intFromEnum(Feature.branch_align_64)] = .{
285 .llvm_name = "branch-align-64",
286 .description = "Prefer 64-bit alignment for branch targets",
287 .dependencies = featureSet(&[_]Feature{}),
288 };
272289 result[@intFromEnum(Feature.cde)] = .{
273290 .llvm_name = "cde",
274291 .description = "Support CDE instructions",
......@@ -342,6 +359,11 @@ pub const all_features = blk: {
342359 .description = "Enable Clear BHB instruction",
343360 .dependencies = featureSet(&[_]Feature{}),
344361 };
362 result[@intFromEnum(Feature.cortex_a510)] = .{
363 .llvm_name = "cortex-a510",
364 .description = "Cortex-A510 ARM processors",
365 .dependencies = featureSet(&[_]Feature{}),
366 };
345367 result[@intFromEnum(Feature.crc)] = .{
346368 .llvm_name = "crc",
347369 .description = "Enable support for CRC instructions",
......@@ -719,6 +741,13 @@ pub const all_features = blk: {
719741 .has_v9_4a,
720742 }),
721743 };
744 result[@intFromEnum(Feature.has_v9_6a)] = .{
745 .llvm_name = "v9.6a",
746 .description = "Support ARM v9.6a instructions",
747 .dependencies = featureSet(&[_]Feature{
748 .has_v9_5a,
749 }),
750 };
722751 result[@intFromEnum(Feature.has_v9a)] = .{
723752 .llvm_name = "v9a",
724753 .description = "Support ARM v9a instructions",
......@@ -769,7 +798,17 @@ pub const all_features = blk: {
769798 };
770799 result[@intFromEnum(Feature.loop_align)] = .{
771800 .llvm_name = "loop-align",
772 .description = "Prefer 32-bit alignment for loops",
801 .description = "Prefer 32-bit alignment for branch targets",
802 .dependencies = featureSet(&[_]Feature{}),
803 };
804 result[@intFromEnum(Feature.m55)] = .{
805 .llvm_name = "m55",
806 .description = "Cortex-M55 ARM processors",
807 .dependencies = featureSet(&[_]Feature{}),
808 };
809 result[@intFromEnum(Feature.m85)] = .{
810 .llvm_name = "m85",
811 .description = "Cortex-M85 ARM processors",
773812 .dependencies = featureSet(&[_]Feature{}),
774813 };
775814 result[@intFromEnum(Feature.mclass)] = .{
......@@ -1524,6 +1563,22 @@ pub const all_features = blk: {
15241563 .virtualization,
15251564 }),
15261565 };
1566 result[@intFromEnum(Feature.v9_6a)] = .{
1567 .llvm_name = "armv9.6-a",
1568 .description = "ARMv96a architecture",
1569 .dependencies = featureSet(&[_]Feature{
1570 .aclass,
1571 .crc,
1572 .db,
1573 .dsp,
1574 .fp_armv8,
1575 .has_v9_6a,
1576 .mp,
1577 .ras,
1578 .trustzone,
1579 .virtualization,
1580 }),
1581 };
15271582 result[@intFromEnum(Feature.v9a)] = .{
15281583 .llvm_name = "armv9-a",
15291584 .description = "ARMv9a architecture",
......@@ -1950,6 +2005,16 @@ pub const cpu = struct {
19502005 .vmlx_forwarding,
19512006 }),
19522007 };
2008 pub const cortex_a510: CpuModel = .{
2009 .name = "cortex_a510",
2010 .llvm_name = "cortex-a510",
2011 .features = featureSet(&[_]Feature{
2012 .bf16,
2013 .fp16fml,
2014 .i8mm,
2015 .v9a,
2016 }),
2017 };
19532018 pub const cortex_a53: CpuModel = .{
19542019 .name = "cortex_a53",
19552020 .llvm_name = "cortex-a53",
......@@ -2162,6 +2227,7 @@ pub const cpu = struct {
21622227 .name = "cortex_m33",
21632228 .llvm_name = "cortex-m33",
21642229 .features = featureSet(&[_]Feature{
2230 .avoid_muls,
21652231 .fix_cmse_cve_2021_35465,
21662232 .loop_align,
21672233 .no_branch_predictor,
......@@ -2218,6 +2284,7 @@ pub const cpu = struct {
22182284 .dsp,
22192285 .fix_cmse_cve_2021_35465,
22202286 .loop_align,
2287 .m55,
22212288 .no_branch_predictor,
22222289 .slowfpvmlx,
22232290 .use_misched,
......@@ -2228,6 +2295,7 @@ pub const cpu = struct {
22282295 .name = "cortex_m7",
22292296 .llvm_name = "cortex-m7",
22302297 .features = featureSet(&[_]Feature{
2298 .branch_align_64,
22312299 .use_mipipeliner,
22322300 .use_misched,
22332301 .v7em,
......@@ -2237,7 +2305,9 @@ pub const cpu = struct {
22372305 .name = "cortex_m85",
22382306 .llvm_name = "cortex-m85",
22392307 .features = featureSet(&[_]Feature{
2308 .branch_align_64,
22402309 .dsp,
2310 .m85,
22412311 .use_misched,
22422312 .v8_1m_main,
22432313 }),
......@@ -2572,6 +2642,21 @@ pub const cpu = struct {
25722642 .v7m,
25732643 }),
25742644 };
2645 pub const star_mc1: CpuModel = .{
2646 .name = "star_mc1",
2647 .llvm_name = "star-mc1",
2648 .features = featureSet(&[_]Feature{
2649 .dsp,
2650 .fix_cmse_cve_2021_35465,
2651 .fp_armv8d16sp,
2652 .loop_align,
2653 .no_branch_predictor,
2654 .slowfpvfmx,
2655 .slowfpvmlx,
2656 .use_misched,
2657 .v8m_main,
2658 }),
2659 };
25752660 pub const strongarm: CpuModel = .{
25762661 .name = "strongarm",
25772662 .llvm_name = "strongarm",
lib/std/Target/avr.zig+25
......@@ -38,6 +38,7 @@ pub const Feature = enum {
3838 spmx,
3939 sram,
4040 tinyencoding,
41 wrappingrjmp,
4142 xmega,
4243 xmega3,
4344 xmegau,
......@@ -289,6 +290,11 @@ pub const all_features = blk: {
289290 .description = "The device has Tiny core specific instruction encodings",
290291 .dependencies = featureSet(&[_]Feature{}),
291292 };
293 result[@intFromEnum(Feature.wrappingrjmp)] = .{
294 .llvm_name = "wrappingrjmp",
295 .description = "The device potentially requires emitting rjmp that wraps across the flash boundary",
296 .dependencies = featureSet(&[_]Feature{}),
297 };
292298 result[@intFromEnum(Feature.xmega)] = .{
293299 .llvm_name = "xmega",
294300 .description = "The device is a part of the xmega family",
......@@ -381,6 +387,7 @@ pub const cpu = struct {
381387 .llvm_name = "at90c8534",
382388 .features = featureSet(&[_]Feature{
383389 .avr2,
390 .wrappingrjmp,
384391 }),
385392 };
386393 pub const at90can128: CpuModel = .{
......@@ -536,6 +543,7 @@ pub const cpu = struct {
536543 .llvm_name = "at90s8515",
537544 .features = featureSet(&[_]Feature{
538545 .avr2,
546 .wrappingrjmp,
539547 }),
540548 };
541549 pub const at90s8535: CpuModel = .{
......@@ -543,6 +551,7 @@ pub const cpu = struct {
543551 .llvm_name = "at90s8535",
544552 .features = featureSet(&[_]Feature{
545553 .avr2,
554 .wrappingrjmp,
546555 }),
547556 };
548557 pub const at90scr100: CpuModel = .{
......@@ -609,6 +618,7 @@ pub const cpu = struct {
609618 .llvm_name = "ata5272",
610619 .features = featureSet(&[_]Feature{
611620 .avr25,
621 .wrappingrjmp,
612622 }),
613623 };
614624 pub const ata5505: CpuModel = .{
......@@ -672,6 +682,7 @@ pub const cpu = struct {
672682 .llvm_name = "ata6285",
673683 .features = featureSet(&[_]Feature{
674684 .avr4,
685 .wrappingrjmp,
675686 }),
676687 };
677688 pub const ata6286: CpuModel = .{
......@@ -714,6 +725,7 @@ pub const cpu = struct {
714725 .llvm_name = "ata6616c",
715726 .features = featureSet(&[_]Feature{
716727 .avr25,
728 .wrappingrjmp,
717729 }),
718730 };
719731 pub const ata6617c: CpuModel = .{
......@@ -1545,6 +1557,7 @@ pub const cpu = struct {
15451557 .movw,
15461558 .mul,
15471559 .spm,
1560 .wrappingrjmp,
15481561 }),
15491562 };
15501563 pub const atmega808: CpuModel = .{
......@@ -1570,6 +1583,7 @@ pub const cpu = struct {
15701583 .movw,
15711584 .mul,
15721585 .spm,
1586 .wrappingrjmp,
15731587 }),
15741588 };
15751589 pub const atmega8535: CpuModel = .{
......@@ -1581,6 +1595,7 @@ pub const cpu = struct {
15811595 .movw,
15821596 .mul,
15831597 .spm,
1598 .wrappingrjmp,
15841599 }),
15851600 };
15861601 pub const atmega88: CpuModel = .{
......@@ -1627,6 +1642,7 @@ pub const cpu = struct {
16271642 .movw,
16281643 .mul,
16291644 .spm,
1645 .wrappingrjmp,
16301646 }),
16311647 };
16321648 pub const atmega8hva: CpuModel = .{
......@@ -2091,6 +2107,7 @@ pub const cpu = struct {
20912107 .llvm_name = "attiny828",
20922108 .features = featureSet(&[_]Feature{
20932109 .avr25,
2110 .wrappingrjmp,
20942111 }),
20952112 };
20962113 pub const attiny84: CpuModel = .{
......@@ -2098,6 +2115,7 @@ pub const cpu = struct {
20982115 .llvm_name = "attiny84",
20992116 .features = featureSet(&[_]Feature{
21002117 .avr25,
2118 .wrappingrjmp,
21012119 }),
21022120 };
21032121 pub const attiny841: CpuModel = .{
......@@ -2105,6 +2123,7 @@ pub const cpu = struct {
21052123 .llvm_name = "attiny841",
21062124 .features = featureSet(&[_]Feature{
21072125 .avr25,
2126 .wrappingrjmp,
21082127 }),
21092128 };
21102129 pub const attiny84a: CpuModel = .{
......@@ -2112,6 +2131,7 @@ pub const cpu = struct {
21122131 .llvm_name = "attiny84a",
21132132 .features = featureSet(&[_]Feature{
21142133 .avr25,
2134 .wrappingrjmp,
21152135 }),
21162136 };
21172137 pub const attiny85: CpuModel = .{
......@@ -2119,6 +2139,7 @@ pub const cpu = struct {
21192139 .llvm_name = "attiny85",
21202140 .features = featureSet(&[_]Feature{
21212141 .avr25,
2142 .wrappingrjmp,
21222143 }),
21232144 };
21242145 pub const attiny861: CpuModel = .{
......@@ -2126,6 +2147,7 @@ pub const cpu = struct {
21262147 .llvm_name = "attiny861",
21272148 .features = featureSet(&[_]Feature{
21282149 .avr25,
2150 .wrappingrjmp,
21292151 }),
21302152 };
21312153 pub const attiny861a: CpuModel = .{
......@@ -2133,6 +2155,7 @@ pub const cpu = struct {
21332155 .llvm_name = "attiny861a",
21342156 .features = featureSet(&[_]Feature{
21352157 .avr25,
2158 .wrappingrjmp,
21362159 }),
21372160 };
21382161 pub const attiny87: CpuModel = .{
......@@ -2140,6 +2163,7 @@ pub const cpu = struct {
21402163 .llvm_name = "attiny87",
21412164 .features = featureSet(&[_]Feature{
21422165 .avr25,
2166 .wrappingrjmp,
21432167 }),
21442168 };
21452169 pub const attiny88: CpuModel = .{
......@@ -2147,6 +2171,7 @@ pub const cpu = struct {
21472171 .llvm_name = "attiny88",
21482172 .features = featureSet(&[_]Feature{
21492173 .avr25,
2174 .wrappingrjmp,
21502175 }),
21512176 };
21522177 pub const attiny9: CpuModel = .{
lib/std/Target/csky.zig+7-7
......@@ -214,7 +214,7 @@ pub const all_features = blk: {
214214 };
215215 result[@intFromEnum(Feature.dsp_silan)] = .{
216216 .llvm_name = "dsp_silan",
217 .description = "Enable DSP Silan instrutions",
217 .description = "Enable DSP Silan instructions",
218218 .dependencies = featureSet(&[_]Feature{}),
219219 };
220220 result[@intFromEnum(Feature.dspe60)] = .{
......@@ -224,7 +224,7 @@ pub const all_features = blk: {
224224 };
225225 result[@intFromEnum(Feature.dspv2)] = .{
226226 .llvm_name = "dspv2",
227 .description = "Enable DSP V2.0 instrutions",
227 .description = "Enable DSP V2.0 instructions",
228228 .dependencies = featureSet(&[_]Feature{}),
229229 };
230230 result[@intFromEnum(Feature.e1)] = .{
......@@ -243,7 +243,7 @@ pub const all_features = blk: {
243243 };
244244 result[@intFromEnum(Feature.edsp)] = .{
245245 .llvm_name = "edsp",
246 .description = "Enable DSP instrutions",
246 .description = "Enable DSP instructions",
247247 .dependencies = featureSet(&[_]Feature{}),
248248 };
249249 result[@intFromEnum(Feature.elrw)] = .{
......@@ -333,12 +333,12 @@ pub const all_features = blk: {
333333 };
334334 result[@intFromEnum(Feature.hwdiv)] = .{
335335 .llvm_name = "hwdiv",
336 .description = "Enable divide instrutions",
336 .description = "Enable divide instructions",
337337 .dependencies = featureSet(&[_]Feature{}),
338338 };
339339 result[@intFromEnum(Feature.istack)] = .{
340340 .llvm_name = "istack",
341 .description = "Enable interrput attribute",
341 .description = "Enable interrupt attribute",
342342 .dependencies = featureSet(&[_]Feature{}),
343343 };
344344 result[@intFromEnum(Feature.java)] = .{
......@@ -362,7 +362,7 @@ pub const all_features = blk: {
362362 };
363363 result[@intFromEnum(Feature.multiple_stld)] = .{
364364 .llvm_name = "multiple_stld",
365 .description = "Enable multiple load/store instrutions",
365 .description = "Enable multiple load/store instructions",
366366 .dependencies = featureSet(&[_]Feature{}),
367367 };
368368 result[@intFromEnum(Feature.nvic)] = .{
......@@ -372,7 +372,7 @@ pub const all_features = blk: {
372372 };
373373 result[@intFromEnum(Feature.pushpop)] = .{
374374 .llvm_name = "pushpop",
375 .description = "Enable push/pop instrutions",
375 .description = "Enable push/pop instructions",
376376 .dependencies = featureSet(&[_]Feature{}),
377377 };
378378 result[@intFromEnum(Feature.smart)] = .{
lib/std/Target/hexagon.zig+79
......@@ -23,6 +23,8 @@ pub const Feature = enum {
2323 hvxv69,
2424 hvxv71,
2525 hvxv73,
26 hvxv75,
27 hvxv79,
2628 long_calls,
2729 mem_noshuf,
2830 memops,
......@@ -46,6 +48,8 @@ pub const Feature = enum {
4648 v69,
4749 v71,
4850 v73,
51 v75,
52 v79,
4953 zreg,
5054};
5155
......@@ -171,6 +175,20 @@ pub const all_features = blk: {
171175 .hvxv71,
172176 }),
173177 };
178 result[@intFromEnum(Feature.hvxv75)] = .{
179 .llvm_name = "hvxv75",
180 .description = "Hexagon HVX instructions",
181 .dependencies = featureSet(&[_]Feature{
182 .hvxv73,
183 }),
184 };
185 result[@intFromEnum(Feature.hvxv79)] = .{
186 .llvm_name = "hvxv79",
187 .description = "Hexagon HVX instructions",
188 .dependencies = featureSet(&[_]Feature{
189 .hvxv75,
190 }),
191 };
174192 result[@intFromEnum(Feature.long_calls)] = .{
175193 .llvm_name = "long-calls",
176194 .description = "Use constant-extended calls",
......@@ -290,6 +308,16 @@ pub const all_features = blk: {
290308 .description = "Enable Hexagon V73 architecture",
291309 .dependencies = featureSet(&[_]Feature{}),
292310 };
311 result[@intFromEnum(Feature.v75)] = .{
312 .llvm_name = "v75",
313 .description = "Enable Hexagon V75 architecture",
314 .dependencies = featureSet(&[_]Feature{}),
315 };
316 result[@intFromEnum(Feature.v79)] = .{
317 .llvm_name = "v79",
318 .description = "Enable Hexagon V79 architecture",
319 .dependencies = featureSet(&[_]Feature{}),
320 };
293321 result[@intFromEnum(Feature.zreg)] = .{
294322 .llvm_name = "zreg",
295323 .description = "Hexagon ZReg extension instructions",
......@@ -583,4 +611,55 @@ pub const cpu = struct {
583611 .v73,
584612 }),
585613 };
614 pub const hexagonv75: CpuModel = .{
615 .name = "hexagonv75",
616 .llvm_name = "hexagonv75",
617 .features = featureSet(&[_]Feature{
618 .compound,
619 .duplex,
620 .mem_noshuf,
621 .memops,
622 .nvj,
623 .nvs,
624 .small_data,
625 .v5,
626 .v55,
627 .v60,
628 .v62,
629 .v65,
630 .v66,
631 .v67,
632 .v68,
633 .v69,
634 .v71,
635 .v73,
636 .v75,
637 }),
638 };
639 pub const hexagonv79: CpuModel = .{
640 .name = "hexagonv79",
641 .llvm_name = "hexagonv79",
642 .features = featureSet(&[_]Feature{
643 .compound,
644 .duplex,
645 .mem_noshuf,
646 .memops,
647 .nvj,
648 .nvs,
649 .small_data,
650 .v5,
651 .v55,
652 .v60,
653 .v62,
654 .v65,
655 .v66,
656 .v67,
657 .v68,
658 .v69,
659 .v71,
660 .v73,
661 .v75,
662 .v79,
663 }),
664 };
586665};
lib/std/Target/loongarch.zig+36
......@@ -8,17 +8,22 @@ pub const Feature = enum {
88 @"32bit",
99 @"64bit",
1010 d,
11 div32,
1112 f,
1213 frecipe,
1314 la_global_with_abs,
1415 la_global_with_pcrel,
1516 la_local_with_abs,
17 lam_bh,
18 lamcas,
1619 lasx,
1720 lbt,
21 ld_seq_sa,
1822 lsx,
1923 lvz,
2024 prefer_w_inst,
2125 relax,
26 scq,
2227 ual,
2328};
2429
......@@ -48,6 +53,11 @@ pub const all_features = blk: {
4853 .f,
4954 }),
5055 };
56 result[@intFromEnum(Feature.div32)] = .{
57 .llvm_name = "div32",
58 .description = "Assume div.w[u] and mod.w[u] can handle inputs that are not sign-extended",
59 .dependencies = featureSet(&[_]Feature{}),
60 };
5161 result[@intFromEnum(Feature.f)] = .{
5262 .llvm_name = "f",
5363 .description = "'F' (Single-Precision Floating-Point)",
......@@ -73,6 +83,16 @@ pub const all_features = blk: {
7383 .description = "Expand la.local as la.abs",
7484 .dependencies = featureSet(&[_]Feature{}),
7585 };
86 result[@intFromEnum(Feature.lam_bh)] = .{
87 .llvm_name = "lam-bh",
88 .description = "Support amswap[_db].{b/h} and amadd[_db].{b/h} instructions.",
89 .dependencies = featureSet(&[_]Feature{}),
90 };
91 result[@intFromEnum(Feature.lamcas)] = .{
92 .llvm_name = "lamcas",
93 .description = "Support amcas[_db].{b/h/w/d}.",
94 .dependencies = featureSet(&[_]Feature{}),
95 };
7696 result[@intFromEnum(Feature.lasx)] = .{
7797 .llvm_name = "lasx",
7898 .description = "'LASX' (Loongson Advanced SIMD Extension)",
......@@ -85,6 +105,11 @@ pub const all_features = blk: {
85105 .description = "'LBT' (Loongson Binary Translation Extension)",
86106 .dependencies = featureSet(&[_]Feature{}),
87107 };
108 result[@intFromEnum(Feature.ld_seq_sa)] = .{
109 .llvm_name = "ld-seq-sa",
110 .description = "Don't use load-load barrier (dbar 0x700).",
111 .dependencies = featureSet(&[_]Feature{}),
112 };
88113 result[@intFromEnum(Feature.lsx)] = .{
89114 .llvm_name = "lsx",
90115 .description = "'LSX' (Loongson SIMD Extension)",
......@@ -107,6 +132,11 @@ pub const all_features = blk: {
107132 .description = "Enable Linker relaxation",
108133 .dependencies = featureSet(&[_]Feature{}),
109134 };
135 result[@intFromEnum(Feature.scq)] = .{
136 .llvm_name = "scq",
137 .description = "Support sc.q instruction",
138 .dependencies = featureSet(&[_]Feature{}),
139 };
110140 result[@intFromEnum(Feature.ual)] = .{
111141 .llvm_name = "ual",
112142 .description = "Allow memory accesses to be unaligned",
......@@ -138,6 +168,7 @@ pub const cpu = struct {
138168 .llvm_name = "generic-la64",
139169 .features = featureSet(&[_]Feature{
140170 .@"64bit",
171 .lsx,
141172 .ual,
142173 }),
143174 };
......@@ -157,10 +188,15 @@ pub const cpu = struct {
157188 .llvm_name = "la664",
158189 .features = featureSet(&[_]Feature{
159190 .@"64bit",
191 .div32,
160192 .frecipe,
193 .lam_bh,
194 .lamcas,
161195 .lasx,
162196 .lbt,
197 .ld_seq_sa,
163198 .lvz,
199 .scq,
164200 .ual,
165201 }),
166202 };
lib/std/Target/nvptx.zig+96
......@@ -32,6 +32,14 @@ pub const Feature = enum {
3232 ptx83,
3333 ptx84,
3434 ptx85,
35 ptx86,
36 ptx87,
37 sm_100,
38 sm_100a,
39 sm_101,
40 sm_101a,
41 sm_120,
42 sm_120a,
3543 sm_20,
3644 sm_21,
3745 sm_30,
......@@ -199,6 +207,46 @@ pub const all_features = blk: {
199207 .description = "Use PTX version 85",
200208 .dependencies = featureSet(&[_]Feature{}),
201209 };
210 result[@intFromEnum(Feature.ptx86)] = .{
211 .llvm_name = "ptx86",
212 .description = "Use PTX version 86",
213 .dependencies = featureSet(&[_]Feature{}),
214 };
215 result[@intFromEnum(Feature.ptx87)] = .{
216 .llvm_name = "ptx87",
217 .description = "Use PTX version 87",
218 .dependencies = featureSet(&[_]Feature{}),
219 };
220 result[@intFromEnum(Feature.sm_100)] = .{
221 .llvm_name = "sm_100",
222 .description = "Target SM 100",
223 .dependencies = featureSet(&[_]Feature{}),
224 };
225 result[@intFromEnum(Feature.sm_100a)] = .{
226 .llvm_name = "sm_100a",
227 .description = "Target SM 100a",
228 .dependencies = featureSet(&[_]Feature{}),
229 };
230 result[@intFromEnum(Feature.sm_101)] = .{
231 .llvm_name = "sm_101",
232 .description = "Target SM 101",
233 .dependencies = featureSet(&[_]Feature{}),
234 };
235 result[@intFromEnum(Feature.sm_101a)] = .{
236 .llvm_name = "sm_101a",
237 .description = "Target SM 101a",
238 .dependencies = featureSet(&[_]Feature{}),
239 };
240 result[@intFromEnum(Feature.sm_120)] = .{
241 .llvm_name = "sm_120",
242 .description = "Target SM 120",
243 .dependencies = featureSet(&[_]Feature{}),
244 };
245 result[@intFromEnum(Feature.sm_120a)] = .{
246 .llvm_name = "sm_120a",
247 .description = "Target SM 120a",
248 .dependencies = featureSet(&[_]Feature{}),
249 };
202250 result[@intFromEnum(Feature.sm_20)] = .{
203251 .llvm_name = "sm_20",
204252 .description = "Target SM 20",
......@@ -313,6 +361,54 @@ pub const all_features = blk: {
313361};
314362
315363pub const cpu = struct {
364 pub const sm_100: CpuModel = .{
365 .name = "sm_100",
366 .llvm_name = "sm_100",
367 .features = featureSet(&[_]Feature{
368 .ptx86,
369 .sm_100,
370 }),
371 };
372 pub const sm_100a: CpuModel = .{
373 .name = "sm_100a",
374 .llvm_name = "sm_100a",
375 .features = featureSet(&[_]Feature{
376 .ptx86,
377 .sm_100a,
378 }),
379 };
380 pub const sm_101: CpuModel = .{
381 .name = "sm_101",
382 .llvm_name = "sm_101",
383 .features = featureSet(&[_]Feature{
384 .ptx86,
385 .sm_101,
386 }),
387 };
388 pub const sm_101a: CpuModel = .{
389 .name = "sm_101a",
390 .llvm_name = "sm_101a",
391 .features = featureSet(&[_]Feature{
392 .ptx86,
393 .sm_101a,
394 }),
395 };
396 pub const sm_120: CpuModel = .{
397 .name = "sm_120",
398 .llvm_name = "sm_120",
399 .features = featureSet(&[_]Feature{
400 .ptx87,
401 .sm_120,
402 }),
403 };
404 pub const sm_120a: CpuModel = .{
405 .name = "sm_120a",
406 .llvm_name = "sm_120a",
407 .features = featureSet(&[_]Feature{
408 .ptx87,
409 .sm_120a,
410 }),
411 };
316412 pub const sm_20: CpuModel = .{
317413 .name = "sm_20",
318414 .llvm_name = "sm_20",
lib/std/Target/riscv.zig+741-264
......@@ -13,36 +13,50 @@ pub const Feature = enum {
1313 c,
1414 conditional_cmv_fusion,
1515 d,
16 disable_latency_sched_heuristic,
1617 dlen_factor_2,
1718 e,
1819 experimental,
19 experimental_rva23s64,
20 experimental_rva23u64,
21 experimental_rvb23s64,
22 experimental_rvb23u64,
2320 experimental_rvm23u32,
24 experimental_smmpm,
25 experimental_smnpm,
26 experimental_ssnpm,
27 experimental_sspm,
28 experimental_ssqosid,
29 experimental_supm,
30 experimental_zacas,
21 experimental_sdext,
22 experimental_sdtrig,
23 experimental_smctr,
24 experimental_ssctr,
25 experimental_svukte,
26 experimental_xqcia,
27 experimental_xqciac,
28 experimental_xqcicli,
29 experimental_xqcicm,
30 experimental_xqcics,
31 experimental_xqcicsr,
32 experimental_xqciint,
33 experimental_xqcilo,
34 experimental_xqcilsm,
35 experimental_xqcisls,
3136 experimental_zalasr,
3237 experimental_zicfilp,
3338 experimental_zicfiss,
39 experimental_zvbc32e,
40 experimental_zvkgs,
3441 f,
3542 forced_atomics,
36 forced_sw_shadow_stack,
3743 h,
3844 i,
3945 ld_add_fusion,
4046 lui_addi_fusion,
4147 m,
48 mips_p8700,
4249 no_default_unroll,
4350 no_rvc_hints,
4451 no_sink_splat_operands,
4552 no_trailing_seq_cst_fence,
53 optimized_nf2_segment_load_store,
54 optimized_nf3_segment_load_store,
55 optimized_nf4_segment_load_store,
56 optimized_nf5_segment_load_store,
57 optimized_nf6_segment_load_store,
58 optimized_nf7_segment_load_store,
59 optimized_nf8_segment_load_store,
4660 optimized_zero_stride_load,
4761 predictable_select_expensive,
4862 prefer_w_inst,
......@@ -82,9 +96,14 @@ pub const Feature = enum {
8296 rva20u64,
8397 rva22s64,
8498 rva22u64,
99 rva23s64,
100 rva23u64,
101 rvb23s64,
102 rvb23u64,
85103 rvi20u32,
86104 rvi20u64,
87105 save_restore,
106 sha,
88107 shcounterenw,
89108 shgatpa,
90109 shifted_zextw_fusion,
......@@ -96,7 +115,11 @@ pub const Feature = enum {
96115 smaia,
97116 smcdeleg,
98117 smcsrind,
118 smdbltrp,
99119 smepmp,
120 smmpm,
121 smnpm,
122 smrnmi,
100123 smstateen,
101124 ssaia,
102125 ssccfg,
......@@ -104,24 +127,31 @@ pub const Feature = enum {
104127 sscofpmf,
105128 sscounterenw,
106129 sscsrind,
130 ssdbltrp,
131 ssnpm,
132 sspm,
133 ssqosid,
107134 ssstateen,
108135 ssstrict,
109136 sstc,
110137 sstvala,
111138 sstvecd,
112139 ssu64xl,
140 supm,
113141 svade,
114142 svadu,
115143 svbare,
116144 svinval,
117145 svnapot,
118146 svpbmt,
147 svvptc,
119148 tagged_globals,
120149 unaligned_scalar_mem,
121150 unaligned_vector_mem,
122151 use_postra_scheduler,
123152 v,
124153 ventana_veyron,
154 vxrm_pipeline_flush,
125155 xcvalu,
126156 xcvbi,
127157 xcvbitmanip,
......@@ -129,6 +159,8 @@ pub const Feature = enum {
129159 xcvmac,
130160 xcvmem,
131161 xcvsimd,
162 xmipscmove,
163 xmipslsp,
132164 xsfcease,
133165 xsfvcp,
134166 xsfvfnrclipxfqf,
......@@ -154,6 +186,7 @@ pub const Feature = enum {
154186 za64rs,
155187 zaamo,
156188 zabha,
189 zacas,
157190 zalrsc,
158191 zama16b,
159192 zawrs,
......@@ -272,7 +305,10 @@ pub const all_features = blk: {
272305 result[@intFromEnum(Feature.a)] = .{
273306 .llvm_name = "a",
274307 .description = "'A' (Atomic Instructions)",
275 .dependencies = featureSet(&[_]Feature{}),
308 .dependencies = featureSet(&[_]Feature{
309 .zaamo,
310 .zalrsc,
311 }),
276312 };
277313 result[@intFromEnum(Feature.auipc_addi_fusion)] = .{
278314 .llvm_name = "auipc-addi-fusion",
......@@ -305,6 +341,11 @@ pub const all_features = blk: {
305341 .f,
306342 }),
307343 };
344 result[@intFromEnum(Feature.disable_latency_sched_heuristic)] = .{
345 .llvm_name = "disable-latency-sched-heuristic",
346 .description = "Disable latency scheduling heuristic",
347 .dependencies = featureSet(&[_]Feature{}),
348 };
308349 result[@intFromEnum(Feature.dlen_factor_2)] = .{
309350 .llvm_name = "dlen-factor-2",
310351 .description = "Vector unit DLEN(data path width) is half of VLEN",
......@@ -312,7 +353,7 @@ pub const all_features = blk: {
312353 };
313354 result[@intFromEnum(Feature.e)] = .{
314355 .llvm_name = "e",
315 .description = "Implements RV{32,64}E (provides 16 rather than 32 GPRs)",
356 .description = "'E' (Embedded Instruction Set with 16 GPRs)",
316357 .dependencies = featureSet(&[_]Feature{}),
317358 };
318359 result[@intFromEnum(Feature.experimental)] = .{
......@@ -320,241 +361,108 @@ pub const all_features = blk: {
320361 .description = "Experimental intrinsics",
321362 .dependencies = featureSet(&[_]Feature{}),
322363 };
323 result[@intFromEnum(Feature.experimental_rva23s64)] = .{
324 .llvm_name = "experimental-rva23s64",
325 .description = "RISC-V experimental-rva23s64 profile",
364 result[@intFromEnum(Feature.experimental_rvm23u32)] = .{
365 .llvm_name = "experimental-rvm23u32",
366 .description = "RISC-V experimental-rvm23u32 profile",
326367 .dependencies = featureSet(&[_]Feature{
327 .@"64bit",
328 .a,
329 .c,
330 .experimental_ssnpm,
331 .h,
368 .@"32bit",
369 .b,
332370 .i,
333371 .m,
334 .shcounterenw,
335 .shgatpa,
336 .shtvala,
337 .shvsatpa,
338 .shvstvala,
339 .shvstvecd,
340 .ssccptr,
341 .sscofpmf,
342 .sscounterenw,
343 .ssstateen,
344 .sstc,
345 .sstvala,
346 .sstvecd,
347 .ssu64xl,
348 .svade,
349 .svbare,
350 .svinval,
351 .svnapot,
352 .svpbmt,
353 .v,
354 .za64rs,
355 .zawrs,
356 .zba,
357 .zbb,
358 .zbs,
359 .zcb,
372 .zce,
360373 .zcmop,
361 .zfa,
362 .zfhmin,
363 .zic64b,
364 .zicbom,
365374 .zicbop,
366 .zicboz,
367 .ziccamoa,
368 .ziccif,
369 .zicclsm,
370 .ziccrse,
371 .zicntr,
372375 .zicond,
373 .zifencei,
374376 .zihintntl,
375377 .zihintpause,
376 .zihpm,
377378 .zimop,
378 .zkt,
379 .zvbb,
380 .zvfhmin,
381 .zvkt,
382379 }),
383380 };
384 result[@intFromEnum(Feature.experimental_rva23u64)] = .{
385 .llvm_name = "experimental-rva23u64",
386 .description = "RISC-V experimental-rva23u64 profile",
387 .dependencies = featureSet(&[_]Feature{
388 .@"64bit",
389 .a,
390 .c,
391 .i,
392 .m,
393 .v,
394 .za64rs,
395 .zawrs,
396 .zba,
397 .zbb,
398 .zbs,
399 .zcb,
400 .zcmop,
401 .zfa,
402 .zfhmin,
403 .zic64b,
404 .zicbom,
405 .zicbop,
406 .zicboz,
407 .ziccamoa,
408 .ziccif,
409 .zicclsm,
410 .ziccrse,
411 .zicntr,
412 .zicond,
413 .zihintntl,
414 .zihintpause,
415 .zihpm,
416 .zimop,
417 .zkt,
418 .zvbb,
419 .zvfhmin,
420 .zvkt,
421 }),
381 result[@intFromEnum(Feature.experimental_sdext)] = .{
382 .llvm_name = "experimental-sdext",
383 .description = "'Sdext' (External debugger)",
384 .dependencies = featureSet(&[_]Feature{}),
422385 };
423 result[@intFromEnum(Feature.experimental_rvb23s64)] = .{
424 .llvm_name = "experimental-rvb23s64",
425 .description = "RISC-V experimental-rvb23s64 profile",
426 .dependencies = featureSet(&[_]Feature{
427 .@"64bit",
428 .a,
429 .c,
430 .d,
431 .i,
432 .m,
433 .ssccptr,
434 .sscofpmf,
435 .sscounterenw,
436 .sstc,
437 .sstvala,
438 .sstvecd,
439 .ssu64xl,
440 .svade,
441 .svbare,
442 .svinval,
443 .svnapot,
444 .svpbmt,
445 .za64rs,
446 .zawrs,
447 .zba,
448 .zbb,
449 .zbs,
450 .zcb,
451 .zcmop,
452 .zfa,
453 .zic64b,
454 .zicbom,
455 .zicbop,
456 .zicboz,
457 .ziccamoa,
458 .ziccif,
459 .zicclsm,
460 .ziccrse,
461 .zicntr,
462 .zicond,
463 .zifencei,
464 .zihintntl,
465 .zihintpause,
466 .zihpm,
467 .zimop,
468 .zkt,
469 }),
386 result[@intFromEnum(Feature.experimental_sdtrig)] = .{
387 .llvm_name = "experimental-sdtrig",
388 .description = "'Sdtrig' (Debugger triggers)",
389 .dependencies = featureSet(&[_]Feature{}),
470390 };
471 result[@intFromEnum(Feature.experimental_rvb23u64)] = .{
472 .llvm_name = "experimental-rvb23u64",
473 .description = "RISC-V experimental-rvb23u64 profile",
391 result[@intFromEnum(Feature.experimental_smctr)] = .{
392 .llvm_name = "experimental-smctr",
393 .description = "'Smctr' (Control Transfer Records Machine Level)",
474394 .dependencies = featureSet(&[_]Feature{
475 .@"64bit",
476 .a,
477 .c,
478 .d,
479 .i,
480 .m,
481 .za64rs,
482 .zawrs,
483 .zba,
484 .zbb,
485 .zbs,
486 .zcb,
487 .zcmop,
488 .zfa,
489 .zic64b,
490 .zicbom,
491 .zicbop,
492 .zicboz,
493 .ziccamoa,
494 .ziccif,
495 .zicclsm,
496 .ziccrse,
497 .zicntr,
498 .zicond,
499 .zihintntl,
500 .zihintpause,
501 .zihpm,
502 .zimop,
503 .zkt,
395 .sscsrind,
504396 }),
505397 };
506 result[@intFromEnum(Feature.experimental_rvm23u32)] = .{
507 .llvm_name = "experimental-rvm23u32",
508 .description = "RISC-V experimental-rvm23u32 profile",
398 result[@intFromEnum(Feature.experimental_ssctr)] = .{
399 .llvm_name = "experimental-ssctr",
400 .description = "'Ssctr' (Control Transfer Records Supervisor Level)",
509401 .dependencies = featureSet(&[_]Feature{
510 .@"32bit",
511 .i,
512 .m,
513 .zba,
514 .zbb,
515 .zbs,
516 .zce,
517 .zcmop,
518 .zicbop,
519 .zicond,
520 .zihintntl,
521 .zihintpause,
522 .zimop,
402 .sscsrind,
523403 }),
524404 };
525 result[@intFromEnum(Feature.experimental_smmpm)] = .{
526 .llvm_name = "experimental-smmpm",
527 .description = "'Smmpm' (Machine-level Pointer Masking for M-mode)",
405 result[@intFromEnum(Feature.experimental_svukte)] = .{
406 .llvm_name = "experimental-svukte",
407 .description = "'Svukte' (Address-Independent Latency of User-Mode Faults to Supervisor Addresses)",
528408 .dependencies = featureSet(&[_]Feature{}),
529409 };
530 result[@intFromEnum(Feature.experimental_smnpm)] = .{
531 .llvm_name = "experimental-smnpm",
532 .description = "'Smnpm' (Machine-level Pointer Masking for next lower privilege mode)",
410 result[@intFromEnum(Feature.experimental_xqcia)] = .{
411 .llvm_name = "experimental-xqcia",
412 .description = "'Xqcia' (Qualcomm uC Arithmetic Extension)",
533413 .dependencies = featureSet(&[_]Feature{}),
534414 };
535 result[@intFromEnum(Feature.experimental_ssnpm)] = .{
536 .llvm_name = "experimental-ssnpm",
537 .description = "'Ssnpm' (Supervisor-level Pointer Masking for next lower privilege mode)",
415 result[@intFromEnum(Feature.experimental_xqciac)] = .{
416 .llvm_name = "experimental-xqciac",
417 .description = "'Xqciac' (Qualcomm uC Load-Store Address Calculation Extension)",
418 .dependencies = featureSet(&[_]Feature{
419 .zca,
420 }),
421 };
422 result[@intFromEnum(Feature.experimental_xqcicli)] = .{
423 .llvm_name = "experimental-xqcicli",
424 .description = "'Xqcicli' (Qualcomm uC Conditional Load Immediate Extension)",
538425 .dependencies = featureSet(&[_]Feature{}),
539426 };
540 result[@intFromEnum(Feature.experimental_sspm)] = .{
541 .llvm_name = "experimental-sspm",
542 .description = "'Sspm' (Indicates Supervisor-mode Pointer Masking)",
427 result[@intFromEnum(Feature.experimental_xqcicm)] = .{
428 .llvm_name = "experimental-xqcicm",
429 .description = "'Xqcicm' (Qualcomm uC Conditional Move Extension)",
430 .dependencies = featureSet(&[_]Feature{
431 .zca,
432 }),
433 };
434 result[@intFromEnum(Feature.experimental_xqcics)] = .{
435 .llvm_name = "experimental-xqcics",
436 .description = "'Xqcics' (Qualcomm uC Conditional Select Extension)",
543437 .dependencies = featureSet(&[_]Feature{}),
544438 };
545 result[@intFromEnum(Feature.experimental_ssqosid)] = .{
546 .llvm_name = "experimental-ssqosid",
547 .description = "'Ssqosid' (Quality-of-Service (QoS) Identifiers)",
439 result[@intFromEnum(Feature.experimental_xqcicsr)] = .{
440 .llvm_name = "experimental-xqcicsr",
441 .description = "'Xqcicsr' (Qualcomm uC CSR Extension)",
548442 .dependencies = featureSet(&[_]Feature{}),
549443 };
550 result[@intFromEnum(Feature.experimental_supm)] = .{
551 .llvm_name = "experimental-supm",
552 .description = "'Supm' (Indicates User-mode Pointer Masking)",
444 result[@intFromEnum(Feature.experimental_xqciint)] = .{
445 .llvm_name = "experimental-xqciint",
446 .description = "'Xqciint' (Qualcomm uC Interrupts Extension)",
447 .dependencies = featureSet(&[_]Feature{
448 .zca,
449 }),
450 };
451 result[@intFromEnum(Feature.experimental_xqcilo)] = .{
452 .llvm_name = "experimental-xqcilo",
453 .description = "'Xqcilo' (Qualcomm uC Large Offset Load Store Extension)",
454 .dependencies = featureSet(&[_]Feature{
455 .zca,
456 }),
457 };
458 result[@intFromEnum(Feature.experimental_xqcilsm)] = .{
459 .llvm_name = "experimental-xqcilsm",
460 .description = "'Xqcilsm' (Qualcomm uC Load Store Multiple Extension)",
553461 .dependencies = featureSet(&[_]Feature{}),
554462 };
555 result[@intFromEnum(Feature.experimental_zacas)] = .{
556 .llvm_name = "experimental-zacas",
557 .description = "'Zacas' (Atomic Compare-And-Swap Instructions)",
463 result[@intFromEnum(Feature.experimental_xqcisls)] = .{
464 .llvm_name = "experimental-xqcisls",
465 .description = "'Xqcisls' (Qualcomm uC Scaled Load Store Extension)",
558466 .dependencies = featureSet(&[_]Feature{}),
559467 };
560468 result[@intFromEnum(Feature.experimental_zalasr)] = .{
......@@ -577,6 +485,20 @@ pub const all_features = blk: {
577485 .zimop,
578486 }),
579487 };
488 result[@intFromEnum(Feature.experimental_zvbc32e)] = .{
489 .llvm_name = "experimental-zvbc32e",
490 .description = "'Zvbc32e' (Vector Carryless Multiplication with 32-bits elements)",
491 .dependencies = featureSet(&[_]Feature{
492 .zve32x,
493 }),
494 };
495 result[@intFromEnum(Feature.experimental_zvkgs)] = .{
496 .llvm_name = "experimental-zvkgs",
497 .description = "'Zvkgs' (Vector-Scalar GCM instructions for Cryptography)",
498 .dependencies = featureSet(&[_]Feature{
499 .zvkg,
500 }),
501 };
580502 result[@intFromEnum(Feature.f)] = .{
581503 .llvm_name = "f",
582504 .description = "'F' (Single-Precision Floating-Point)",
......@@ -589,11 +511,6 @@ pub const all_features = blk: {
589511 .description = "Assume that lock-free native-width atomics are available",
590512 .dependencies = featureSet(&[_]Feature{}),
591513 };
592 result[@intFromEnum(Feature.forced_sw_shadow_stack)] = .{
593 .llvm_name = "forced-sw-shadow-stack",
594 .description = "Implement shadow stack with software.",
595 .dependencies = featureSet(&[_]Feature{}),
596 };
597514 result[@intFromEnum(Feature.h)] = .{
598515 .llvm_name = "h",
599516 .description = "'H' (Hypervisor)",
......@@ -621,6 +538,11 @@ pub const all_features = blk: {
621538 .zmmul,
622539 }),
623540 };
541 result[@intFromEnum(Feature.mips_p8700)] = .{
542 .llvm_name = "mips-p8700",
543 .description = "MIPS p8700 processor",
544 .dependencies = featureSet(&[_]Feature{}),
545 };
624546 result[@intFromEnum(Feature.no_default_unroll)] = .{
625547 .llvm_name = "no-default-unroll",
626548 .description = "Disable default unroll preference.",
......@@ -641,6 +563,41 @@ pub const all_features = blk: {
641563 .description = "Disable trailing fence for seq-cst store.",
642564 .dependencies = featureSet(&[_]Feature{}),
643565 };
566 result[@intFromEnum(Feature.optimized_nf2_segment_load_store)] = .{
567 .llvm_name = "optimized-nf2-segment-load-store",
568 .description = "vlseg2eN.v and vsseg2eN.v areimplemented as a wide memory op and shuffle",
569 .dependencies = featureSet(&[_]Feature{}),
570 };
571 result[@intFromEnum(Feature.optimized_nf3_segment_load_store)] = .{
572 .llvm_name = "optimized-nf3-segment-load-store",
573 .description = "vlseg3eN.v and vsseg3eN.v areimplemented as a wide memory op and shuffle",
574 .dependencies = featureSet(&[_]Feature{}),
575 };
576 result[@intFromEnum(Feature.optimized_nf4_segment_load_store)] = .{
577 .llvm_name = "optimized-nf4-segment-load-store",
578 .description = "vlseg4eN.v and vsseg4eN.v areimplemented as a wide memory op and shuffle",
579 .dependencies = featureSet(&[_]Feature{}),
580 };
581 result[@intFromEnum(Feature.optimized_nf5_segment_load_store)] = .{
582 .llvm_name = "optimized-nf5-segment-load-store",
583 .description = "vlseg5eN.v and vsseg5eN.v areimplemented as a wide memory op and shuffle",
584 .dependencies = featureSet(&[_]Feature{}),
585 };
586 result[@intFromEnum(Feature.optimized_nf6_segment_load_store)] = .{
587 .llvm_name = "optimized-nf6-segment-load-store",
588 .description = "vlseg6eN.v and vsseg6eN.v areimplemented as a wide memory op and shuffle",
589 .dependencies = featureSet(&[_]Feature{}),
590 };
591 result[@intFromEnum(Feature.optimized_nf7_segment_load_store)] = .{
592 .llvm_name = "optimized-nf7-segment-load-store",
593 .description = "vlseg7eN.v and vsseg7eN.v areimplemented as a wide memory op and shuffle",
594 .dependencies = featureSet(&[_]Feature{}),
595 };
596 result[@intFromEnum(Feature.optimized_nf8_segment_load_store)] = .{
597 .llvm_name = "optimized-nf8-segment-load-store",
598 .description = "vlseg8eN.v and vsseg8eN.v areimplemented as a wide memory op and shuffle",
599 .dependencies = featureSet(&[_]Feature{}),
600 };
644601 result[@intFromEnum(Feature.optimized_zero_stride_load)] = .{
645602 .llvm_name = "optimized-zero-stride-load",
646603 .description = "Optimized (perform fewer memory operations)zero-stride vector load",
......@@ -864,6 +821,7 @@ pub const all_features = blk: {
864821 .dependencies = featureSet(&[_]Feature{
865822 .@"64bit",
866823 .a,
824 .b,
867825 .c,
868826 .d,
869827 .i,
......@@ -877,9 +835,6 @@ pub const all_features = blk: {
877835 .svinval,
878836 .svpbmt,
879837 .za64rs,
880 .zba,
881 .zbb,
882 .zbs,
883838 .zfhmin,
884839 .zic64b,
885840 .zicbom,
......@@ -902,14 +857,12 @@ pub const all_features = blk: {
902857 .dependencies = featureSet(&[_]Feature{
903858 .@"64bit",
904859 .a,
860 .b,
905861 .c,
906862 .d,
907863 .i,
908864 .m,
909865 .za64rs,
910 .zba,
911 .zbb,
912 .zbs,
913866 .zfhmin,
914867 .zic64b,
915868 .zicbom,
......@@ -925,6 +878,176 @@ pub const all_features = blk: {
925878 .zkt,
926879 }),
927880 };
881 result[@intFromEnum(Feature.rva23s64)] = .{
882 .llvm_name = "rva23s64",
883 .description = "RISC-V rva23s64 profile",
884 .dependencies = featureSet(&[_]Feature{
885 .@"64bit",
886 .a,
887 .b,
888 .c,
889 .i,
890 .m,
891 .sha,
892 .ssccptr,
893 .sscofpmf,
894 .sscounterenw,
895 .ssnpm,
896 .sstc,
897 .sstvala,
898 .sstvecd,
899 .ssu64xl,
900 .supm,
901 .svade,
902 .svbare,
903 .svinval,
904 .svnapot,
905 .svpbmt,
906 .v,
907 .za64rs,
908 .zawrs,
909 .zcb,
910 .zcmop,
911 .zfa,
912 .zfhmin,
913 .zic64b,
914 .zicbom,
915 .zicbop,
916 .zicboz,
917 .ziccamoa,
918 .ziccif,
919 .zicclsm,
920 .ziccrse,
921 .zicntr,
922 .zicond,
923 .zifencei,
924 .zihintntl,
925 .zihintpause,
926 .zihpm,
927 .zimop,
928 .zkt,
929 .zvbb,
930 .zvfhmin,
931 .zvkt,
932 }),
933 };
934 result[@intFromEnum(Feature.rva23u64)] = .{
935 .llvm_name = "rva23u64",
936 .description = "RISC-V rva23u64 profile",
937 .dependencies = featureSet(&[_]Feature{
938 .@"64bit",
939 .a,
940 .b,
941 .c,
942 .i,
943 .m,
944 .supm,
945 .v,
946 .za64rs,
947 .zawrs,
948 .zcb,
949 .zcmop,
950 .zfa,
951 .zfhmin,
952 .zic64b,
953 .zicbom,
954 .zicbop,
955 .zicboz,
956 .ziccamoa,
957 .ziccif,
958 .zicclsm,
959 .ziccrse,
960 .zicntr,
961 .zicond,
962 .zihintntl,
963 .zihintpause,
964 .zihpm,
965 .zimop,
966 .zkt,
967 .zvbb,
968 .zvfhmin,
969 .zvkt,
970 }),
971 };
972 result[@intFromEnum(Feature.rvb23s64)] = .{
973 .llvm_name = "rvb23s64",
974 .description = "RISC-V rvb23s64 profile",
975 .dependencies = featureSet(&[_]Feature{
976 .@"64bit",
977 .a,
978 .b,
979 .c,
980 .d,
981 .i,
982 .m,
983 .ssccptr,
984 .sscofpmf,
985 .sscounterenw,
986 .sstc,
987 .sstvala,
988 .sstvecd,
989 .ssu64xl,
990 .svade,
991 .svbare,
992 .svinval,
993 .svnapot,
994 .svpbmt,
995 .za64rs,
996 .zawrs,
997 .zcb,
998 .zcmop,
999 .zfa,
1000 .zic64b,
1001 .zicbom,
1002 .zicbop,
1003 .zicboz,
1004 .ziccamoa,
1005 .ziccif,
1006 .zicclsm,
1007 .ziccrse,
1008 .zicntr,
1009 .zicond,
1010 .zifencei,
1011 .zihintntl,
1012 .zihintpause,
1013 .zihpm,
1014 .zimop,
1015 .zkt,
1016 }),
1017 };
1018 result[@intFromEnum(Feature.rvb23u64)] = .{
1019 .llvm_name = "rvb23u64",
1020 .description = "RISC-V rvb23u64 profile",
1021 .dependencies = featureSet(&[_]Feature{
1022 .@"64bit",
1023 .a,
1024 .b,
1025 .c,
1026 .d,
1027 .i,
1028 .m,
1029 .za64rs,
1030 .zawrs,
1031 .zcb,
1032 .zcmop,
1033 .zfa,
1034 .zic64b,
1035 .zicbom,
1036 .zicbop,
1037 .zicboz,
1038 .ziccamoa,
1039 .ziccif,
1040 .zicclsm,
1041 .ziccrse,
1042 .zicntr,
1043 .zicond,
1044 .zihintntl,
1045 .zihintpause,
1046 .zihpm,
1047 .zimop,
1048 .zkt,
1049 }),
1050 };
9281051 result[@intFromEnum(Feature.rvi20u32)] = .{
9291052 .llvm_name = "rvi20u32",
9301053 .description = "RISC-V rvi20u32 profile",
......@@ -946,6 +1069,20 @@ pub const all_features = blk: {
9461069 .description = "Enable save/restore.",
9471070 .dependencies = featureSet(&[_]Feature{}),
9481071 };
1072 result[@intFromEnum(Feature.sha)] = .{
1073 .llvm_name = "sha",
1074 .description = "'Sha' (Augmented Hypervisor)",
1075 .dependencies = featureSet(&[_]Feature{
1076 .h,
1077 .shcounterenw,
1078 .shgatpa,
1079 .shtvala,
1080 .shvsatpa,
1081 .shvstvala,
1082 .shvstvecd,
1083 .ssstateen,
1084 }),
1085 };
9491086 result[@intFromEnum(Feature.shcounterenw)] = .{
9501087 .llvm_name = "shcounterenw",
9511088 .description = "'Shcounterenw' (Support writeable hcounteren enable bit for any hpmcounter that is not read-only zero)",
......@@ -953,7 +1090,7 @@ pub const all_features = blk: {
9531090 };
9541091 result[@intFromEnum(Feature.shgatpa)] = .{
9551092 .llvm_name = "shgatpa",
956 .description = "'Sgatpa' (SvNNx4 mode supported for all modes supported by satp, as well as Bare)",
1093 .description = "'Shgatpa' (SvNNx4 mode supported for all modes supported by satp, as well as Bare)",
9571094 .dependencies = featureSet(&[_]Feature{}),
9581095 };
9591096 result[@intFromEnum(Feature.shifted_zextw_fusion)] = .{
......@@ -973,7 +1110,7 @@ pub const all_features = blk: {
9731110 };
9741111 result[@intFromEnum(Feature.shvsatpa)] = .{
9751112 .llvm_name = "shvsatpa",
976 .description = "'Svsatpa' (vsatp supports all modes supported by satp)",
1113 .description = "'Shvsatpa' (vsatp supports all modes supported by satp)",
9771114 .dependencies = featureSet(&[_]Feature{}),
9781115 };
9791116 result[@intFromEnum(Feature.shvstvala)] = .{
......@@ -1001,11 +1138,31 @@ pub const all_features = blk: {
10011138 .description = "'Smcsrind' (Indirect CSR Access Machine Level)",
10021139 .dependencies = featureSet(&[_]Feature{}),
10031140 };
1141 result[@intFromEnum(Feature.smdbltrp)] = .{
1142 .llvm_name = "smdbltrp",
1143 .description = "'Smdbltrp' (Double Trap Machine Level)",
1144 .dependencies = featureSet(&[_]Feature{}),
1145 };
10041146 result[@intFromEnum(Feature.smepmp)] = .{
10051147 .llvm_name = "smepmp",
10061148 .description = "'Smepmp' (Enhanced Physical Memory Protection)",
10071149 .dependencies = featureSet(&[_]Feature{}),
10081150 };
1151 result[@intFromEnum(Feature.smmpm)] = .{
1152 .llvm_name = "smmpm",
1153 .description = "'Smmpm' (Machine-level Pointer Masking for M-mode)",
1154 .dependencies = featureSet(&[_]Feature{}),
1155 };
1156 result[@intFromEnum(Feature.smnpm)] = .{
1157 .llvm_name = "smnpm",
1158 .description = "'Smnpm' (Machine-level Pointer Masking for next lower privilege mode)",
1159 .dependencies = featureSet(&[_]Feature{}),
1160 };
1161 result[@intFromEnum(Feature.smrnmi)] = .{
1162 .llvm_name = "smrnmi",
1163 .description = "'Smrnmi' (Resumable Non-Maskable Interrupts)",
1164 .dependencies = featureSet(&[_]Feature{}),
1165 };
10091166 result[@intFromEnum(Feature.smstateen)] = .{
10101167 .llvm_name = "smstateen",
10111168 .description = "'Smstateen' (Machine-mode view of the state-enable extension)",
......@@ -1041,6 +1198,26 @@ pub const all_features = blk: {
10411198 .description = "'Sscsrind' (Indirect CSR Access Supervisor Level)",
10421199 .dependencies = featureSet(&[_]Feature{}),
10431200 };
1201 result[@intFromEnum(Feature.ssdbltrp)] = .{
1202 .llvm_name = "ssdbltrp",
1203 .description = "'Ssdbltrp' (Double Trap Supervisor Level)",
1204 .dependencies = featureSet(&[_]Feature{}),
1205 };
1206 result[@intFromEnum(Feature.ssnpm)] = .{
1207 .llvm_name = "ssnpm",
1208 .description = "'Ssnpm' (Supervisor-level Pointer Masking for next lower privilege mode)",
1209 .dependencies = featureSet(&[_]Feature{}),
1210 };
1211 result[@intFromEnum(Feature.sspm)] = .{
1212 .llvm_name = "sspm",
1213 .description = "'Sspm' (Indicates Supervisor-mode Pointer Masking)",
1214 .dependencies = featureSet(&[_]Feature{}),
1215 };
1216 result[@intFromEnum(Feature.ssqosid)] = .{
1217 .llvm_name = "ssqosid",
1218 .description = "'Ssqosid' (Quality-of-Service (QoS) Identifiers)",
1219 .dependencies = featureSet(&[_]Feature{}),
1220 };
10441221 result[@intFromEnum(Feature.ssstateen)] = .{
10451222 .llvm_name = "ssstateen",
10461223 .description = "'Ssstateen' (Supervisor-mode view of the state-enable extension)",
......@@ -1071,6 +1248,11 @@ pub const all_features = blk: {
10711248 .description = "'Ssu64xl' (UXLEN=64 supported)",
10721249 .dependencies = featureSet(&[_]Feature{}),
10731250 };
1251 result[@intFromEnum(Feature.supm)] = .{
1252 .llvm_name = "supm",
1253 .description = "'Supm' (Indicates User-mode Pointer Masking)",
1254 .dependencies = featureSet(&[_]Feature{}),
1255 };
10741256 result[@intFromEnum(Feature.svade)] = .{
10751257 .llvm_name = "svade",
10761258 .description = "'Svade' (Raise exceptions on improper A/D bits)",
......@@ -1083,7 +1265,7 @@ pub const all_features = blk: {
10831265 };
10841266 result[@intFromEnum(Feature.svbare)] = .{
10851267 .llvm_name = "svbare",
1086 .description = "'Svbare' $(satp mode Bare supported)",
1268 .description = "'Svbare' (satp mode Bare supported)",
10871269 .dependencies = featureSet(&[_]Feature{}),
10881270 };
10891271 result[@intFromEnum(Feature.svinval)] = .{
......@@ -1101,6 +1283,11 @@ pub const all_features = blk: {
11011283 .description = "'Svpbmt' (Page-Based Memory Types)",
11021284 .dependencies = featureSet(&[_]Feature{}),
11031285 };
1286 result[@intFromEnum(Feature.svvptc)] = .{
1287 .llvm_name = "svvptc",
1288 .description = "'Svvptc' (Obviating Memory-Management Instructions after Marking PTEs Valid)",
1289 .dependencies = featureSet(&[_]Feature{}),
1290 };
11041291 result[@intFromEnum(Feature.tagged_globals)] = .{
11051292 .llvm_name = "tagged-globals",
11061293 .description = "Use an instruction sequence for taking the address of a global that allows a memory tag in the upper address bits",
......@@ -1134,6 +1321,11 @@ pub const all_features = blk: {
11341321 .description = "Ventana Veyron-Series processors",
11351322 .dependencies = featureSet(&[_]Feature{}),
11361323 };
1324 result[@intFromEnum(Feature.vxrm_pipeline_flush)] = .{
1325 .llvm_name = "vxrm-pipeline-flush",
1326 .description = "VXRM writes causes pipeline flush",
1327 .dependencies = featureSet(&[_]Feature{}),
1328 };
11371329 result[@intFromEnum(Feature.xcvalu)] = .{
11381330 .llvm_name = "xcvalu",
11391331 .description = "'XCValu' (CORE-V ALU Operations)",
......@@ -1169,6 +1361,16 @@ pub const all_features = blk: {
11691361 .description = "'XCVsimd' (CORE-V SIMD ALU)",
11701362 .dependencies = featureSet(&[_]Feature{}),
11711363 };
1364 result[@intFromEnum(Feature.xmipscmove)] = .{
1365 .llvm_name = "xmipscmove",
1366 .description = "'XMIPSCMove' (MIPS conditional move instruction(s) (ccmov))",
1367 .dependencies = featureSet(&[_]Feature{}),
1368 };
1369 result[@intFromEnum(Feature.xmipslsp)] = .{
1370 .llvm_name = "xmipslsp",
1371 .description = "'XMIPSLSP' (MIPS optimization for hardware load-store bonding)",
1372 .dependencies = featureSet(&[_]Feature{}),
1373 };
11721374 result[@intFromEnum(Feature.xsfcease)] = .{
11731375 .llvm_name = "xsfcease",
11741376 .description = "'XSfcease' (SiFive sf.cease Instruction)",
......@@ -1304,7 +1506,16 @@ pub const all_features = blk: {
13041506 result[@intFromEnum(Feature.zabha)] = .{
13051507 .llvm_name = "zabha",
13061508 .description = "'Zabha' (Byte and Halfword Atomic Memory Operations)",
1307 .dependencies = featureSet(&[_]Feature{}),
1509 .dependencies = featureSet(&[_]Feature{
1510 .zaamo,
1511 }),
1512 };
1513 result[@intFromEnum(Feature.zacas)] = .{
1514 .llvm_name = "zacas",
1515 .description = "'Zacas' (Atomic Compare-And-Swap Instructions)",
1516 .dependencies = featureSet(&[_]Feature{
1517 .zaamo,
1518 }),
13081519 };
13091520 result[@intFromEnum(Feature.zalrsc)] = .{
13101521 .llvm_name = "zalrsc",
......@@ -1535,7 +1746,7 @@ pub const all_features = blk: {
15351746 };
15361747 result[@intFromEnum(Feature.zicsr)] = .{
15371748 .llvm_name = "zicsr",
1538 .description = "'zicsr' (CSRs)",
1749 .description = "'Zicsr' (CSRs)",
15391750 .dependencies = featureSet(&[_]Feature{}),
15401751 };
15411752 result[@intFromEnum(Feature.zifencei)] = .{
......@@ -1652,7 +1863,9 @@ pub const all_features = blk: {
16521863 result[@intFromEnum(Feature.zvbc)] = .{
16531864 .llvm_name = "zvbc",
16541865 .description = "'Zvbc' (Vector Carryless Multiplication)",
1655 .dependencies = featureSet(&[_]Feature{}),
1866 .dependencies = featureSet(&[_]Feature{
1867 .zve64x,
1868 }),
16561869 };
16571870 result[@intFromEnum(Feature.zve32f)] = .{
16581871 .llvm_name = "zve32f",
......@@ -1696,7 +1909,7 @@ pub const all_features = blk: {
16961909 };
16971910 result[@intFromEnum(Feature.zvfbfmin)] = .{
16981911 .llvm_name = "zvfbfmin",
1699 .description = "'Zvbfmin' (Vector BF16 Converts)",
1912 .description = "'Zvfbfmin' (Vector BF16 Converts)",
17001913 .dependencies = featureSet(&[_]Feature{
17011914 .zve32f,
17021915 }),
......@@ -1727,12 +1940,16 @@ pub const all_features = blk: {
17271940 result[@intFromEnum(Feature.zvkb)] = .{
17281941 .llvm_name = "zvkb",
17291942 .description = "'Zvkb' (Vector Bit-manipulation used in Cryptography)",
1730 .dependencies = featureSet(&[_]Feature{}),
1943 .dependencies = featureSet(&[_]Feature{
1944 .zve32x,
1945 }),
17311946 };
17321947 result[@intFromEnum(Feature.zvkg)] = .{
17331948 .llvm_name = "zvkg",
17341949 .description = "'Zvkg' (Vector GCM instructions for Cryptography)",
1735 .dependencies = featureSet(&[_]Feature{}),
1950 .dependencies = featureSet(&[_]Feature{
1951 .zve32x,
1952 }),
17361953 };
17371954 result[@intFromEnum(Feature.zvkn)] = .{
17381955 .llvm_name = "zvkn",
......@@ -1755,11 +1972,13 @@ pub const all_features = blk: {
17551972 result[@intFromEnum(Feature.zvkned)] = .{
17561973 .llvm_name = "zvkned",
17571974 .description = "'Zvkned' (Vector AES Encryption & Decryption (Single Round))",
1758 .dependencies = featureSet(&[_]Feature{}),
1975 .dependencies = featureSet(&[_]Feature{
1976 .zve32x,
1977 }),
17591978 };
17601979 result[@intFromEnum(Feature.zvkng)] = .{
17611980 .llvm_name = "zvkng",
1762 .description = "'zvkng' (shorthand for 'Zvkn' and 'Zvkg')",
1981 .description = "'Zvkng' (shorthand for 'Zvkn' and 'Zvkg')",
17631982 .dependencies = featureSet(&[_]Feature{
17641983 .zvkg,
17651984 .zvkn,
......@@ -1768,7 +1987,9 @@ pub const all_features = blk: {
17681987 result[@intFromEnum(Feature.zvknha)] = .{
17691988 .llvm_name = "zvknha",
17701989 .description = "'Zvknha' (Vector SHA-2 (SHA-256 only))",
1771 .dependencies = featureSet(&[_]Feature{}),
1990 .dependencies = featureSet(&[_]Feature{
1991 .zve32x,
1992 }),
17721993 };
17731994 result[@intFromEnum(Feature.zvknhb)] = .{
17741995 .llvm_name = "zvknhb",
......@@ -1798,7 +2019,9 @@ pub const all_features = blk: {
17982019 result[@intFromEnum(Feature.zvksed)] = .{
17992020 .llvm_name = "zvksed",
18002021 .description = "'Zvksed' (SM4 Block Cipher Instructions)",
1801 .dependencies = featureSet(&[_]Feature{}),
2022 .dependencies = featureSet(&[_]Feature{
2023 .zve32x,
2024 }),
18022025 };
18032026 result[@intFromEnum(Feature.zvksg)] = .{
18042027 .llvm_name = "zvksg",
......@@ -1811,7 +2034,9 @@ pub const all_features = blk: {
18112034 result[@intFromEnum(Feature.zvksh)] = .{
18122035 .llvm_name = "zvksh",
18132036 .description = "'Zvksh' (SM3 Hash Function Instructions)",
1814 .dependencies = featureSet(&[_]Feature{}),
2037 .dependencies = featureSet(&[_]Feature{
2038 .zve32x,
2039 }),
18152040 };
18162041 result[@intFromEnum(Feature.zvkt)] = .{
18172042 .llvm_name = "zvkt",
......@@ -1820,82 +2045,82 @@ pub const all_features = blk: {
18202045 };
18212046 result[@intFromEnum(Feature.zvl1024b)] = .{
18222047 .llvm_name = "zvl1024b",
1823 .description = "'Zvl' (Minimum Vector Length) 1024",
2048 .description = "'Zvl1024b' (Minimum Vector Length 1024)",
18242049 .dependencies = featureSet(&[_]Feature{
18252050 .zvl512b,
18262051 }),
18272052 };
18282053 result[@intFromEnum(Feature.zvl128b)] = .{
18292054 .llvm_name = "zvl128b",
1830 .description = "'Zvl' (Minimum Vector Length) 128",
2055 .description = "'Zvl128b' (Minimum Vector Length 128)",
18312056 .dependencies = featureSet(&[_]Feature{
18322057 .zvl64b,
18332058 }),
18342059 };
18352060 result[@intFromEnum(Feature.zvl16384b)] = .{
18362061 .llvm_name = "zvl16384b",
1837 .description = "'Zvl' (Minimum Vector Length) 16384",
2062 .description = "'Zvl16384b' (Minimum Vector Length 16384)",
18382063 .dependencies = featureSet(&[_]Feature{
18392064 .zvl8192b,
18402065 }),
18412066 };
18422067 result[@intFromEnum(Feature.zvl2048b)] = .{
18432068 .llvm_name = "zvl2048b",
1844 .description = "'Zvl' (Minimum Vector Length) 2048",
2069 .description = "'Zvl2048b' (Minimum Vector Length 2048)",
18452070 .dependencies = featureSet(&[_]Feature{
18462071 .zvl1024b,
18472072 }),
18482073 };
18492074 result[@intFromEnum(Feature.zvl256b)] = .{
18502075 .llvm_name = "zvl256b",
1851 .description = "'Zvl' (Minimum Vector Length) 256",
2076 .description = "'Zvl256b' (Minimum Vector Length 256)",
18522077 .dependencies = featureSet(&[_]Feature{
18532078 .zvl128b,
18542079 }),
18552080 };
18562081 result[@intFromEnum(Feature.zvl32768b)] = .{
18572082 .llvm_name = "zvl32768b",
1858 .description = "'Zvl' (Minimum Vector Length) 32768",
2083 .description = "'Zvl32768b' (Minimum Vector Length 32768)",
18592084 .dependencies = featureSet(&[_]Feature{
18602085 .zvl16384b,
18612086 }),
18622087 };
18632088 result[@intFromEnum(Feature.zvl32b)] = .{
18642089 .llvm_name = "zvl32b",
1865 .description = "'Zvl' (Minimum Vector Length) 32",
2090 .description = "'Zvl32b' (Minimum Vector Length 32)",
18662091 .dependencies = featureSet(&[_]Feature{}),
18672092 };
18682093 result[@intFromEnum(Feature.zvl4096b)] = .{
18692094 .llvm_name = "zvl4096b",
1870 .description = "'Zvl' (Minimum Vector Length) 4096",
2095 .description = "'Zvl4096b' (Minimum Vector Length 4096)",
18712096 .dependencies = featureSet(&[_]Feature{
18722097 .zvl2048b,
18732098 }),
18742099 };
18752100 result[@intFromEnum(Feature.zvl512b)] = .{
18762101 .llvm_name = "zvl512b",
1877 .description = "'Zvl' (Minimum Vector Length) 512",
2102 .description = "'Zvl512b' (Minimum Vector Length 512)",
18782103 .dependencies = featureSet(&[_]Feature{
18792104 .zvl256b,
18802105 }),
18812106 };
18822107 result[@intFromEnum(Feature.zvl64b)] = .{
18832108 .llvm_name = "zvl64b",
1884 .description = "'Zvl' (Minimum Vector Length) 64",
2109 .description = "'Zvl64b' (Minimum Vector Length 64)",
18852110 .dependencies = featureSet(&[_]Feature{
18862111 .zvl32b,
18872112 }),
18882113 };
18892114 result[@intFromEnum(Feature.zvl65536b)] = .{
18902115 .llvm_name = "zvl65536b",
1891 .description = "'Zvl' (Minimum Vector Length) 65536",
2116 .description = "'Zvl65536b' (Minimum Vector Length 65536)",
18922117 .dependencies = featureSet(&[_]Feature{
18932118 .zvl32768b,
18942119 }),
18952120 };
18962121 result[@intFromEnum(Feature.zvl8192b)] = .{
18972122 .llvm_name = "zvl8192b",
1898 .description = "'Zvl' (Minimum Vector Length) 8192",
2123 .description = "'Zvl8192b' (Minimum Vector Length 8192)",
18992124 .dependencies = featureSet(&[_]Feature{
19002125 .zvl4096b,
19012126 }),
......@@ -1944,6 +2169,7 @@ pub const cpu = struct {
19442169 .features = featureSet(&[_]Feature{
19452170 .@"32bit",
19462171 .i,
2172 .optimized_nf2_segment_load_store,
19472173 }),
19482174 };
19492175 pub const generic_rv64: CpuModel = .{
......@@ -1952,6 +2178,25 @@ pub const cpu = struct {
19522178 .features = featureSet(&[_]Feature{
19532179 .@"64bit",
19542180 .i,
2181 .optimized_nf2_segment_load_store,
2182 }),
2183 };
2184 pub const mips_p8700: CpuModel = .{
2185 .name = "mips_p8700",
2186 .llvm_name = "mips-p8700",
2187 .features = featureSet(&[_]Feature{
2188 .@"64bit",
2189 .a,
2190 .c,
2191 .d,
2192 .i,
2193 .m,
2194 .mips_p8700,
2195 .xmipscmove,
2196 .xmipslsp,
2197 .zba,
2198 .zbb,
2199 .zifencei,
19552200 }),
19562201 };
19572202 pub const rocket: CpuModel = .{
......@@ -1979,6 +2224,25 @@ pub const cpu = struct {
19792224 .zifencei,
19802225 }),
19812226 };
2227 pub const rp2350_hazard3: CpuModel = .{
2228 .name = "rp2350_hazard3",
2229 .llvm_name = "rp2350-hazard3",
2230 .features = featureSet(&[_]Feature{
2231 .@"32bit",
2232 .a,
2233 .c,
2234 .i,
2235 .m,
2236 .zba,
2237 .zbb,
2238 .zbkb,
2239 .zbs,
2240 .zcb,
2241 .zcmp,
2242 .zicsr,
2243 .zifencei,
2244 }),
2245 };
19822246 pub const sifive_7_series: CpuModel = .{
19832247 .name = "sifive_7_series",
19842248 .llvm_name = "sifive-7-series",
......@@ -2075,6 +2339,7 @@ pub const cpu = struct {
20752339 .@"64bit",
20762340 .a,
20772341 .auipc_addi_fusion,
2342 .b,
20782343 .c,
20792344 .conditional_cmv_fusion,
20802345 .d,
......@@ -2086,9 +2351,6 @@ pub const cpu = struct {
20862351 .unaligned_vector_mem,
20872352 .use_postra_scheduler,
20882353 .za64rs,
2089 .zba,
2090 .zbb,
2091 .zbs,
20922354 .zfhmin,
20932355 .zic64b,
20942356 .zicbom,
......@@ -2098,10 +2360,77 @@ pub const cpu = struct {
20982360 .ziccif,
20992361 .zicclsm,
21002362 .ziccrse,
2363 .zicntr,
2364 .zifencei,
2365 .zihintntl,
2366 .zihintpause,
2367 .zihpm,
2368 .zkt,
2369 }),
2370 };
2371 pub const sifive_p470: CpuModel = .{
2372 .name = "sifive_p470",
2373 .llvm_name = "sifive-p470",
2374 .features = featureSet(&[_]Feature{
2375 .@"64bit",
2376 .a,
2377 .auipc_addi_fusion,
2378 .b,
2379 .c,
2380 .conditional_cmv_fusion,
2381 .i,
2382 .lui_addi_fusion,
2383 .m,
2384 .no_default_unroll,
2385 .no_sink_splat_operands,
2386 .unaligned_scalar_mem,
2387 .unaligned_vector_mem,
2388 .use_postra_scheduler,
2389 .v,
2390 .vxrm_pipeline_flush,
2391 .xsifivecdiscarddlone,
2392 .xsifivecflushdlone,
2393 .za64rs,
2394 .zfhmin,
2395 .zic64b,
2396 .zicbom,
2397 .zicbop,
2398 .zicboz,
2399 .ziccamoa,
2400 .ziccif,
2401 .zicclsm,
2402 .ziccrse,
2403 .zicntr,
21012404 .zifencei,
21022405 .zihintntl,
21032406 .zihintpause,
21042407 .zihpm,
2408 .zkt,
2409 .zvbb,
2410 .zvknc,
2411 .zvkng,
2412 .zvksc,
2413 .zvksg,
2414 }),
2415 };
2416 pub const sifive_p550: CpuModel = .{
2417 .name = "sifive_p550",
2418 .llvm_name = "sifive-p550",
2419 .features = featureSet(&[_]Feature{
2420 .@"64bit",
2421 .a,
2422 .auipc_addi_fusion,
2423 .c,
2424 .conditional_cmv_fusion,
2425 .d,
2426 .i,
2427 .lui_addi_fusion,
2428 .m,
2429 .no_default_unroll,
2430 .use_postra_scheduler,
2431 .zba,
2432 .zbb,
2433 .zifencei,
21052434 }),
21062435 };
21072436 pub const sifive_p670: CpuModel = .{
......@@ -2111,6 +2440,7 @@ pub const cpu = struct {
21112440 .@"64bit",
21122441 .a,
21132442 .auipc_addi_fusion,
2443 .b,
21142444 .c,
21152445 .conditional_cmv_fusion,
21162446 .i,
......@@ -2122,10 +2452,8 @@ pub const cpu = struct {
21222452 .unaligned_vector_mem,
21232453 .use_postra_scheduler,
21242454 .v,
2455 .vxrm_pipeline_flush,
21252456 .za64rs,
2126 .zba,
2127 .zbb,
2128 .zbs,
21292457 .zfhmin,
21302458 .zic64b,
21312459 .zicbom,
......@@ -2135,10 +2463,12 @@ pub const cpu = struct {
21352463 .ziccif,
21362464 .zicclsm,
21372465 .ziccrse,
2466 .zicntr,
21382467 .zifencei,
21392468 .zihintntl,
21402469 .zihintpause,
21412470 .zihpm,
2471 .zkt,
21422472 .zvbb,
21432473 .zvknc,
21442474 .zvkng,
......@@ -2242,6 +2572,7 @@ pub const cpu = struct {
22422572 .i,
22432573 .m,
22442574 .no_default_unroll,
2575 .optimized_nf2_segment_load_store,
22452576 .optimized_zero_stride_load,
22462577 .short_forward_branch_opt,
22472578 .use_postra_scheduler,
......@@ -2260,10 +2591,14 @@ pub const cpu = struct {
22602591 .features = featureSet(&[_]Feature{
22612592 .@"64bit",
22622593 .a,
2594 .b,
22632595 .c,
22642596 .dlen_factor_2,
22652597 .i,
22662598 .m,
2599 .optimized_nf2_segment_load_store,
2600 .optimized_nf3_segment_load_store,
2601 .optimized_nf4_segment_load_store,
22672602 .ssccptr,
22682603 .sscofpmf,
22692604 .sscounterenw,
......@@ -2275,13 +2610,12 @@ pub const cpu = struct {
22752610 .svinval,
22762611 .svnapot,
22772612 .svpbmt,
2613 .unaligned_scalar_mem,
22782614 .v,
2615 .vxrm_pipeline_flush,
22792616 .za64rs,
2280 .zba,
2281 .zbb,
22822617 .zbc,
22832618 .zbkc,
2284 .zbs,
22852619 .zfh,
22862620 .zic64b,
22872621 .zicbom,
......@@ -2356,6 +2690,149 @@ pub const cpu = struct {
23562690 .zifencei,
23572691 }),
23582692 };
2693 pub const syntacore_scr4_rv32: CpuModel = .{
2694 .name = "syntacore_scr4_rv32",
2695 .llvm_name = "syntacore-scr4-rv32",
2696 .features = featureSet(&[_]Feature{
2697 .@"32bit",
2698 .c,
2699 .d,
2700 .i,
2701 .m,
2702 .no_default_unroll,
2703 .use_postra_scheduler,
2704 .zifencei,
2705 }),
2706 };
2707 pub const syntacore_scr4_rv64: CpuModel = .{
2708 .name = "syntacore_scr4_rv64",
2709 .llvm_name = "syntacore-scr4-rv64",
2710 .features = featureSet(&[_]Feature{
2711 .@"64bit",
2712 .a,
2713 .c,
2714 .d,
2715 .i,
2716 .m,
2717 .no_default_unroll,
2718 .use_postra_scheduler,
2719 .zifencei,
2720 }),
2721 };
2722 pub const syntacore_scr5_rv32: CpuModel = .{
2723 .name = "syntacore_scr5_rv32",
2724 .llvm_name = "syntacore-scr5-rv32",
2725 .features = featureSet(&[_]Feature{
2726 .@"32bit",
2727 .a,
2728 .c,
2729 .d,
2730 .i,
2731 .m,
2732 .no_default_unroll,
2733 .use_postra_scheduler,
2734 .zifencei,
2735 }),
2736 };
2737 pub const syntacore_scr5_rv64: CpuModel = .{
2738 .name = "syntacore_scr5_rv64",
2739 .llvm_name = "syntacore-scr5-rv64",
2740 .features = featureSet(&[_]Feature{
2741 .@"64bit",
2742 .a,
2743 .c,
2744 .d,
2745 .i,
2746 .m,
2747 .no_default_unroll,
2748 .use_postra_scheduler,
2749 .zifencei,
2750 }),
2751 };
2752 pub const syntacore_scr7: CpuModel = .{
2753 .name = "syntacore_scr7",
2754 .llvm_name = "syntacore-scr7",
2755 .features = featureSet(&[_]Feature{
2756 .@"64bit",
2757 .a,
2758 .c,
2759 .i,
2760 .m,
2761 .no_default_unroll,
2762 .use_postra_scheduler,
2763 .v,
2764 .zba,
2765 .zbb,
2766 .zbc,
2767 .zbs,
2768 .zifencei,
2769 .zkn,
2770 }),
2771 };
2772 pub const tt_ascalon_d8: CpuModel = .{
2773 .name = "tt_ascalon_d8",
2774 .llvm_name = "tt-ascalon-d8",
2775 .features = featureSet(&[_]Feature{
2776 .@"64bit",
2777 .a,
2778 .b,
2779 .c,
2780 .i,
2781 .m,
2782 .no_default_unroll,
2783 .optimized_zero_stride_load,
2784 .sha,
2785 .smaia,
2786 .ssaia,
2787 .ssccptr,
2788 .sscofpmf,
2789 .sscounterenw,
2790 .ssnpm,
2791 .ssstrict,
2792 .sstc,
2793 .sstvala,
2794 .sstvecd,
2795 .ssu64xl,
2796 .supm,
2797 .svade,
2798 .svbare,
2799 .svinval,
2800 .svnapot,
2801 .svpbmt,
2802 .unaligned_scalar_mem,
2803 .unaligned_vector_mem,
2804 .use_postra_scheduler,
2805 .v,
2806 .za64rs,
2807 .zawrs,
2808 .zcb,
2809 .zcmop,
2810 .zfa,
2811 .zfh,
2812 .zic64b,
2813 .zicbom,
2814 .zicbop,
2815 .zicboz,
2816 .ziccamoa,
2817 .ziccif,
2818 .zicclsm,
2819 .ziccrse,
2820 .zicntr,
2821 .zicond,
2822 .zifencei,
2823 .zihintntl,
2824 .zihintpause,
2825 .zihpm,
2826 .zimop,
2827 .zkt,
2828 .zvbb,
2829 .zvbc,
2830 .zvfbfwma,
2831 .zvfh,
2832 .zvkng,
2833 .zvl256b,
2834 }),
2835 };
23592836 pub const veyron_v1: CpuModel = .{
23602837 .name = "veyron_v1",
23612838 .llvm_name = "veyron-v1",
lib/std/Target/s390x.zig+82
......@@ -7,6 +7,7 @@ const CpuModel = std.Target.Cpu.Model;
77pub const Feature = enum {
88 backchain,
99 bear_enhancement,
10 concurrent_functions,
1011 deflate_conversion,
1112 dfp_packed_conversion,
1213 dfp_zoned_conversion,
......@@ -24,6 +25,7 @@ pub const Feature = enum {
2425 load_and_zero_rightmost_byte,
2526 load_store_on_cond,
2627 load_store_on_cond_2,
28 message_security_assist_extension12,
2729 message_security_assist_extension3,
2830 message_security_assist_extension4,
2931 message_security_assist_extension5,
......@@ -33,6 +35,7 @@ pub const Feature = enum {
3335 miscellaneous_extensions,
3436 miscellaneous_extensions_2,
3537 miscellaneous_extensions_3,
38 miscellaneous_extensions_4,
3639 nnp_assist,
3740 population_count,
3841 processor_activity_instrumentation,
......@@ -46,9 +49,11 @@ pub const Feature = enum {
4649 vector,
4750 vector_enhancements_1,
4851 vector_enhancements_2,
52 vector_enhancements_3,
4953 vector_packed_decimal,
5054 vector_packed_decimal_enhancement,
5155 vector_packed_decimal_enhancement_2,
56 vector_packed_decimal_enhancement_3,
5257};
5358
5459pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet;
......@@ -70,6 +75,11 @@ pub const all_features = blk: {
7075 .description = "Assume that the BEAR-enhancement facility is installed",
7176 .dependencies = featureSet(&[_]Feature{}),
7277 };
78 result[@intFromEnum(Feature.concurrent_functions)] = .{
79 .llvm_name = "concurrent-functions",
80 .description = "Assume that the concurrent-functions facility is installed",
81 .dependencies = featureSet(&[_]Feature{}),
82 };
7383 result[@intFromEnum(Feature.deflate_conversion)] = .{
7484 .llvm_name = "deflate-conversion",
7585 .description = "Assume that the deflate-conversion facility is installed",
......@@ -155,6 +165,11 @@ pub const all_features = blk: {
155165 .description = "Assume that the load/store-on-condition facility 2 is installed",
156166 .dependencies = featureSet(&[_]Feature{}),
157167 };
168 result[@intFromEnum(Feature.message_security_assist_extension12)] = .{
169 .llvm_name = "message-security-assist-extension12",
170 .description = "Assume that the message-security-assist extension facility 12 is installed",
171 .dependencies = featureSet(&[_]Feature{}),
172 };
158173 result[@intFromEnum(Feature.message_security_assist_extension3)] = .{
159174 .llvm_name = "message-security-assist-extension3",
160175 .description = "Assume that the message-security-assist extension facility 3 is installed",
......@@ -200,6 +215,11 @@ pub const all_features = blk: {
200215 .description = "Assume that the miscellaneous-extensions facility 3 is installed",
201216 .dependencies = featureSet(&[_]Feature{}),
202217 };
218 result[@intFromEnum(Feature.miscellaneous_extensions_4)] = .{
219 .llvm_name = "miscellaneous-extensions-4",
220 .description = "Assume that the miscellaneous-extensions facility 4 is installed",
221 .dependencies = featureSet(&[_]Feature{}),
222 };
203223 result[@intFromEnum(Feature.nnp_assist)] = .{
204224 .llvm_name = "nnp-assist",
205225 .description = "Assume that the NNP-assist facility is installed",
......@@ -265,6 +285,11 @@ pub const all_features = blk: {
265285 .description = "Assume that the vector enhancements facility 2 is installed",
266286 .dependencies = featureSet(&[_]Feature{}),
267287 };
288 result[@intFromEnum(Feature.vector_enhancements_3)] = .{
289 .llvm_name = "vector-enhancements-3",
290 .description = "Assume that the vector enhancements facility 3 is installed",
291 .dependencies = featureSet(&[_]Feature{}),
292 };
268293 result[@intFromEnum(Feature.vector_packed_decimal)] = .{
269294 .llvm_name = "vector-packed-decimal",
270295 .description = "Assume that the vector packed decimal facility is installed",
......@@ -280,6 +305,11 @@ pub const all_features = blk: {
280305 .description = "Assume that the vector packed decimal enhancement facility 2 is installed",
281306 .dependencies = featureSet(&[_]Feature{}),
282307 };
308 result[@intFromEnum(Feature.vector_packed_decimal_enhancement_3)] = .{
309 .llvm_name = "vector-packed-decimal-enhancement-3",
310 .description = "Assume that the vector packed decimal enhancement facility 3 is installed",
311 .dependencies = featureSet(&[_]Feature{}),
312 };
283313 const ti = @typeInfo(Feature);
284314 for (&result, 0..) |*elem, i| {
285315 elem.index = i;
......@@ -465,6 +495,58 @@ pub const cpu = struct {
465495 .vector_packed_decimal_enhancement_2,
466496 }),
467497 };
498 pub const arch15: CpuModel = .{
499 .name = "arch15",
500 .llvm_name = "arch15",
501 .features = featureSet(&[_]Feature{
502 .bear_enhancement,
503 .concurrent_functions,
504 .deflate_conversion,
505 .dfp_packed_conversion,
506 .dfp_zoned_conversion,
507 .distinct_ops,
508 .enhanced_dat_2,
509 .enhanced_sort,
510 .execution_hint,
511 .fast_serialization,
512 .fp_extension,
513 .guarded_storage,
514 .high_word,
515 .insert_reference_bits_multiple,
516 .interlocked_access1,
517 .load_and_trap,
518 .load_and_zero_rightmost_byte,
519 .load_store_on_cond,
520 .load_store_on_cond_2,
521 .message_security_assist_extension12,
522 .message_security_assist_extension3,
523 .message_security_assist_extension4,
524 .message_security_assist_extension5,
525 .message_security_assist_extension7,
526 .message_security_assist_extension8,
527 .message_security_assist_extension9,
528 .miscellaneous_extensions,
529 .miscellaneous_extensions_2,
530 .miscellaneous_extensions_3,
531 .miscellaneous_extensions_4,
532 .nnp_assist,
533 .population_count,
534 .processor_activity_instrumentation,
535 .processor_assist,
536 .reset_dat_protection,
537 .reset_reference_bits_multiple,
538 .test_pending_external_interruption,
539 .transactional_execution,
540 .vector,
541 .vector_enhancements_1,
542 .vector_enhancements_2,
543 .vector_enhancements_3,
544 .vector_packed_decimal,
545 .vector_packed_decimal_enhancement,
546 .vector_packed_decimal_enhancement_2,
547 .vector_packed_decimal_enhancement_3,
548 }),
549 };
468550 pub const arch8: CpuModel = .{
469551 .name = "arch8",
470552 .llvm_name = "arch8",
lib/std/Target/sparc.zig+36
......@@ -7,6 +7,11 @@ const CpuModel = std.Target.Cpu.Model;
77pub const Feature = enum {
88 deprecated_v8,
99 detectroundchange,
10 fix_tn0009,
11 fix_tn0010,
12 fix_tn0011,
13 fix_tn0012,
14 fix_tn0013,
1015 fixallfdivsqrt,
1116 hard_quad_float,
1217 hasleoncasa,
......@@ -48,6 +53,7 @@ pub const Feature = enum {
4853 slow_rdpc,
4954 soft_float,
5055 soft_mul_div,
56 v8plus,
5157 v9,
5258 vis,
5359 vis2,
......@@ -73,6 +79,31 @@ pub const all_features = blk: {
7379 .description = "LEON3 erratum detection: Detects any rounding mode change request: use only the round-to-nearest rounding mode",
7480 .dependencies = featureSet(&[_]Feature{}),
7581 };
82 result[@intFromEnum(Feature.fix_tn0009)] = .{
83 .llvm_name = "fix-tn0009",
84 .description = "Enable workaround for errata described in GRLIB-TN-0009",
85 .dependencies = featureSet(&[_]Feature{}),
86 };
87 result[@intFromEnum(Feature.fix_tn0010)] = .{
88 .llvm_name = "fix-tn0010",
89 .description = "Enable workaround for errata described in GRLIB-TN-0010",
90 .dependencies = featureSet(&[_]Feature{}),
91 };
92 result[@intFromEnum(Feature.fix_tn0011)] = .{
93 .llvm_name = "fix-tn0011",
94 .description = "Enable workaround for errata described in GRLIB-TN-0011",
95 .dependencies = featureSet(&[_]Feature{}),
96 };
97 result[@intFromEnum(Feature.fix_tn0012)] = .{
98 .llvm_name = "fix-tn0012",
99 .description = "Enable workaround for errata described in GRLIB-TN-0012",
100 .dependencies = featureSet(&[_]Feature{}),
101 };
102 result[@intFromEnum(Feature.fix_tn0013)] = .{
103 .llvm_name = "fix-tn0013",
104 .description = "Enable workaround for errata described in GRLIB-TN-0013",
105 .dependencies = featureSet(&[_]Feature{}),
106 };
76107 result[@intFromEnum(Feature.fixallfdivsqrt)] = .{
77108 .llvm_name = "fixallfdivsqrt",
78109 .description = "LEON erratum fix: Fix FDIVS/FDIVD/FSQRTS/FSQRTD instructions with NOPs and floating-point store",
......@@ -280,6 +311,11 @@ pub const all_features = blk: {
280311 .description = "Use software emulation for integer multiply and divide",
281312 .dependencies = featureSet(&[_]Feature{}),
282313 };
314 result[@intFromEnum(Feature.v8plus)] = .{
315 .llvm_name = "v8plus",
316 .description = "Enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code",
317 .dependencies = featureSet(&[_]Feature{}),
318 };
283319 result[@intFromEnum(Feature.v9)] = .{
284320 .llvm_name = "v9",
285321 .description = "Enable SPARC-V9 instructions",
lib/std/Target/wasm.zig+34-9
......@@ -7,9 +7,11 @@ const CpuModel = std.Target.Cpu.Model;
77pub const Feature = enum {
88 atomics,
99 bulk_memory,
10 bulk_memory_opt,
11 call_indirect_overlong,
1012 exception_handling,
1113 extended_const,
12 half_precision,
14 fp16,
1315 multimemory,
1416 multivalue,
1517 mutable_globals,
......@@ -20,6 +22,7 @@ pub const Feature = enum {
2022 sign_ext,
2123 simd128,
2224 tail_call,
25 wide_arithmetic,
2326};
2427
2528pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet;
......@@ -39,6 +42,18 @@ pub const all_features = blk: {
3942 result[@intFromEnum(Feature.bulk_memory)] = .{
4043 .llvm_name = "bulk-memory",
4144 .description = "Enable bulk memory operations",
45 .dependencies = featureSet(&[_]Feature{
46 .bulk_memory_opt,
47 }),
48 };
49 result[@intFromEnum(Feature.bulk_memory_opt)] = .{
50 .llvm_name = "bulk-memory-opt",
51 .description = "Enable bulk memory optimization operations",
52 .dependencies = featureSet(&[_]Feature{}),
53 };
54 result[@intFromEnum(Feature.call_indirect_overlong)] = .{
55 .llvm_name = "call-indirect-overlong",
56 .description = "Enable overlong encoding for call_indirect immediates",
4257 .dependencies = featureSet(&[_]Feature{}),
4358 };
4459 result[@intFromEnum(Feature.exception_handling)] = .{
......@@ -51,9 +66,9 @@ pub const all_features = blk: {
5166 .description = "Enable extended const expressions",
5267 .dependencies = featureSet(&[_]Feature{}),
5368 };
54 result[@intFromEnum(Feature.half_precision)] = .{
55 .llvm_name = "half-precision",
56 .description = "Enable half precision instructions",
69 result[@intFromEnum(Feature.fp16)] = .{
70 .llvm_name = "fp16",
71 .description = "Enable FP16 instructions",
5772 .dependencies = featureSet(&[_]Feature{}),
5873 };
5974 result[@intFromEnum(Feature.multimemory)] = .{
......@@ -75,7 +90,7 @@ pub const all_features = blk: {
7590 .llvm_name = null,
7691 .description = "Bulk memory operations with a zero length do not trap",
7792 .dependencies = featureSet(&[_]Feature{
78 .bulk_memory,
93 .bulk_memory_opt,
7994 }),
8095 };
8196 result[@intFromEnum(Feature.nontrapping_fptoint)] = .{
......@@ -86,7 +101,9 @@ pub const all_features = blk: {
86101 result[@intFromEnum(Feature.reference_types)] = .{
87102 .llvm_name = "reference-types",
88103 .description = "Enable reference types",
89 .dependencies = featureSet(&[_]Feature{}),
104 .dependencies = featureSet(&[_]Feature{
105 .call_indirect_overlong,
106 }),
90107 };
91108 result[@intFromEnum(Feature.relaxed_simd)] = .{
92109 .llvm_name = "relaxed-simd",
......@@ -108,6 +125,11 @@ pub const all_features = blk: {
108125 .description = "Enable tail call instructions",
109126 .dependencies = featureSet(&[_]Feature{}),
110127 };
128 result[@intFromEnum(Feature.wide_arithmetic)] = .{
129 .llvm_name = "wide-arithmetic",
130 .description = "Enable wide-arithmetic instructions",
131 .dependencies = featureSet(&[_]Feature{}),
132 };
111133 const ti = @typeInfo(Feature);
112134 for (&result, 0..) |*elem, i| {
113135 elem.index = i;
......@@ -125,7 +147,7 @@ pub const cpu = struct {
125147 .bulk_memory,
126148 .exception_handling,
127149 .extended_const,
128 .half_precision,
150 .fp16,
129151 .multimemory,
130152 .multivalue,
131153 .mutable_globals,
......@@ -141,17 +163,20 @@ pub const cpu = struct {
141163 .name = "generic",
142164 .llvm_name = "generic",
143165 .features = featureSet(&[_]Feature{
166 .bulk_memory,
144167 .multivalue,
145168 .mutable_globals,
169 .nontrapping_fptoint,
146170 .reference_types,
147171 .sign_ext,
148172 }),
149173 };
150174 pub const lime1: CpuModel = .{
151175 .name = "lime1",
152 .llvm_name = null,
176 .llvm_name = "lime1",
153177 .features = featureSet(&[_]Feature{
154 .bulk_memory,
178 .bulk_memory_opt,
179 .call_indirect_overlong,
155180 .extended_const,
156181 .multivalue,
157182 .mutable_globals,
lib/std/Target/x86.zig+163
......@@ -13,14 +13,21 @@ pub const Feature = enum {
1313 adx,
1414 aes,
1515 allow_light_256_bit,
16 amx_avx512,
1617 amx_bf16,
1718 amx_complex,
1819 amx_fp16,
20 amx_fp8,
1921 amx_int8,
22 amx_movrs,
23 amx_tf32,
2024 amx_tile,
25 amx_transpose,
2126 avx,
2227 avx10_1_256,
2328 avx10_1_512,
29 avx10_2_256,
30 avx10_2_512,
2431 avx2,
2532 avx512bf16,
2633 avx512bitalg,
......@@ -114,6 +121,7 @@ pub const Feature = enum {
114121 movbe,
115122 movdir64b,
116123 movdiri,
124 movrs,
117125 mwaitx,
118126 ndd,
119127 nf,
......@@ -257,6 +265,13 @@ pub const all_features = blk: {
257265 .description = "Enable generation of 256-bit load/stores even if we prefer 128-bit",
258266 .dependencies = featureSet(&[_]Feature{}),
259267 };
268 result[@intFromEnum(Feature.amx_avx512)] = .{
269 .llvm_name = "amx-avx512",
270 .description = "Support AMX-AVX512 instructions",
271 .dependencies = featureSet(&[_]Feature{
272 .amx_tile,
273 }),
274 };
260275 result[@intFromEnum(Feature.amx_bf16)] = .{
261276 .llvm_name = "amx-bf16",
262277 .description = "Support AMX-BF16 instructions",
......@@ -278,6 +293,13 @@ pub const all_features = blk: {
278293 .amx_tile,
279294 }),
280295 };
296 result[@intFromEnum(Feature.amx_fp8)] = .{
297 .llvm_name = "amx-fp8",
298 .description = "Support AMX-FP8 instructions",
299 .dependencies = featureSet(&[_]Feature{
300 .amx_tile,
301 }),
302 };
281303 result[@intFromEnum(Feature.amx_int8)] = .{
282304 .llvm_name = "amx-int8",
283305 .description = "Support AMX-INT8 instructions",
......@@ -285,11 +307,32 @@ pub const all_features = blk: {
285307 .amx_tile,
286308 }),
287309 };
310 result[@intFromEnum(Feature.amx_movrs)] = .{
311 .llvm_name = "amx-movrs",
312 .description = "Support AMX-MOVRS instructions",
313 .dependencies = featureSet(&[_]Feature{
314 .amx_tile,
315 }),
316 };
317 result[@intFromEnum(Feature.amx_tf32)] = .{
318 .llvm_name = "amx-tf32",
319 .description = "Support AMX-TF32 instructions",
320 .dependencies = featureSet(&[_]Feature{
321 .amx_tile,
322 }),
323 };
288324 result[@intFromEnum(Feature.amx_tile)] = .{
289325 .llvm_name = "amx-tile",
290326 .description = "Support AMX-TILE instructions",
291327 .dependencies = featureSet(&[_]Feature{}),
292328 };
329 result[@intFromEnum(Feature.amx_transpose)] = .{
330 .llvm_name = "amx-transpose",
331 .description = "Support AMX amx-transpose instructions",
332 .dependencies = featureSet(&[_]Feature{
333 .amx_tile,
334 }),
335 };
293336 result[@intFromEnum(Feature.avx)] = .{
294337 .llvm_name = "avx",
295338 .description = "Enable AVX instructions",
......@@ -322,6 +365,21 @@ pub const all_features = blk: {
322365 .evex512,
323366 }),
324367 };
368 result[@intFromEnum(Feature.avx10_2_256)] = .{
369 .llvm_name = "avx10.2-256",
370 .description = "Support AVX10.2 up to 256-bit instruction",
371 .dependencies = featureSet(&[_]Feature{
372 .avx10_1_256,
373 }),
374 };
375 result[@intFromEnum(Feature.avx10_2_512)] = .{
376 .llvm_name = "avx10.2-512",
377 .description = "Support AVX10.2 up to 512-bit instruction",
378 .dependencies = featureSet(&[_]Feature{
379 .avx10_1_512,
380 .avx10_2_256,
381 }),
382 };
325383 result[@intFromEnum(Feature.avx2)] = .{
326384 .llvm_name = "avx2",
327385 .description = "Enable AVX2 instructions",
......@@ -848,6 +906,11 @@ pub const all_features = blk: {
848906 .description = "Support movdiri instruction (direct store integer)",
849907 .dependencies = featureSet(&[_]Feature{}),
850908 };
909 result[@intFromEnum(Feature.movrs)] = .{
910 .llvm_name = "movrs",
911 .description = "Enable MOVRS",
912 .dependencies = featureSet(&[_]Feature{}),
913 };
851914 result[@intFromEnum(Feature.mwaitx)] = .{
852915 .llvm_name = "mwaitx",
853916 .description = "Enable MONITORX/MWAITX timer functionality",
......@@ -2412,6 +2475,106 @@ pub const cpu = struct {
24122475 .x87,
24132476 }),
24142477 };
2478 pub const diamondrapids: CpuModel = .{
2479 .name = "diamondrapids",
2480 .llvm_name = "diamondrapids",
2481 .features = featureSet(&[_]Feature{
2482 .@"64bit",
2483 .adx,
2484 .allow_light_256_bit,
2485 .amx_avx512,
2486 .amx_bf16,
2487 .amx_complex,
2488 .amx_fp16,
2489 .amx_fp8,
2490 .amx_int8,
2491 .amx_movrs,
2492 .amx_tf32,
2493 .amx_transpose,
2494 .avx10_2_512,
2495 .avxifma,
2496 .avxneconvert,
2497 .avxvnni,
2498 .avxvnniint16,
2499 .avxvnniint8,
2500 .bmi,
2501 .bmi2,
2502 .branch_hint,
2503 .ccmp,
2504 .cf,
2505 .cldemote,
2506 .clflushopt,
2507 .clwb,
2508 .cmov,
2509 .cmpccxadd,
2510 .cx16,
2511 .egpr,
2512 .enqcmd,
2513 .ermsb,
2514 .false_deps_getmant,
2515 .false_deps_mulc,
2516 .false_deps_mullq,
2517 .false_deps_perm,
2518 .false_deps_range,
2519 .fast_15bytenop,
2520 .fast_gather,
2521 .fast_scalar_fsqrt,
2522 .fast_shld_rotate,
2523 .fast_variable_crosslane_shuffle,
2524 .fast_variable_perlane_shuffle,
2525 .fast_vector_fsqrt,
2526 .fsgsbase,
2527 .fsrm,
2528 .fxsr,
2529 .gfni,
2530 .idivq_to_divl,
2531 .invpcid,
2532 .lzcnt,
2533 .macrofusion,
2534 .mmx,
2535 .movbe,
2536 .movdir64b,
2537 .movdiri,
2538 .movrs,
2539 .ndd,
2540 .nf,
2541 .no_bypass_delay_blend,
2542 .no_bypass_delay_mov,
2543 .no_bypass_delay_shuffle,
2544 .nopl,
2545 .pconfig,
2546 .pku,
2547 .popcnt,
2548 .ppx,
2549 .prefer_256_bit,
2550 .prefetchi,
2551 .prfchw,
2552 .ptwrite,
2553 .push2pop2,
2554 .rdpid,
2555 .rdrnd,
2556 .rdseed,
2557 .sahf,
2558 .serialize,
2559 .sha,
2560 .sha512,
2561 .shstk,
2562 .sm3,
2563 .sm4,
2564 .tsxldtrk,
2565 .tuning_fast_imm_vector_shift,
2566 .uintr,
2567 .usermsr,
2568 .vzeroupper,
2569 .waitpkg,
2570 .wbnoinvd,
2571 .x87,
2572 .xsavec,
2573 .xsaveopt,
2574 .xsaves,
2575 .zu,
2576 }),
2577 };
24152578 pub const emeraldrapids: CpuModel = .{
24162579 .name = "emeraldrapids",
24172580 .llvm_name = "emeraldrapids",
src/codegen/llvm.zig+1
......@@ -140,6 +140,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
140140 .{ .v9_3a, "v9.3a" },
141141 .{ .v9_4a, "v9.4a" },
142142 .{ .v9_5a, "v9.5a" },
143 .{ .v9_6a, "v9.6a" },
143144 }),
144145 .powerpc => subArchName(features, std.Target.powerpc, .{
145146 .{ .spe, "spe" },
src/link/Wasm.zig+14-3
......@@ -2820,9 +2820,12 @@ pub const Feature = packed struct(u8) {
28202820 pub const Tag = enum(u6) {
28212821 atomics,
28222822 @"bulk-memory",
2823 @"bulk-memory-opt",
2824 @"call-indirect-overlong",
28232825 @"exception-handling",
28242826 @"extended-const",
2825 @"half-precision",
2827 fp16,
2828 memory64,
28262829 multimemory,
28272830 multivalue,
28282831 @"mutable-globals",
......@@ -2834,14 +2837,17 @@ pub const Feature = packed struct(u8) {
28342837 simd128,
28352838 @"tail-call",
28362839 @"shared-mem",
2840 @"wide-arithmetic",
28372841
28382842 pub fn fromCpuFeature(feature: std.Target.wasm.Feature) Tag {
28392843 return switch (feature) {
28402844 .atomics => .atomics,
28412845 .bulk_memory => .@"bulk-memory",
2846 .bulk_memory_opt => .@"bulk-memory-opt",
2847 .call_indirect_overlong => .@"call-indirect-overlong",
28422848 .exception_handling => .@"exception-handling",
28432849 .extended_const => .@"extended-const",
2844 .half_precision => .@"half-precision",
2850 .fp16 => .fp16,
28452851 .multimemory => .multimemory,
28462852 .multivalue => .multivalue,
28472853 .mutable_globals => .@"mutable-globals",
......@@ -2852,6 +2858,7 @@ pub const Feature = packed struct(u8) {
28522858 .sign_ext => .@"sign-ext",
28532859 .simd128 => .simd128,
28542860 .tail_call => .@"tail-call",
2861 .wide_arithmetic => .@"wide-arithmetic",
28552862 };
28562863 }
28572864
......@@ -2859,9 +2866,12 @@ pub const Feature = packed struct(u8) {
28592866 return switch (tag) {
28602867 .atomics => .atomics,
28612868 .@"bulk-memory" => .bulk_memory,
2869 .@"bulk-memory-opt" => .bulk_memory_opt,
2870 .@"call-indirect-overlong" => .call_indirect_overlong,
28622871 .@"exception-handling" => .exception_handling,
28632872 .@"extended-const" => .extended_const,
2864 .@"half-precision" => .half_precision,
2873 .fp16 => .fp16,
2874 .memory64 => null, // Linker-only feature.
28652875 .multimemory => .multimemory,
28662876 .multivalue => .multivalue,
28672877 .@"mutable-globals" => .mutable_globals,
......@@ -2873,6 +2883,7 @@ pub const Feature = packed struct(u8) {
28732883 .simd128 => .simd128,
28742884 .@"tail-call" => .tail_call,
28752885 .@"shared-mem" => null, // Linker-only feature.
2886 .@"wide-arithmetic" => .wide_arithmetic,
28762887 };
28772888 }
28782889
src/target.zig+7-1
......@@ -293,7 +293,13 @@ pub fn hasDebugInfo(target: std.Target) bool {
293293 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx77) or
294294 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx78) or
295295 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx80) or
296 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx81),
296 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx81) or
297 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx82) or
298 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx83) or
299 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx84) or
300 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx85) or
301 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx86) or
302 std.Target.nvptx.featureSetHas(target.cpu.features, .ptx87),
297303 .bpfel, .bpfeb => false,
298304 else => true,
299305 };
tools/update_cpu_features.zig+21-15
......@@ -778,6 +778,10 @@ const targets = [_]ArchTarget{
778778 .llvm_name = "armv9.5-a",
779779 .zig_name = "v9_5a",
780780 },
781 .{
782 .llvm_name = "armv9.6-a",
783 .zig_name = "v9_6a",
784 },
781785 .{
782786 .llvm_name = "armv9-a",
783787 .zig_name = "v9a",
......@@ -894,6 +898,10 @@ const targets = [_]ArchTarget{
894898 .llvm_name = "v9.5a",
895899 .zig_name = "has_v9_5a",
896900 },
901 .{
902 .llvm_name = "v9.6a",
903 .zig_name = "has_v9_6a",
904 },
897905 },
898906 .extra_cpus = &.{
899907 .{
......@@ -1092,25 +1100,23 @@ const targets = [_]ArchTarget{
10921100 .name = "WebAssembly",
10931101 .td_name = "WebAssembly",
10941102 },
1095 .extra_features = &.{
1103 // For whatever reason, LLVM's WebAssembly backend sets these implied features in code
1104 // rather than making them proper dependencies, so fix that here...
1105 .feature_overrides = &.{
10961106 .{
1097 .zig_name = "nontrapping_bulk_memory_len0",
1098 .desc = "Bulk memory operations with a zero length do not trap",
1099 .deps = &.{"bulk_memory"},
1107 .llvm_name = "bulk-memory",
1108 .extra_deps = &.{"bulk_memory_opt"},
1109 },
1110 .{
1111 .llvm_name = "reference-types",
1112 .extra_deps = &.{"call_indirect_overlong"},
11001113 },
11011114 },
1102 .extra_cpus = &.{
1115 .extra_features = &.{
11031116 .{
1104 .llvm_name = null,
1105 .zig_name = "lime1",
1106 .features = &.{
1107 "bulk_memory",
1108 "extended_const",
1109 "multivalue",
1110 "mutable_globals",
1111 "nontrapping_fptoint",
1112 "sign_ext",
1113 },
1117 .zig_name = "nontrapping_bulk_memory_len0",
1118 .desc = "Bulk memory operations with a zero length do not trap",
1119 .deps = &.{"bulk_memory_opt"},
11141120 },
11151121 },
11161122 },