authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-03 14:11:28+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-05 14:54:30+02:00
logec9d1fde0005c2bf41038905d3d5c1d5517fe136
tree7e699d8cfe0b1f3cc2a7bfb43b574e1c2d46c467
parent6498f963bc7ecf275173b82ec4da67046116db1a
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: update CPU models and features to LLVM 23


18 files changed, 2754 insertions(+), 442 deletions(-)

lib/compiler/aro/aro/Compilation.zig-1
......@@ -560,7 +560,6 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
560560 .{ .amx_fp8, "__AMX_FP8__" },
561561 .{ .amx_movrs, "__AMX_MOVRS__" },
562562 .{ .amx_avx512, "__AMX_AVX512__" },
563 .{ .amx_tf32, "__AMX_TF32__" },
564563 .{ .cmpccxadd, "__CMPCCXADD__" },
565564 .{ .raoint, "__RAOINT__" },
566565 .{ .avxifma, "__AVXIFMA__" },
lib/std/Target.zig+1-1
......@@ -1238,7 +1238,7 @@ pub const Cpu = struct {
12381238 pub const Set = struct {
12391239 ints: [usize_count]usize,
12401240
1241 pub const needed_bit_count = 347;
1241 pub const needed_bit_count = 378;
12421242 pub const byte_count = @divCeil(needed_bit_count, 8);
12431243 pub const usize_count = (byte_count + (@sizeOf(usize) - 1)) / @sizeOf(usize);
12441244 pub const Index = std.math.Log2Int(@Int(.unsigned, usize_count * @bitSizeOf(usize)));
lib/std/Target/aarch64.zig+191-33
......@@ -10,6 +10,7 @@ pub const Feature = enum {
1010 aes,
1111 aggressive_fma,
1212 aggressive_interleaving,
13 align_cmp_csel_pairs,
1314 alternate_sextload_cvt_f32_pattern,
1415 altnzcv,
1516 alu_lsl_fast,
......@@ -38,7 +39,6 @@ pub const Feature = enum {
3839 ccpp,
3940 chk,
4041 clrbhb,
41 cmh,
4242 cmp_bcc_fusion,
4343 cmpbr,
4444 complxnum,
......@@ -48,6 +48,7 @@ pub const Feature = enum {
4848 crypto,
4949 cssc,
5050 d128,
51 disable_distinct_predicate_dst_reg,
5152 disable_fast_inc_vl,
5253 disable_latency_sched_heuristic,
5354 disable_ldp,
......@@ -71,8 +72,10 @@ pub const Feature = enum {
7172 f8f16mm,
7273 f8f32mm,
7374 faminmax,
75 fast_ld1_single,
7476 fgt,
7577 fix_cortex_a53_835769,
78 fixed_load_latency_4,
7679 flagm,
7780 fmv,
7881 force_32bit_jump_tables,
......@@ -95,14 +98,16 @@ pub const Feature = enum {
9598 fuse_crypto_eor,
9699 fuse_csel,
97100 fuse_cset,
101 fuse_fcsel,
98102 fuse_literals,
99103 gcie,
100104 gcs,
101105 harden_sls_blr,
102106 harden_sls_nocomdat,
103107 harden_sls_retbr,
108 has_limited_64bit_vector_mul_bandwidth,
104109 hbc,
105 hcx,
110 hinte,
106111 i8mm,
107112 ite,
108113 jsconv,
......@@ -121,12 +126,13 @@ pub const Feature = enum {
121126 mops,
122127 mops_go,
123128 mpam,
124 mpamv2,
125129 mte,
126130 mtetc,
127131 neon,
128132 nmi,
129133 no_bti_at_return_twice,
134 no_lfi_loads,
135 no_lfi_stores,
130136 no_neg_immediates,
131137 no_sve_fp_ld1r,
132138 no_zcz_fpr64,
......@@ -138,7 +144,6 @@ pub const Feature = enum {
138144 pan_rwv,
139145 pauth,
140146 pauth_lr,
141 pcdphint,
142147 perfmon,
143148 poe2,
144149 pops,
......@@ -328,6 +333,11 @@ pub const all_features = blk: {
328333 .description = "Make use of aggressive interleaving during vectorization",
329334 .dependencies = featureSet(&[_]Feature{}),
330335 };
336 result[@backingInt(Feature.align_cmp_csel_pairs)] = .{
337 .llvm_name = "align-cmp-csel-pairs",
338 .description = "Align certain CMP/FCMP and CSEL/FCSEL instruction pairs",
339 .dependencies = featureSet(&[_]Feature{}),
340 };
331341 result[@backingInt(Feature.alternate_sextload_cvt_f32_pattern)] = .{
332342 .llvm_name = "alternate-sextload-cvt-f32-pattern",
333343 .description = "Use alternative pattern for sextload convert to f32",
......@@ -476,11 +486,6 @@ pub const all_features = blk: {
476486 .description = "Enable Clear BHB instruction",
477487 .dependencies = featureSet(&[_]Feature{}),
478488 };
479 result[@backingInt(Feature.cmh)] = .{
480 .llvm_name = "cmh",
481 .description = "Enable Armv9.7-A Contention Management Hints",
482 .dependencies = featureSet(&[_]Feature{}),
483 };
484489 result[@backingInt(Feature.cmp_bcc_fusion)] = .{
485490 .llvm_name = "cmp-bcc-fusion",
486491 .description = "CPU fuses cmp+bcc operations",
......@@ -533,6 +538,11 @@ pub const all_features = blk: {
533538 .lse128,
534539 }),
535540 };
541 result[@backingInt(Feature.disable_distinct_predicate_dst_reg)] = .{
542 .llvm_name = "disable-distinct-predicate-dst-reg",
543 .description = "Disabling selecting a distinct predicate register for the destination operand of instructions that take a governing predicate",
544 .dependencies = featureSet(&[_]Feature{}),
545 };
536546 result[@backingInt(Feature.disable_fast_inc_vl)] = .{
537547 .llvm_name = "disable-fast-inc-vl",
538548 .description = "Do not prefer INC/DEC, ALL, { 1, 2, 4 } over ADDVL",
......@@ -545,7 +555,7 @@ pub const all_features = blk: {
545555 };
546556 result[@backingInt(Feature.disable_ldp)] = .{
547557 .llvm_name = "disable-ldp",
548 .description = "Do not emit ldp",
558 .description = "Prefer not to emit ldp",
549559 .dependencies = featureSet(&[_]Feature{}),
550560 };
551561 result[@backingInt(Feature.disable_maximize_scalable_bandwidth)] = .{
......@@ -555,7 +565,7 @@ pub const all_features = blk: {
555565 };
556566 result[@backingInt(Feature.disable_stp)] = .{
557567 .llvm_name = "disable-stp",
558 .description = "Do not emit stp",
568 .description = "Prefer not to emit stp",
559569 .dependencies = featureSet(&[_]Feature{}),
560570 };
561571 result[@backingInt(Feature.disable_unpredicated_ld_st_lower)] = .{
......@@ -671,6 +681,11 @@ pub const all_features = blk: {
671681 .neon,
672682 }),
673683 };
684 result[@backingInt(Feature.fast_ld1_single)] = .{
685 .llvm_name = "fast-ld1-single",
686 .description = "Single-element LD1 to vector lane has same performance as regular load",
687 .dependencies = featureSet(&[_]Feature{}),
688 };
674689 result[@backingInt(Feature.fgt)] = .{
675690 .llvm_name = "fgt",
676691 .description = "Enable fine grained virtualization traps extension",
......@@ -681,6 +696,11 @@ pub const all_features = blk: {
681696 .description = "Mitigate Cortex-A53 Erratum 835769",
682697 .dependencies = featureSet(&[_]Feature{}),
683698 };
699 result[@backingInt(Feature.fixed_load_latency_4)] = .{
700 .llvm_name = "fixed-load-latency-4",
701 .description = "Use a fixed latency of 4 for loads instead of querying the scheduling model",
702 .dependencies = featureSet(&[_]Feature{}),
703 };
684704 result[@backingInt(Feature.flagm)] = .{
685705 .llvm_name = "flagm",
686706 .description = "Enable Armv8.4-A Flag Manipulation instructions",
......@@ -813,6 +833,11 @@ pub const all_features = blk: {
813833 .description = "CPU can fuse CMP and CSET operations",
814834 .dependencies = featureSet(&[_]Feature{}),
815835 };
836 result[@backingInt(Feature.fuse_fcsel)] = .{
837 .llvm_name = "fuse-fcsel",
838 .description = "CPU can fuse FCMP and FCSEL operations",
839 .dependencies = featureSet(&[_]Feature{}),
840 };
816841 result[@backingInt(Feature.fuse_literals)] = .{
817842 .llvm_name = "fuse-literals",
818843 .description = "CPU fuses literal generation operations",
......@@ -845,14 +870,19 @@ pub const all_features = blk: {
845870 .description = "Harden against straight line speculation across RET and BR instructions",
846871 .dependencies = featureSet(&[_]Feature{}),
847872 };
873 result[@backingInt(Feature.has_limited_64bit_vector_mul_bandwidth)] = .{
874 .llvm_name = "has-limited-64bit-vector-mul-bandwidth",
875 .description = "Has limited 64bit vector multiply bandwidth compared to scalar multiply",
876 .dependencies = featureSet(&[_]Feature{}),
877 };
848878 result[@backingInt(Feature.hbc)] = .{
849879 .llvm_name = "hbc",
850880 .description = "Enable Armv8.8-A Hinted Conditional Branches Extension",
851881 .dependencies = featureSet(&[_]Feature{}),
852882 };
853 result[@backingInt(Feature.hcx)] = .{
854 .llvm_name = "hcx",
855 .description = "Enable Armv8.7-A HCRX_EL2 system register",
883 result[@backingInt(Feature.hinte)] = .{
884 .llvm_name = "hinte",
885 .description = "Enable extended A64 hint instruction space",
856886 .dependencies = featureSet(&[_]Feature{}),
857887 };
858888 result[@backingInt(Feature.i8mm)] = .{
......@@ -962,11 +992,6 @@ pub const all_features = blk: {
962992 .description = "Enable Armv8.4-A Memory system Partitioning and Monitoring extension",
963993 .dependencies = featureSet(&[_]Feature{}),
964994 };
965 result[@backingInt(Feature.mpamv2)] = .{
966 .llvm_name = "mpamv2",
967 .description = "Enable Armv9.7-A MPAMv2 Lookaside Buffer Invalidate instructions",
968 .dependencies = featureSet(&[_]Feature{}),
969 };
970995 result[@backingInt(Feature.mte)] = .{
971996 .llvm_name = "mte",
972997 .description = "Enable Memory Tagging Extension",
......@@ -996,6 +1021,16 @@ pub const all_features = blk: {
9961021 .description = "Don't place a BTI instruction after a return-twice",
9971022 .dependencies = featureSet(&[_]Feature{}),
9981023 };
1024 result[@backingInt(Feature.no_lfi_loads)] = .{
1025 .llvm_name = "no-lfi-loads",
1026 .description = "Disable LFI sandboxing for load instructions",
1027 .dependencies = featureSet(&[_]Feature{}),
1028 };
1029 result[@backingInt(Feature.no_lfi_stores)] = .{
1030 .llvm_name = "no-lfi-stores",
1031 .description = "Disable LFI sandboxing for store instructions",
1032 .dependencies = featureSet(&[_]Feature{}),
1033 };
9991034 result[@backingInt(Feature.no_neg_immediates)] = .{
10001035 .llvm_name = "no-neg-immediates",
10011036 .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.",
......@@ -1063,11 +1098,6 @@ pub const all_features = blk: {
10631098 .description = "Enable Armv9.5-A PAC enhancements",
10641099 .dependencies = featureSet(&[_]Feature{}),
10651100 };
1066 result[@backingInt(Feature.pcdphint)] = .{
1067 .llvm_name = "pcdphint",
1068 .description = "Enable Armv9.6-A Producer Consumer Data Placement hints",
1069 .dependencies = featureSet(&[_]Feature{}),
1070 };
10711101 result[@backingInt(Feature.perfmon)] = .{
10721102 .llvm_name = "perfmon",
10731103 .description = "Enable Armv8.0-A PMUv3 Performance Monitors extension",
......@@ -1813,7 +1843,6 @@ pub const all_features = blk: {
18131843 .llvm_name = "v8.7a",
18141844 .description = "Support ARM v8.7a architecture",
18151845 .dependencies = featureSet(&[_]Feature{
1816 .hcx,
18171846 .spe_eef,
18181847 .v8_6a,
18191848 .wfxt,
......@@ -1931,6 +1960,7 @@ pub const all_features = blk: {
19311960 .description = "Support ARM v9.6a architecture",
19321961 .dependencies = featureSet(&[_]Feature{
19331962 .cmpbr,
1963 .hinte,
19341964 .lsui,
19351965 .occmo,
19361966 .v9_5a,
......@@ -2265,12 +2295,14 @@ pub const cpu = struct {
22652295 .features = featureSet(&[_]Feature{
22662296 .aes,
22672297 .aggressive_fma,
2298 .align_cmp_csel_pairs,
22682299 .alternate_sextload_cvt_f32_pattern,
22692300 .altnzcv,
22702301 .arith_bcc_fusion,
22712302 .arith_cbz_fusion,
22722303 .ccdp,
22732304 .disable_latency_sched_heuristic,
2305 .fast_ld1_single,
22742306 .fp16fml,
22752307 .fptoint,
22762308 .fuse_address,
......@@ -2301,10 +2333,12 @@ pub const cpu = struct {
23012333 .llvm_name = "apple-a15",
23022334 .features = featureSet(&[_]Feature{
23032335 .aes,
2336 .align_cmp_csel_pairs,
23042337 .alternate_sextload_cvt_f32_pattern,
23052338 .arith_bcc_fusion,
23062339 .arith_cbz_fusion,
23072340 .disable_latency_sched_heuristic,
2341 .fast_ld1_single,
23082342 .fp16fml,
23092343 .fpac,
23102344 .fuse_address,
......@@ -2332,10 +2366,12 @@ pub const cpu = struct {
23322366 .llvm_name = "apple-a16",
23332367 .features = featureSet(&[_]Feature{
23342368 .aes,
2369 .align_cmp_csel_pairs,
23352370 .alternate_sextload_cvt_f32_pattern,
23362371 .arith_bcc_fusion,
23372372 .arith_cbz_fusion,
23382373 .disable_latency_sched_heuristic,
2374 .fast_ld1_single,
23392375 .fp16fml,
23402376 .fpac,
23412377 .fuse_address,
......@@ -2344,8 +2380,8 @@ pub const cpu = struct {
23442380 .fuse_arith_logic,
23452381 .fuse_crypto_eor,
23462382 .fuse_csel,
2383 .fuse_fcsel,
23472384 .fuse_literals,
2348 .hcx,
23492385 .max_interleave_factor_4,
23502386 .no_zcz_fpr64,
23512387 .perfmon,
......@@ -2364,10 +2400,12 @@ pub const cpu = struct {
23642400 .llvm_name = "apple-a17",
23652401 .features = featureSet(&[_]Feature{
23662402 .aes,
2403 .align_cmp_csel_pairs,
23672404 .alternate_sextload_cvt_f32_pattern,
23682405 .arith_bcc_fusion,
23692406 .arith_cbz_fusion,
23702407 .disable_latency_sched_heuristic,
2408 .fast_ld1_single,
23712409 .fp16fml,
23722410 .fpac,
23732411 .fuse_address,
......@@ -2376,8 +2414,8 @@ pub const cpu = struct {
23762414 .fuse_arith_logic,
23772415 .fuse_crypto_eor,
23782416 .fuse_csel,
2417 .fuse_fcsel,
23792418 .fuse_literals,
2380 .hcx,
23812419 .max_interleave_factor_4,
23822420 .no_zcz_fpr64,
23832421 .perfmon,
......@@ -2396,10 +2434,12 @@ pub const cpu = struct {
23962434 .llvm_name = "apple-a18",
23972435 .features = featureSet(&[_]Feature{
23982436 .aes,
2437 .align_cmp_csel_pairs,
23992438 .alternate_sextload_cvt_f32_pattern,
24002439 .arith_bcc_fusion,
24012440 .arith_cbz_fusion,
24022441 .disable_latency_sched_heuristic,
2442 .fast_ld1_single,
24032443 .fp16fml,
24042444 .fpac,
24052445 .fuse_address,
......@@ -2408,6 +2448,7 @@ pub const cpu = struct {
24082448 .fuse_arith_logic,
24092449 .fuse_crypto_eor,
24102450 .fuse_csel,
2451 .fuse_fcsel,
24112452 .fuse_literals,
24122453 .max_interleave_factor_4,
24132454 .no_zcz_fpr64,
......@@ -2429,11 +2470,13 @@ pub const cpu = struct {
24292470 .llvm_name = "apple-a19",
24302471 .features = featureSet(&[_]Feature{
24312472 .aes,
2473 .align_cmp_csel_pairs,
24322474 .alternate_sextload_cvt_f32_pattern,
24332475 .arith_bcc_fusion,
24342476 .arith_cbz_fusion,
24352477 .cssc,
24362478 .disable_latency_sched_heuristic,
2479 .fast_ld1_single,
24372480 .fp16fml,
24382481 .fpac,
24392482 .fuse_address,
......@@ -2442,6 +2485,7 @@ pub const cpu = struct {
24422485 .fuse_arith_logic,
24432486 .fuse_crypto_eor,
24442487 .fuse_csel,
2488 .fuse_fcsel,
24452489 .fuse_literals,
24462490 .hbc,
24472491 .max_interleave_factor_4,
......@@ -2541,12 +2585,14 @@ pub const cpu = struct {
25412585 .features = featureSet(&[_]Feature{
25422586 .aes,
25432587 .aggressive_fma,
2588 .align_cmp_csel_pairs,
25442589 .alternate_sextload_cvt_f32_pattern,
25452590 .altnzcv,
25462591 .arith_bcc_fusion,
25472592 .arith_cbz_fusion,
25482593 .ccdp,
25492594 .disable_latency_sched_heuristic,
2595 .fast_ld1_single,
25502596 .fp16fml,
25512597 .fptoint,
25522598 .fuse_address,
......@@ -2577,10 +2623,12 @@ pub const cpu = struct {
25772623 .llvm_name = "apple-m2",
25782624 .features = featureSet(&[_]Feature{
25792625 .aes,
2626 .align_cmp_csel_pairs,
25802627 .alternate_sextload_cvt_f32_pattern,
25812628 .arith_bcc_fusion,
25822629 .arith_cbz_fusion,
25832630 .disable_latency_sched_heuristic,
2631 .fast_ld1_single,
25842632 .fp16fml,
25852633 .fpac,
25862634 .fuse_address,
......@@ -2608,10 +2656,12 @@ pub const cpu = struct {
26082656 .llvm_name = "apple-m3",
26092657 .features = featureSet(&[_]Feature{
26102658 .aes,
2659 .align_cmp_csel_pairs,
26112660 .alternate_sextload_cvt_f32_pattern,
26122661 .arith_bcc_fusion,
26132662 .arith_cbz_fusion,
26142663 .disable_latency_sched_heuristic,
2664 .fast_ld1_single,
26152665 .fp16fml,
26162666 .fpac,
26172667 .fuse_address,
......@@ -2620,8 +2670,8 @@ pub const cpu = struct {
26202670 .fuse_arith_logic,
26212671 .fuse_crypto_eor,
26222672 .fuse_csel,
2673 .fuse_fcsel,
26232674 .fuse_literals,
2624 .hcx,
26252675 .max_interleave_factor_4,
26262676 .no_zcz_fpr64,
26272677 .perfmon,
......@@ -2640,10 +2690,12 @@ pub const cpu = struct {
26402690 .llvm_name = "apple-m4",
26412691 .features = featureSet(&[_]Feature{
26422692 .aes,
2693 .align_cmp_csel_pairs,
26432694 .alternate_sextload_cvt_f32_pattern,
26442695 .arith_bcc_fusion,
26452696 .arith_cbz_fusion,
26462697 .disable_latency_sched_heuristic,
2698 .fast_ld1_single,
26472699 .fp16fml,
26482700 .fpac,
26492701 .fuse_address,
......@@ -2652,6 +2704,7 @@ pub const cpu = struct {
26522704 .fuse_arith_logic,
26532705 .fuse_crypto_eor,
26542706 .fuse_csel,
2707 .fuse_fcsel,
26552708 .fuse_literals,
26562709 .max_interleave_factor_4,
26572710 .no_zcz_fpr64,
......@@ -2673,11 +2726,13 @@ pub const cpu = struct {
26732726 .llvm_name = "apple-m5",
26742727 .features = featureSet(&[_]Feature{
26752728 .aes,
2729 .align_cmp_csel_pairs,
26762730 .alternate_sextload_cvt_f32_pattern,
26772731 .arith_bcc_fusion,
26782732 .arith_cbz_fusion,
26792733 .cssc,
26802734 .disable_latency_sched_heuristic,
2735 .fast_ld1_single,
26812736 .fp16fml,
26822737 .fpac,
26832738 .fuse_address,
......@@ -2686,6 +2741,7 @@ pub const cpu = struct {
26862741 .fuse_arith_logic,
26872742 .fuse_crypto_eor,
26882743 .fuse_csel,
2744 .fuse_fcsel,
26892745 .fuse_literals,
26902746 .hbc,
26912747 .max_interleave_factor_4,
......@@ -2712,10 +2768,12 @@ pub const cpu = struct {
27122768 .llvm_name = "apple-s10",
27132769 .features = featureSet(&[_]Feature{
27142770 .aes,
2771 .align_cmp_csel_pairs,
27152772 .alternate_sextload_cvt_f32_pattern,
27162773 .arith_bcc_fusion,
27172774 .arith_cbz_fusion,
27182775 .disable_latency_sched_heuristic,
2776 .fast_ld1_single,
27192777 .fp16fml,
27202778 .fpac,
27212779 .fuse_address,
......@@ -2724,8 +2782,8 @@ pub const cpu = struct {
27242782 .fuse_arith_logic,
27252783 .fuse_crypto_eor,
27262784 .fuse_csel,
2785 .fuse_fcsel,
27272786 .fuse_literals,
2728 .hcx,
27292787 .max_interleave_factor_4,
27302788 .no_zcz_fpr64,
27312789 .perfmon,
......@@ -2864,10 +2922,12 @@ pub const cpu = struct {
28642922 .llvm_name = "apple-s9",
28652923 .features = featureSet(&[_]Feature{
28662924 .aes,
2925 .align_cmp_csel_pairs,
28672926 .alternate_sextload_cvt_f32_pattern,
28682927 .arith_bcc_fusion,
28692928 .arith_cbz_fusion,
28702929 .disable_latency_sched_heuristic,
2930 .fast_ld1_single,
28712931 .fp16fml,
28722932 .fpac,
28732933 .fuse_address,
......@@ -2876,8 +2936,8 @@ pub const cpu = struct {
28762936 .fuse_arith_logic,
28772937 .fuse_crypto_eor,
28782938 .fuse_csel,
2939 .fuse_fcsel,
28792940 .fuse_literals,
2880 .hcx,
28812941 .max_interleave_factor_4,
28822942 .no_zcz_fpr64,
28832943 .perfmon,
......@@ -2891,6 +2951,34 @@ pub const cpu = struct {
28912951 .zcz_gpr64,
28922952 }),
28932953 };
2954 pub const armagicpu: CpuModel = .{
2955 .name = "armagicpu",
2956 .llvm_name = "armagicpu",
2957 .features = featureSet(&[_]Feature{
2958 .alu_lsl_fast,
2959 .avoid_ldapur,
2960 .brbe,
2961 .enable_select_opt,
2962 .ete,
2963 .fp16fml,
2964 .fpac,
2965 .fuse_adrp_add,
2966 .fuse_aes,
2967 .fuse_csel,
2968 .fuse_cset,
2969 .has_limited_64bit_vector_mul_bandwidth,
2970 .ls64,
2971 .mte,
2972 .perfmon,
2973 .predictable_select_expensive,
2974 .rand,
2975 .spe,
2976 .sve_bitperm,
2977 .use_fixed_over_scalable_if_equal_cost,
2978 .use_postra_scheduler,
2979 .v9_2a,
2980 }),
2981 };
28942982 pub const c1_nano: CpuModel = .{
28952983 .name = "c1_nano",
28962984 .llvm_name = "c1-nano",
......@@ -2987,6 +3075,7 @@ pub const cpu = struct {
29873075 .fuse_aes,
29883076 .fuse_csel,
29893077 .fuse_cset,
3078 .max_interleave_factor_4,
29903079 .mte,
29913080 .perfmon,
29923081 .predictable_select_expensive,
......@@ -3016,7 +3105,6 @@ pub const cpu = struct {
30163105 .features = featureSet(&[_]Feature{
30173106 .alu_lsl_fast,
30183107 .bf16,
3019 .disable_maximize_scalable_bandwidth,
30203108 .enable_select_opt,
30213109 .ete,
30223110 .fp16fml,
......@@ -3025,11 +3113,13 @@ pub const cpu = struct {
30253113 .fuse_aes,
30263114 .fuse_csel,
30273115 .fuse_cset,
3116 .has_limited_64bit_vector_mul_bandwidth,
30283117 .i8mm,
30293118 .mte,
30303119 .perfmon,
30313120 .predictable_select_expensive,
30323121 .sve_bitperm,
3122 .use_fixed_over_scalable_if_equal_cost,
30333123 .use_postra_scheduler,
30343124 .v9a,
30353125 }),
......@@ -3562,6 +3652,7 @@ pub const cpu = struct {
35623652 .fullfp16,
35633653 .fuse_adrp_add,
35643654 .fuse_aes,
3655 .max_interleave_factor_4,
35653656 .perfmon,
35663657 .predictable_select_expensive,
35673658 .rcpc,
......@@ -3587,6 +3678,7 @@ pub const cpu = struct {
35873678 .fuse_adrp_add,
35883679 .fuse_aes,
35893680 .lse2,
3681 .max_interleave_factor_4,
35903682 .pauth,
35913683 .perfmon,
35923684 .predictable_select_expensive,
......@@ -3612,6 +3704,7 @@ pub const cpu = struct {
36123704 .fuse_adrp_add,
36133705 .fuse_aes,
36143706 .i8mm,
3707 .max_interleave_factor_4,
36153708 .mte,
36163709 .perfmon,
36173710 .predictable_select_expensive,
......@@ -3635,6 +3728,7 @@ pub const cpu = struct {
36353728 .fuse_adrp_add,
36363729 .fuse_aes,
36373730 .i8mm,
3731 .max_interleave_factor_4,
36383732 .mte,
36393733 .perfmon,
36403734 .predictable_select_expensive,
......@@ -3659,6 +3753,7 @@ pub const cpu = struct {
36593753 .fuse_aes,
36603754 .fuse_csel,
36613755 .fuse_cset,
3756 .max_interleave_factor_4,
36623757 .mte,
36633758 .perfmon,
36643759 .predictable_select_expensive,
......@@ -3683,6 +3778,7 @@ pub const cpu = struct {
36833778 .fuse_aes,
36843779 .fuse_csel,
36853780 .fuse_cset,
3781 .max_interleave_factor_4,
36863782 .mte,
36873783 .perfmon,
36883784 .predictable_select_expensive,
......@@ -3898,6 +3994,7 @@ pub const cpu = struct {
38983994 .fuse_aes,
38993995 .fuse_csel,
39003996 .fuse_cset,
3997 .max_interleave_factor_4,
39013998 .mte,
39023999 .perfmon,
39034000 .predictable_select_expensive,
......@@ -3917,6 +4014,7 @@ pub const cpu = struct {
39174014 .features = featureSet(&[_]Feature{
39184015 .enable_select_opt,
39194016 .ete,
4017 .fixed_load_latency_4,
39204018 .fuse_adrp_add,
39214019 .fuse_aes,
39224020 .neon,
......@@ -3955,6 +4053,36 @@ pub const cpu = struct {
39554053 .v9a,
39564054 }),
39574055 };
4056 pub const hip12: CpuModel = .{
4057 .name = "hip12",
4058 .llvm_name = "hip12",
4059 .features = featureSet(&[_]Feature{
4060 .addr_lsl_slow_14,
4061 .alu_lsl_fast,
4062 .brbe,
4063 .cmp_bcc_fusion,
4064 .ete,
4065 .fp16fml,
4066 .fpac,
4067 .fuse_aes,
4068 .hbc,
4069 .ls64,
4070 .nmi,
4071 .perfmon,
4072 .rand,
4073 .rcpc3,
4074 .rme,
4075 .spe,
4076 .store_pair_suppress,
4077 .sve2,
4078 .sve_aes,
4079 .sve_bitperm,
4080 .sve_sha3,
4081 .sve_sm4,
4082 .use_postra_scheduler,
4083 .v8_7a,
4084 }),
4085 };
39584086 pub const kryo: CpuModel = .{
39594087 .name = "kryo",
39604088 .llvm_name = "kryo",
......@@ -4045,7 +4173,6 @@ pub const cpu = struct {
40454173 .features = featureSet(&[_]Feature{
40464174 .alu_lsl_fast,
40474175 .bf16,
4048 .disable_maximize_scalable_bandwidth,
40494176 .enable_select_opt,
40504177 .ete,
40514178 .fp16fml,
......@@ -4054,11 +4181,13 @@ pub const cpu = struct {
40544181 .fuse_aes,
40554182 .fuse_csel,
40564183 .fuse_cset,
4184 .has_limited_64bit_vector_mul_bandwidth,
40574185 .i8mm,
40584186 .mte,
40594187 .perfmon,
40604188 .predictable_select_expensive,
40614189 .sve_bitperm,
4190 .use_fixed_over_scalable_if_equal_cost,
40624191 .use_postra_scheduler,
40634192 .v9a,
40644193 }),
......@@ -4169,6 +4298,7 @@ pub const cpu = struct {
41694298 .rand,
41704299 .spe,
41714300 .sve_bitperm,
4301 .use_fixed_over_scalable_if_equal_cost,
41724302 .use_postra_scheduler,
41734303 .v9_2a,
41744304 }),
......@@ -4188,14 +4318,15 @@ pub const cpu = struct {
41884318 .fuse_aes,
41894319 .fuse_csel,
41904320 .fuse_cset,
4321 .has_limited_64bit_vector_mul_bandwidth,
41914322 .ls64,
4192 .max_interleave_factor_4,
41934323 .mte,
41944324 .perfmon,
41954325 .predictable_select_expensive,
41964326 .rand,
41974327 .spe,
41984328 .sve_bitperm,
4329 .use_fixed_over_scalable_if_equal_cost,
41994330 .use_postra_scheduler,
42004331 .v9_2a,
42014332 }),
......@@ -4248,6 +4379,33 @@ pub const cpu = struct {
42484379 .v8_6a,
42494380 }),
42504381 };
4382 pub const rigel: CpuModel = .{
4383 .name = "rigel",
4384 .llvm_name = "rigel",
4385 .features = featureSet(&[_]Feature{
4386 .brbe,
4387 .chk,
4388 .ete,
4389 .faminmax,
4390 .fp16fml,
4391 .fp8dot2,
4392 .fp8dot4,
4393 .fp8fma,
4394 .fpac,
4395 .ls64,
4396 .lut,
4397 .mte,
4398 .olympus,
4399 .perfmon,
4400 .rand,
4401 .spe,
4402 .sve_aes,
4403 .sve_bitperm,
4404 .sve_sha3,
4405 .sve_sm4,
4406 .v9_2a,
4407 }),
4408 };
42514409 pub const saphira: CpuModel = .{
42524410 .name = "saphira",
42534411 .llvm_name = "saphira",
lib/std/Target/amdgcn.zig+998-133
......@@ -6,6 +6,7 @@ const CpuModel = std.Target.Cpu.Model;
66
77pub const Feature = enum {
88 @"1024_addressable_vgprs",
9 @"1536_physical_vgprs",
910 @"16_bit_insts",
1011 @"45_bit_num_records_buffer_resource",
1112 @"64_bit_literals",
......@@ -18,12 +19,12 @@ pub const Feature = enum {
1819 addressablelocalmemorysize327680,
1920 addressablelocalmemorysize65536,
2021 agent_scope_fine_grained_remote_memory_atomics,
21 allocate1_5xvgprs,
2222 aperture_regs,
2323 architected_flat_scratch,
2424 architected_sgprs,
2525 ashr_pk_insts,
2626 assembler_permissive_wavesize,
27 asynccnt,
2728 atomic_buffer_global_pk_add_f16_insts,
2829 atomic_buffer_global_pk_add_f16_no_rtn_insts,
2930 atomic_buffer_pk_add_bf16_inst,
......@@ -75,9 +76,12 @@ pub const Feature = enum {
7576 dpp,
7677 dpp8,
7778 dpp_64bit,
79 dpp_row_bcast,
7880 dpp_src1_sgpr,
81 dpp_wavefront_shifts,
7982 ds128,
8083 ds_src2_insts,
84 dx10_clamp_and_ieee_mode,
8185 emulated_system_scope_atomics,
8286 extended_image_insts,
8387 f16bf16_to_fp6bf6_cvt_scale_insts,
......@@ -91,13 +95,17 @@ pub const Feature = enum {
9195 flat_global_insts,
9296 flat_gvs_mode,
9397 flat_inst_offsets,
98 flat_offset_bits_12,
99 flat_offset_bits_24,
94100 flat_scratch,
95101 flat_scratch_insts,
96102 flat_segment_offset_bug,
103 flat_signed_offset,
97104 fma_mix_bf16_insts,
98105 fma_mix_insts,
99106 fmacf64_inst,
100107 fmaf,
108 formatted_mubuf_insts,
101109 fp4_cvt_scale_insts,
102110 fp64,
103111 fp6bf6_cvt_scale_insts,
......@@ -116,10 +124,15 @@ pub const Feature = enum {
116124 gfx10_b_encoding,
117125 gfx10_insts,
118126 gfx11,
127 gfx11_7_insts,
119128 gfx11_insts,
120129 gfx12,
121130 gfx1250_insts,
131 gfx1251_gemm_insts,
132 gfx125x_lowest_rate_wmma,
122133 gfx12_insts,
134 gfx13,
135 gfx13_insts,
123136 gfx7_gfx8_gfx9_insts,
124137 gfx8_insts,
125138 gfx9,
......@@ -135,6 +148,8 @@ pub const Feature = enum {
135148 image_insts,
136149 image_store_d16_bug,
137150 inst_fwd_prefetch_bug,
151 instcachelinesize128,
152 instcachelinesize64,
138153 int_clamp_insts,
139154 inv_2pi_inline_imm,
140155 kernarg_preload,
......@@ -149,6 +164,7 @@ pub const Feature = enum {
149164 mad_intra_fwd_bug,
150165 mad_mac_f32_insts,
151166 mad_mix_insts,
167 mad_nc_64_32_insts,
152168 mad_u32_inst,
153169 mai_insts,
154170 max_hard_clause_length_32,
......@@ -161,22 +177,31 @@ pub const Feature = enum {
161177 mfma_inline_literal_bug,
162178 mimg_r128,
163179 min3_max3_pkf16,
180 min_max_i64_insts,
164181 minimum3_maximum3_f16,
165182 minimum3_maximum3_f32,
166183 minimum3_maximum3_pkf16,
167184 movrel,
185 mqsad_insts,
186 mqsad_pk_insts,
168187 msaa_load_dst_sel_bug,
188 msad_insts,
189 mtbuf_insts,
169190 negative_scratch_offset_bug,
170191 negative_unaligned_scratch_offset_bug,
171192 no_data_dep_hazard,
193 no_f16_pseudo_scalar_trans_inline_constants,
172194 no_sdst_cmpx,
173195 nsa_clause_bug,
174196 nsa_encoding,
175197 nsa_to_vmem_bug,
176198 offset_3f_bug,
177199 packed_fp32_ops,
200 packed_fp64_ops,
178201 packed_tid,
202 packed_u64_ops,
179203 partial_nsa_encoding,
204 permlane16_insts,
180205 permlane16_swap,
181206 permlane32_swap,
182207 pk_add_min_max_insts,
......@@ -185,23 +210,25 @@ pub const Feature = enum {
185210 precise_memory,
186211 priv_enabled_trap2_nop_bug,
187212 prng_inst,
188 promote_alloca,
189213 prt_strict_null,
190214 pseudo_scalar_trans,
191215 qsad_insts,
192216 r128_a16,
193217 real_true16,
194 relaxed_buffer_oob_mode,
195218 required_export_priority,
196219 requires_cov6,
220 requires_initial_unclause_vmem,
197221 restricted_soffset,
222 s_barrier_leave_imm,
198223 s_memrealtime,
199224 s_memtime_inst,
200225 s_wakeup_barrier_inst,
226 s_wakeup_imm,
201227 sad_insts,
202228 safe_cu_prefetch,
203229 safe_smem_prefetch,
204230 salu_float,
231 salu_minimum_maximum_insts,
205232 scalar_atomics,
206233 scalar_dwordx3_loads,
207234 scalar_flat_scratch_insts,
......@@ -219,13 +246,17 @@ pub const Feature = enum {
219246 shader_cycles_hi_lo_registers,
220247 shader_cycles_register,
221248 si_scheduler,
249 smem_prefetch_insts,
222250 smem_to_vector_write_hazard,
223251 southern_islands,
224252 sramecc,
225253 sramecc_support,
254 swmmac_gfx1200_insts,
255 swmmac_gfx1250_insts,
226256 tanh_insts,
227257 tensor_cvt_lut_insts,
228 tgsplit,
258 tgsplit_support,
259 trans_coexecution_hazard,
229260 transpose_load_f4f6_insts,
230261 trap_handler,
231262 trig_reduced_range,
......@@ -236,7 +267,10 @@ pub const Feature = enum {
236267 unaligned_scratch_access,
237268 unpacked_d16_vmem,
238269 unsafe_ds_offset_folding,
270 use_add_pc64_inst,
239271 user_sgpr_init16_bug,
272 v_mov_b64_inst,
273 v_mul_u64_inst,
240274 valu_trans_use_hazard,
241275 vcmpx_exec_war_hazard,
242276 vcmpx_permlane_hazard,
......@@ -249,6 +283,7 @@ pub const Feature = enum {
249283 volcanic_islands,
250284 vop3_literal,
251285 vop3p,
286 vop3px2_increments_va_vdst_twice,
252287 vopd,
253288 vscnt,
254289 wait_xcnt,
......@@ -256,8 +291,12 @@ pub const Feature = enum {
256291 wavefrontsize16,
257292 wavefrontsize32,
258293 wavefrontsize64,
294 wmma_128b_insts,
295 wmma_256b_insts,
296 wmma_coexecution_hazards,
259297 xf32_insts,
260298 xnack,
299 xnack_on_off_modes,
261300 xnack_support,
262301};
263302
......@@ -276,6 +315,11 @@ pub const all_features = blk: {
276315 .description = "Has 1024 addressable VGPRs",
277316 .dependencies = featureSet(&[_]Feature{}),
278317 };
318 result[@backingInt(Feature.@"1536_physical_vgprs")] = .{
319 .llvm_name = "1536-physical-vgprs",
320 .description = "Has 1536 physical VGPRs per SIMD",
321 .dependencies = featureSet(&[_]Feature{}),
322 };
279323 result[@backingInt(Feature.@"16_bit_insts")] = .{
280324 .llvm_name = "16-bit-insts",
281325 .description = "Has i16/f16 instructions",
......@@ -336,11 +380,6 @@ pub const all_features = blk: {
336380 .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.",
337381 .dependencies = featureSet(&[_]Feature{}),
338382 };
339 result[@backingInt(Feature.allocate1_5xvgprs)] = .{
340 .llvm_name = "allocate1_5xvgprs",
341 .description = "Has 50% more physical VGPRs and 50% larger allocation granule",
342 .dependencies = featureSet(&[_]Feature{}),
343 };
344383 result[@backingInt(Feature.aperture_regs)] = .{
345384 .llvm_name = "aperture-regs",
346385 .description = "Has Memory Aperture Base and Size Registers",
......@@ -363,7 +402,12 @@ pub const all_features = blk: {
363402 };
364403 result[@backingInt(Feature.assembler_permissive_wavesize)] = .{
365404 .llvm_name = "assembler-permissive-wavesize",
366 .description = "allow parsing wave32 and wave64 variants of instructions",
405 .description = "Allow parsing wave32 and wave64 variants of instructions",
406 .dependencies = featureSet(&[_]Feature{}),
407 };
408 result[@backingInt(Feature.asynccnt)] = .{
409 .llvm_name = "asynccnt",
410 .description = "Has separate asynccnt counter",
367411 .dependencies = featureSet(&[_]Feature{}),
368412 };
369413 result[@backingInt(Feature.atomic_buffer_global_pk_add_f16_insts)] = .{
......@@ -637,11 +681,21 @@ pub const all_features = blk: {
637681 .description = "Support DPP (Data Parallel Primitives) extension in DP ALU",
638682 .dependencies = featureSet(&[_]Feature{}),
639683 };
684 result[@backingInt(Feature.dpp_row_bcast)] = .{
685 .llvm_name = "dpp-row-bcast",
686 .description = "Support DPP row_bcast15/row_bcast31",
687 .dependencies = featureSet(&[_]Feature{}),
688 };
640689 result[@backingInt(Feature.dpp_src1_sgpr)] = .{
641690 .llvm_name = "dpp-src1-sgpr",
642691 .description = "Support SGPR for Src1 of DPP instructions",
643692 .dependencies = featureSet(&[_]Feature{}),
644693 };
694 result[@backingInt(Feature.dpp_wavefront_shifts)] = .{
695 .llvm_name = "dpp-wavefront-shifts",
696 .description = "Support DPP wave_shl/wave_rol/wave_shr/wave_ror",
697 .dependencies = featureSet(&[_]Feature{}),
698 };
645699 result[@backingInt(Feature.ds128)] = .{
646700 .llvm_name = "enable-ds128",
647701 .description = "Use ds_{read|write}_b128",
......@@ -652,6 +706,11 @@ pub const all_features = blk: {
652706 .description = "Has ds_*_src2 instructions",
653707 .dependencies = featureSet(&[_]Feature{}),
654708 };
709 result[@backingInt(Feature.dx10_clamp_and_ieee_mode)] = .{
710 .llvm_name = "dx10-clamp-and-ieee-mode",
711 .description = "Target has DX10_CLAMP and IEEE_MODE kernel descriptor bits",
712 .dependencies = featureSet(&[_]Feature{}),
713 };
655714 result[@backingInt(Feature.emulated_system_scope_atomics)] = .{
656715 .llvm_name = "emulated-system-scope-atomics",
657716 .description = "System scope atomics unsupported by the PCI-e are emulated in HW via CAS loop and functional.",
......@@ -723,6 +782,16 @@ pub const all_features = blk: {
723782 .description = "Flat instructions have immediate offset addressing mode",
724783 .dependencies = featureSet(&[_]Feature{}),
725784 };
785 result[@backingInt(Feature.flat_offset_bits_12)] = .{
786 .llvm_name = "flat-offset-bits-12",
787 .description = "Number of bits for flat offset encoding",
788 .dependencies = featureSet(&[_]Feature{}),
789 };
790 result[@backingInt(Feature.flat_offset_bits_24)] = .{
791 .llvm_name = "flat-offset-bits-24",
792 .description = "Number of bits for flat offset encoding",
793 .dependencies = featureSet(&[_]Feature{}),
794 };
726795 result[@backingInt(Feature.flat_scratch)] = .{
727796 .llvm_name = "enable-flat-scratch",
728797 .description = "Use scratch_* flat memory instructions to access scratch",
......@@ -740,6 +809,11 @@ pub const all_features = blk: {
740809 .description = "GFX10 bug where inst_offset is ignored when flat instructions access global memory",
741810 .dependencies = featureSet(&[_]Feature{}),
742811 };
812 result[@backingInt(Feature.flat_signed_offset)] = .{
813 .llvm_name = "flat-signed-offset",
814 .description = "Immediate offset of FLAT instructions are always signed",
815 .dependencies = featureSet(&[_]Feature{}),
816 };
743817 result[@backingInt(Feature.fma_mix_bf16_insts)] = .{
744818 .llvm_name = "fma-mix-bf16-insts",
745819 .description = "Has v_fma_mix_f32_bf16, v_fma_mixlo_bf16, v_fma_mixhi_bf16 instructions",
......@@ -760,6 +834,11 @@ pub const all_features = blk: {
760834 .description = "Enable single precision FMA (not as fast as mul+add, but fused)",
761835 .dependencies = featureSet(&[_]Feature{}),
762836 };
837 result[@backingInt(Feature.formatted_mubuf_insts)] = .{
838 .llvm_name = "formatted-mubuf-insts",
839 .description = "Has formatted memory untyped buffer instructions.",
840 .dependencies = featureSet(&[_]Feature{}),
841 };
763842 result[@backingInt(Feature.fp4_cvt_scale_insts)] = .{
764843 .llvm_name = "fp4-cvt-scale-insts",
765844 .description = "Has fp4 conversion scale instructions",
......@@ -841,13 +920,16 @@ pub const all_features = blk: {
841920 .default_component_zero,
842921 .dpp,
843922 .dpp8,
923 .dx10_clamp_and_ieee_mode,
844924 .extended_image_insts,
845925 .fast_denormal_f32,
846926 .fast_fmaf,
847927 .flat_global_insts,
848928 .flat_inst_offsets,
929 .flat_offset_bits_12,
849930 .flat_scratch_insts,
850931 .fma_mix_insts,
932 .formatted_mubuf_insts,
851933 .fp64,
852934 .g16,
853935 .gds,
......@@ -856,14 +938,20 @@ pub const all_features = blk: {
856938 .gfx9_insts,
857939 .gws,
858940 .image_insts,
941 .instcachelinesize64,
859942 .int_clamp_insts,
860943 .inv_2pi_inline_imm,
861944 .lerp_inst,
862945 .max_hard_clause_length_63,
863946 .mimg_r128,
864947 .movrel,
948 .mqsad_insts,
949 .mqsad_pk_insts,
950 .msad_insts,
951 .mtbuf_insts,
865952 .no_data_dep_hazard,
866953 .no_sdst_cmpx,
954 .permlane16_insts,
867955 .pk_fmac_f16_inst,
868956 .qsad_insts,
869957 .s_memrealtime,
......@@ -929,6 +1017,7 @@ pub const all_features = blk: {
9291017 .flat_inst_offsets,
9301018 .flat_scratch_insts,
9311019 .fma_mix_insts,
1020 .formatted_mubuf_insts,
9321021 .fp64,
9331022 .g16,
9341023 .gds,
......@@ -940,14 +1029,20 @@ pub const all_features = blk: {
9401029 .gfx8_insts,
9411030 .gfx9_insts,
9421031 .gws,
1032 .instcachelinesize128,
9431033 .int_clamp_insts,
9441034 .inv_2pi_inline_imm,
9451035 .lerp_inst,
9461036 .max_hard_clause_length_32,
9471037 .mimg_r128,
9481038 .movrel,
1039 .mqsad_insts,
1040 .mqsad_pk_insts,
1041 .msad_insts,
1042 .mtbuf_insts,
9491043 .no_data_dep_hazard,
9501044 .no_sdst_cmpx,
1045 .permlane16_insts,
9511046 .pk_fmac_f16_inst,
9521047 .qsad_insts,
9531048 .sad_insts,
......@@ -962,6 +1057,11 @@ pub const all_features = blk: {
9621057 .vscnt,
9631058 }),
9641059 };
1060 result[@backingInt(Feature.gfx11_7_insts)] = .{
1061 .llvm_name = "gfx11-7-insts",
1062 .description = "Additional instructions for GFX11.7",
1063 .dependencies = featureSet(&[_]Feature{}),
1064 };
9651065 result[@backingInt(Feature.gfx11_insts)] = .{
9661066 .llvm_name = "gfx11-insts",
9671067 .description = "Additional instructions for GFX11+",
......@@ -986,7 +1086,9 @@ pub const all_features = blk: {
9861086 .fast_fmaf,
9871087 .flat_global_insts,
9881088 .flat_inst_offsets,
1089 .flat_offset_bits_24,
9891090 .flat_scratch_insts,
1091 .flat_signed_offset,
9901092 .fma_mix_insts,
9911093 .fp64,
9921094 .g16,
......@@ -999,6 +1101,7 @@ pub const all_features = blk: {
9991101 .gfx8_insts,
10001102 .gfx9_insts,
10011103 .ieee_minimum_maximum_insts,
1104 .instcachelinesize128,
10021105 .int_clamp_insts,
10031106 .inv_2pi_inline_imm,
10041107 .max_hard_clause_length_32,
......@@ -1008,7 +1111,9 @@ pub const all_features = blk: {
10081111 .movrel,
10091112 .no_data_dep_hazard,
10101113 .no_sdst_cmpx,
1114 .permlane16_insts,
10111115 .pk_fmac_f16_inst,
1116 .salu_minimum_maximum_insts,
10121117 .true16,
10131118 .unaligned_buffer_access,
10141119 .unaligned_ds_access,
......@@ -1024,11 +1129,91 @@ pub const all_features = blk: {
10241129 .description = "Additional instructions for GFX1250+",
10251130 .dependencies = featureSet(&[_]Feature{}),
10261131 };
1132 result[@backingInt(Feature.gfx1251_gemm_insts)] = .{
1133 .llvm_name = "gfx1251-gemm-insts",
1134 .description = "Has additional gfx1251 DGEMM instructions",
1135 .dependencies = featureSet(&[_]Feature{}),
1136 };
1137 result[@backingInt(Feature.gfx125x_lowest_rate_wmma)] = .{
1138 .llvm_name = "gfx125x-lowest-rate-wmma",
1139 .description = "Has the lowest rate wmma in the gfx125x family, mainly for the gfx12-5-generic",
1140 .dependencies = featureSet(&[_]Feature{}),
1141 };
10271142 result[@backingInt(Feature.gfx12_insts)] = .{
10281143 .llvm_name = "gfx12-insts",
10291144 .description = "Additional instructions for GFX12+",
10301145 .dependencies = featureSet(&[_]Feature{}),
10311146 };
1147 result[@backingInt(Feature.gfx13)] = .{
1148 .llvm_name = "gfx13",
1149 .description = "GFX13 GPU generation",
1150 .dependencies = featureSet(&[_]Feature{
1151 .@"16_bit_insts",
1152 .a16,
1153 .add_no_carry_insts,
1154 .agent_scope_fine_grained_remote_memory_atomics,
1155 .aperture_regs,
1156 .atomic_fmin_fmax_flat_f32,
1157 .atomic_fmin_fmax_global_f32,
1158 .ci_insts,
1159 .default_component_broadcast,
1160 .dpp,
1161 .dpp8,
1162 .extended_image_insts,
1163 .fast_denormal_f32,
1164 .fast_fmaf,
1165 .flat_global_insts,
1166 .flat_inst_offsets,
1167 .flat_offset_bits_24,
1168 .flat_scratch_insts,
1169 .flat_signed_offset,
1170 .fma_mix_insts,
1171 .formatted_mubuf_insts,
1172 .fp64,
1173 .g16,
1174 .gfx10_3_insts,
1175 .gfx10_a_encoding,
1176 .gfx10_b_encoding,
1177 .gfx10_insts,
1178 .gfx11_insts,
1179 .gfx12_insts,
1180 .gfx13_insts,
1181 .gfx8_insts,
1182 .gfx9_insts,
1183 .ieee_minimum_maximum_insts,
1184 .image_insts,
1185 .instcachelinesize128,
1186 .int_clamp_insts,
1187 .inv_2pi_inline_imm,
1188 .max_hard_clause_length_32,
1189 .mimg_r128,
1190 .minimum3_maximum3_f16,
1191 .minimum3_maximum3_f32,
1192 .movrel,
1193 .mtbuf_insts,
1194 .no_data_dep_hazard,
1195 .no_sdst_cmpx,
1196 .permlane16_insts,
1197 .pk_fmac_f16_inst,
1198 .salu_minimum_maximum_insts,
1199 .true16,
1200 .unaligned_buffer_access,
1201 .unaligned_ds_access,
1202 .unaligned_scratch_access,
1203 .vop3_literal,
1204 .vop3p,
1205 .vopd,
1206 .vscnt,
1207 }),
1208 };
1209 result[@backingInt(Feature.gfx13_insts)] = .{
1210 .llvm_name = "gfx13-insts",
1211 .description = "Additional instructions for GFX13+",
1212 .dependencies = featureSet(&[_]Feature{
1213 .s_barrier_leave_imm,
1214 .s_wakeup_imm,
1215 }),
1216 };
10321217 result[@backingInt(Feature.gfx7_gfx8_gfx9_insts)] = .{
10331218 .llvm_name = "gfx7-gfx8-gfx9-insts",
10341219 .description = "Instructions shared in GFX7, GFX8, GFX9",
......@@ -1054,20 +1239,29 @@ pub const all_features = blk: {
10541239 .cvt_pknorm_vop3_insts,
10551240 .default_component_zero,
10561241 .dpp,
1242 .dpp_row_bcast,
1243 .dpp_wavefront_shifts,
1244 .dx10_clamp_and_ieee_mode,
10571245 .fast_denormal_f32,
10581246 .fast_fmaf,
10591247 .flat_global_insts,
10601248 .flat_inst_offsets,
10611249 .flat_scratch_insts,
1250 .formatted_mubuf_insts,
10621251 .fp64,
10631252 .gcn3_encoding,
10641253 .gfx7_gfx8_gfx9_insts,
10651254 .gfx8_insts,
10661255 .gfx9_insts,
10671256 .gws,
1257 .instcachelinesize64,
10681258 .int_clamp_insts,
10691259 .inv_2pi_inline_imm,
10701260 .lerp_inst,
1261 .mqsad_insts,
1262 .mqsad_pk_insts,
1263 .msad_insts,
1264 .mtbuf_insts,
10711265 .negative_scratch_offset_bug,
10721266 .qsad_insts,
10731267 .r128_a16,
......@@ -1089,7 +1283,7 @@ pub const all_features = blk: {
10891283 .vmem_write_vgpr_in_order,
10901284 .vop3p,
10911285 .wavefrontsize64,
1092 .xnack_support,
1286 .xnack_on_off_modes,
10931287 }),
10941288 };
10951289 result[@backingInt(Feature.gfx90a_insts)] = .{
......@@ -1142,7 +1336,7 @@ pub const all_features = blk: {
11421336 };
11431337 result[@backingInt(Feature.ieee_minimum_maximum_insts)] = .{
11441338 .llvm_name = "ieee-minimum-maximum-insts",
1145 .description = "Has v_minimum/maximum_f16/f32/f64, v_minimummaximum/maximumminimum_f16/f32 and v_pk_minimum/maximum_f16 instructions",
1339 .description = "Has v_minimum/maximum_f16/f32/f64, v_minimummaximum/maximumminimum_f16/f32 andv_pk_minimum/maximum_f16 instructions",
11461340 .dependencies = featureSet(&[_]Feature{}),
11471341 };
11481342 result[@backingInt(Feature.image_gather4_d16_bug)] = .{
......@@ -1165,6 +1359,16 @@ pub const all_features = blk: {
11651359 .description = "S_INST_PREFETCH instruction causes shader to hang",
11661360 .dependencies = featureSet(&[_]Feature{}),
11671361 };
1362 result[@backingInt(Feature.instcachelinesize128)] = .{
1363 .llvm_name = "instcachelinesize128",
1364 .description = "Instruction cache line size in bytes.",
1365 .dependencies = featureSet(&[_]Feature{}),
1366 };
1367 result[@backingInt(Feature.instcachelinesize64)] = .{
1368 .llvm_name = "instcachelinesize64",
1369 .description = "Instruction cache line size in bytes.",
1370 .dependencies = featureSet(&[_]Feature{}),
1371 };
11681372 result[@backingInt(Feature.int_clamp_insts)] = .{
11691373 .llvm_name = "int-clamp-insts",
11701374 .description = "Support clamp for integer destination",
......@@ -1235,6 +1439,11 @@ pub const all_features = blk: {
12351439 .description = "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions",
12361440 .dependencies = featureSet(&[_]Feature{}),
12371441 };
1442 result[@backingInt(Feature.mad_nc_64_32_insts)] = .{
1443 .llvm_name = "mad-nc-64-32-insts",
1444 .description = "Has v_mad_nc_{u64_u32|i64_i32} instructions",
1445 .dependencies = featureSet(&[_]Feature{}),
1446 };
12381447 result[@backingInt(Feature.mad_u32_inst)] = .{
12391448 .llvm_name = "mad-u32-inst",
12401449 .description = "Has v_mad_u32 instruction",
......@@ -1295,6 +1504,11 @@ pub const all_features = blk: {
12951504 .description = "Has v_pk_min3_num_f16 and v_pk_max3_num_f16 instructions",
12961505 .dependencies = featureSet(&[_]Feature{}),
12971506 };
1507 result[@backingInt(Feature.min_max_i64_insts)] = .{
1508 .llvm_name = "min-max-i64-insts",
1509 .description = "Has v_{min|max}_{i|u}64 instructions",
1510 .dependencies = featureSet(&[_]Feature{}),
1511 };
12981512 result[@backingInt(Feature.minimum3_maximum3_f16)] = .{
12991513 .llvm_name = "minimum3-maximum3-f16",
13001514 .description = "Has v_minimum3_f16 and v_maximum3_f16 instructions",
......@@ -1315,11 +1529,31 @@ pub const all_features = blk: {
13151529 .description = "Has v_movrel*_b32 instructions",
13161530 .dependencies = featureSet(&[_]Feature{}),
13171531 };
1532 result[@backingInt(Feature.mqsad_insts)] = .{
1533 .llvm_name = "mqsad-insts",
1534 .description = "Has v_mqsad_u32_u8 instruction",
1535 .dependencies = featureSet(&[_]Feature{}),
1536 };
1537 result[@backingInt(Feature.mqsad_pk_insts)] = .{
1538 .llvm_name = "mqsad-pk-insts",
1539 .description = "Has v_mqsad_pk_u16_u8 instruction",
1540 .dependencies = featureSet(&[_]Feature{}),
1541 };
13181542 result[@backingInt(Feature.msaa_load_dst_sel_bug)] = .{
13191543 .llvm_name = "msaa-load-dst-sel-bug",
13201544 .description = "MSAA loads not honoring dst_sel bug",
13211545 .dependencies = featureSet(&[_]Feature{}),
13221546 };
1547 result[@backingInt(Feature.msad_insts)] = .{
1548 .llvm_name = "msad-insts",
1549 .description = "Has v_msad_u8 instruction",
1550 .dependencies = featureSet(&[_]Feature{}),
1551 };
1552 result[@backingInt(Feature.mtbuf_insts)] = .{
1553 .llvm_name = "mtbuf-insts",
1554 .description = "Has memory typed buffer instructions.",
1555 .dependencies = featureSet(&[_]Feature{}),
1556 };
13231557 result[@backingInt(Feature.negative_scratch_offset_bug)] = .{
13241558 .llvm_name = "negative-scratch-offset-bug",
13251559 .description = "Negative immediate offsets in scratch instructions with an SGPR offset page fault on GFX9",
......@@ -1327,7 +1561,7 @@ pub const all_features = blk: {
13271561 };
13281562 result[@backingInt(Feature.negative_unaligned_scratch_offset_bug)] = .{
13291563 .llvm_name = "negative-unaligned-scratch-offset-bug",
1330 .description = "Scratch instructions with a VGPR offset and a negative immediate offset that is not a multiple of 4 read wrong memory on GFX10",
1564 .description = "Scratch instructions with a VGPR offset and a negative immediate offset thatis not a multiple of 4 read wrong memory on GFX10",
13311565 .dependencies = featureSet(&[_]Feature{}),
13321566 };
13331567 result[@backingInt(Feature.no_data_dep_hazard)] = .{
......@@ -1335,6 +1569,11 @@ pub const all_features = blk: {
13351569 .description = "Does not need SW waitstates",
13361570 .dependencies = featureSet(&[_]Feature{}),
13371571 };
1572 result[@backingInt(Feature.no_f16_pseudo_scalar_trans_inline_constants)] = .{
1573 .llvm_name = "no-f16-pseudo-scalar-trans-inline-constants",
1574 .description = "Inline constants are not supported for F16 pseudo scalar transcendentals",
1575 .dependencies = featureSet(&[_]Feature{}),
1576 };
13381577 result[@backingInt(Feature.no_sdst_cmpx)] = .{
13391578 .llvm_name = "no-sdst-cmpx",
13401579 .description = "V_CMPX does not write VCC/SGPR in addition to EXEC",
......@@ -1365,16 +1604,31 @@ pub const all_features = blk: {
13651604 .description = "Support packed fp32 instructions",
13661605 .dependencies = featureSet(&[_]Feature{}),
13671606 };
1607 result[@backingInt(Feature.packed_fp64_ops)] = .{
1608 .llvm_name = "packed-fp64-ops",
1609 .description = "Support packed fp64 instructions",
1610 .dependencies = featureSet(&[_]Feature{}),
1611 };
13681612 result[@backingInt(Feature.packed_tid)] = .{
13691613 .llvm_name = "packed-tid",
13701614 .description = "Workitem IDs are packed into v0 at kernel launch",
13711615 .dependencies = featureSet(&[_]Feature{}),
13721616 };
1617 result[@backingInt(Feature.packed_u64_ops)] = .{
1618 .llvm_name = "packed-u64-ops",
1619 .description = "Support packed uint64 instructions",
1620 .dependencies = featureSet(&[_]Feature{}),
1621 };
13731622 result[@backingInt(Feature.partial_nsa_encoding)] = .{
13741623 .llvm_name = "partial-nsa-encoding",
13751624 .description = "Support partial NSA encoding for image instructions",
13761625 .dependencies = featureSet(&[_]Feature{}),
13771626 };
1627 result[@backingInt(Feature.permlane16_insts)] = .{
1628 .llvm_name = "permlane16-insts",
1629 .description = "Has v_permlane16_b32/v_permlanex16_b32 instructions",
1630 .dependencies = featureSet(&[_]Feature{}),
1631 };
13781632 result[@backingInt(Feature.permlane16_swap)] = .{
13791633 .llvm_name = "permlane16-swap",
13801634 .description = "Has v_permlane16_swap_b32 instructions",
......@@ -1415,11 +1669,6 @@ pub const all_features = blk: {
14151669 .description = "Has v_prng_b32 instruction",
14161670 .dependencies = featureSet(&[_]Feature{}),
14171671 };
1418 result[@backingInt(Feature.promote_alloca)] = .{
1419 .llvm_name = "promote-alloca",
1420 .description = "Enable promote alloca pass",
1421 .dependencies = featureSet(&[_]Feature{}),
1422 };
14231672 result[@backingInt(Feature.prt_strict_null)] = .{
14241673 .llvm_name = "enable-prt-strict-null",
14251674 .description = "Enable zeroing of result registers for sparse texture fetches",
......@@ -1445,11 +1694,6 @@ pub const all_features = blk: {
14451694 .description = "Use true 16-bit registers",
14461695 .dependencies = featureSet(&[_]Feature{}),
14471696 };
1448 result[@backingInt(Feature.relaxed_buffer_oob_mode)] = .{
1449 .llvm_name = "relaxed-buffer-oob-mode",
1450 .description = "Disable strict out-of-bounds buffer guarantees. An OOB access may potentially cause an adjacent access to be treated as if it were also OOB",
1451 .dependencies = featureSet(&[_]Feature{}),
1452 };
14531697 result[@backingInt(Feature.required_export_priority)] = .{
14541698 .llvm_name = "required-export-priority",
14551699 .description = "Export priority must be explicitly manipulated on GFX11.5",
......@@ -1460,11 +1704,21 @@ pub const all_features = blk: {
14601704 .description = "Target Requires Code Object V6",
14611705 .dependencies = featureSet(&[_]Feature{}),
14621706 };
1707 result[@backingInt(Feature.requires_initial_unclause_vmem)] = .{
1708 .llvm_name = "requires-initial-unclause-vmem",
1709 .description = "Hardware entrypoints require first VMEM instruction to be unclaused",
1710 .dependencies = featureSet(&[_]Feature{}),
1711 };
14631712 result[@backingInt(Feature.restricted_soffset)] = .{
14641713 .llvm_name = "restricted-soffset",
14651714 .description = "Has restricted SOffset (immediate not supported).",
14661715 .dependencies = featureSet(&[_]Feature{}),
14671716 };
1717 result[@backingInt(Feature.s_barrier_leave_imm)] = .{
1718 .llvm_name = "s-barrier-leave-imm",
1719 .description = "s_barrier_leave takes an immediate operand",
1720 .dependencies = featureSet(&[_]Feature{}),
1721 };
14681722 result[@backingInt(Feature.s_memrealtime)] = .{
14691723 .llvm_name = "s-memrealtime",
14701724 .description = "Has s_memrealtime instruction",
......@@ -1480,6 +1734,11 @@ pub const all_features = blk: {
14801734 .description = "Has s_wakeup_barrier instruction.",
14811735 .dependencies = featureSet(&[_]Feature{}),
14821736 };
1737 result[@backingInt(Feature.s_wakeup_imm)] = .{
1738 .llvm_name = "s-wakeup-imm",
1739 .description = "s_wakeup takes an immediate operand",
1740 .dependencies = featureSet(&[_]Feature{}),
1741 };
14831742 result[@backingInt(Feature.sad_insts)] = .{
14841743 .llvm_name = "sad-insts",
14851744 .description = "Has v_sad* instructions",
......@@ -1500,6 +1759,11 @@ pub const all_features = blk: {
15001759 .description = "Has SALU floating point instructions",
15011760 .dependencies = featureSet(&[_]Feature{}),
15021761 };
1762 result[@backingInt(Feature.salu_minimum_maximum_insts)] = .{
1763 .llvm_name = "salu-minimum-maximum-insts",
1764 .description = "Has s_minimum/maximum_f16/f32 instructions",
1765 .dependencies = featureSet(&[_]Feature{}),
1766 };
15031767 result[@backingInt(Feature.scalar_atomics)] = .{
15041768 .llvm_name = "scalar-atomics",
15051769 .description = "Has atomic scalar memory instructions",
......@@ -1564,16 +1828,23 @@ pub const all_features = blk: {
15641828 .cvt_pknorm_vop2_insts,
15651829 .default_component_zero,
15661830 .ds_src2_insts,
1831 .dx10_clamp_and_ieee_mode,
15671832 .extended_image_insts,
1833 .formatted_mubuf_insts,
15681834 .fp64,
15691835 .gds,
15701836 .gfx7_gfx8_gfx9_insts,
15711837 .gws,
15721838 .image_insts,
1839 .instcachelinesize64,
15731840 .lerp_inst,
15741841 .mad_mac_f32_insts,
15751842 .mimg_r128,
15761843 .movrel,
1844 .mqsad_insts,
1845 .mqsad_pk_insts,
1846 .msad_insts,
1847 .mtbuf_insts,
15771848 .qsad_insts,
15781849 .s_memtime_inst,
15791850 .sad_insts,
......@@ -1613,6 +1884,11 @@ pub const all_features = blk: {
16131884 .description = "Enable SI Machine Scheduler",
16141885 .dependencies = featureSet(&[_]Feature{}),
16151886 };
1887 result[@backingInt(Feature.smem_prefetch_insts)] = .{
1888 .llvm_name = "smem-prefetch-insts",
1889 .description = "Has s_prefetch_inst, s_prefetch_inst_pc_rel, s_prefetch_data and s_prefetch_data_pc_rel instructions",
1890 .dependencies = featureSet(&[_]Feature{}),
1891 };
16161892 result[@backingInt(Feature.smem_to_vector_write_hazard)] = .{
16171893 .llvm_name = "smem-to-vector-write-hazard",
16181894 .description = "s_load_dword followed by v_cmp page faults",
......@@ -1629,16 +1905,22 @@ pub const all_features = blk: {
16291905 .cvt_pknorm_vop2_insts,
16301906 .default_component_zero,
16311907 .ds_src2_insts,
1908 .dx10_clamp_and_ieee_mode,
16321909 .extended_image_insts,
1910 .formatted_mubuf_insts,
16331911 .fp64,
16341912 .gds,
16351913 .gws,
16361914 .image_insts,
1915 .instcachelinesize64,
16371916 .ldsbankcount32,
16381917 .lerp_inst,
16391918 .mad_mac_f32_insts,
16401919 .mimg_r128,
16411920 .movrel,
1921 .mqsad_pk_insts,
1922 .msad_insts,
1923 .mtbuf_insts,
16421924 .s_memtime_inst,
16431925 .sad_insts,
16441926 .trig_reduced_range,
......@@ -1656,6 +1938,16 @@ pub const all_features = blk: {
16561938 .description = "Hardware supports SRAMECC",
16571939 .dependencies = featureSet(&[_]Feature{}),
16581940 };
1941 result[@backingInt(Feature.swmmac_gfx1200_insts)] = .{
1942 .llvm_name = "swmmac-gfx1200-insts",
1943 .description = "Has GFX1200 SWMMAC instructions",
1944 .dependencies = featureSet(&[_]Feature{}),
1945 };
1946 result[@backingInt(Feature.swmmac_gfx1250_insts)] = .{
1947 .llvm_name = "swmmac-gfx1250-insts",
1948 .description = "Has GFX1250 SWMMAC instructions",
1949 .dependencies = featureSet(&[_]Feature{}),
1950 };
16591951 result[@backingInt(Feature.tanh_insts)] = .{
16601952 .llvm_name = "tanh-insts",
16611953 .description = "Has v_tanh_f32/f16 instructions",
......@@ -1666,9 +1958,14 @@ pub const all_features = blk: {
16661958 .description = "Has v_perm_pk16* instructions",
16671959 .dependencies = featureSet(&[_]Feature{}),
16681960 };
1669 result[@backingInt(Feature.tgsplit)] = .{
1670 .llvm_name = "tgsplit",
1671 .description = "Enable threadgroup split execution",
1961 result[@backingInt(Feature.tgsplit_support)] = .{
1962 .llvm_name = "tgsplit-support",
1963 .description = "Hardware support for threadgroup split execution mode",
1964 .dependencies = featureSet(&[_]Feature{}),
1965 };
1966 result[@backingInt(Feature.trans_coexecution_hazard)] = .{
1967 .llvm_name = "trans-coexecution-hazard",
1968 .description = "Hazard when TRANS co-executes with other VALU instruction",
16721969 .dependencies = featureSet(&[_]Feature{}),
16731970 };
16741971 result[@backingInt(Feature.transpose_load_f4f6_insts)] = .{
......@@ -1721,11 +2018,26 @@ pub const all_features = blk: {
17212018 .description = "Force using DS instruction immediate offsets on SI",
17222019 .dependencies = featureSet(&[_]Feature{}),
17232020 };
2021 result[@backingInt(Feature.use_add_pc64_inst)] = .{
2022 .llvm_name = "use-add-pc64-inst",
2023 .description = "Use s_add_pc_i64 instruction.",
2024 .dependencies = featureSet(&[_]Feature{}),
2025 };
17242026 result[@backingInt(Feature.user_sgpr_init16_bug)] = .{
17252027 .llvm_name = "user-sgpr-init16-bug",
17262028 .description = "Bug requiring at least 16 user+system SGPRs to be enabled",
17272029 .dependencies = featureSet(&[_]Feature{}),
17282030 };
2031 result[@backingInt(Feature.v_mov_b64_inst)] = .{
2032 .llvm_name = "v-mov-b64-inst",
2033 .description = "Has v_mov_b64 instruction",
2034 .dependencies = featureSet(&[_]Feature{}),
2035 };
2036 result[@backingInt(Feature.v_mul_u64_inst)] = .{
2037 .llvm_name = "v-mul-u64-inst",
2038 .description = "Has v_mul_u64 instruction.",
2039 .dependencies = featureSet(&[_]Feature{}),
2040 };
17292041 result[@backingInt(Feature.valu_trans_use_hazard)] = .{
17302042 .llvm_name = "valu-trans-use-hazard",
17312043 .description = "Hazard when TRANS instructions are closely followed by a use of the result",
......@@ -1758,7 +2070,7 @@ pub const all_features = blk: {
17582070 };
17592071 result[@backingInt(Feature.vmem_to_lds_load_insts)] = .{
17602072 .llvm_name = "vmem-to-lds-load-insts",
1761 .description = "The platform has memory to lds instructions (global_load w/lds bit set, buffer_load w/lds bit set or global_load_lds. This does not include scratch_load_lds.",
2073 .description = "The platform has memory to lds instructions (global_load w/lds bit set, buffer_loadw/lds bit set or global_load_lds. This does not include scratch_load_lds.",
17622074 .dependencies = featureSet(&[_]Feature{}),
17632075 };
17642076 result[@backingInt(Feature.vmem_to_scalar_write_hazard)] = .{
......@@ -1782,10 +2094,14 @@ pub const all_features = blk: {
17822094 .cvt_pknorm_vop2_insts,
17832095 .default_component_zero,
17842096 .dpp,
2097 .dpp_row_bcast,
2098 .dpp_wavefront_shifts,
17852099 .ds_src2_insts,
2100 .dx10_clamp_and_ieee_mode,
17862101 .extended_image_insts,
17872102 .fast_denormal_f32,
17882103 .flat_address_space,
2104 .formatted_mubuf_insts,
17892105 .fp64,
17902106 .gcn3_encoding,
17912107 .gds,
......@@ -1793,12 +2109,17 @@ pub const all_features = blk: {
17932109 .gfx8_insts,
17942110 .gws,
17952111 .image_insts,
2112 .instcachelinesize64,
17962113 .int_clamp_insts,
17972114 .inv_2pi_inline_imm,
17982115 .lerp_inst,
17992116 .mad_mac_f32_insts,
18002117 .mimg_r128,
18012118 .movrel,
2119 .mqsad_insts,
2120 .mqsad_pk_insts,
2121 .msad_insts,
2122 .mtbuf_insts,
18022123 .qsad_insts,
18032124 .s_memrealtime,
18042125 .s_memtime_inst,
......@@ -1824,6 +2145,11 @@ pub const all_features = blk: {
18242145 .description = "Has VOP3P packed instructions",
18252146 .dependencies = featureSet(&[_]Feature{}),
18262147 };
2148 result[@backingInt(Feature.vop3px2_increments_va_vdst_twice)] = .{
2149 .llvm_name = "vop3px2-increments-va-vdst-twice",
2150 .description = "VOP3PX2 encoded instructions increment the VaVdst counter twice",
2151 .dependencies = featureSet(&[_]Feature{}),
2152 };
18272153 result[@backingInt(Feature.vopd)] = .{
18282154 .llvm_name = "vopd",
18292155 .description = "Has VOPD dual issue wave32 instructions",
......@@ -1859,6 +2185,21 @@ pub const all_features = blk: {
18592185 .description = "The number of threads per wavefront",
18602186 .dependencies = featureSet(&[_]Feature{}),
18612187 };
2188 result[@backingInt(Feature.wmma_128b_insts)] = .{
2189 .llvm_name = "wmma-128b-insts",
2190 .description = "Has WMMA instructions where A and B matrices do not have duplicated data",
2191 .dependencies = featureSet(&[_]Feature{}),
2192 };
2193 result[@backingInt(Feature.wmma_256b_insts)] = .{
2194 .llvm_name = "wmma-256b-insts",
2195 .description = "Has WMMA instructions where A and B matrices have duplicated data",
2196 .dependencies = featureSet(&[_]Feature{}),
2197 };
2198 result[@backingInt(Feature.wmma_coexecution_hazards)] = .{
2199 .llvm_name = "wmma-coexecution-hazards",
2200 .description = "Hazards when WMMA co-executes with other WMMA/VALU instruction",
2201 .dependencies = featureSet(&[_]Feature{}),
2202 };
18622203 result[@backingInt(Feature.xf32_insts)] = .{
18632204 .llvm_name = "xf32-insts",
18642205 .description = "Has instructions that support xf32 format, such as v_mfma_f32_16x16x8_xf32 and v_mfma_f32_32x32x4_xf32",
......@@ -1867,7 +2208,16 @@ pub const all_features = blk: {
18672208 result[@backingInt(Feature.xnack)] = .{
18682209 .llvm_name = "xnack",
18692210 .description = "Enable XNACK support",
1870 .dependencies = featureSet(&[_]Feature{}),
2211 .dependencies = featureSet(&[_]Feature{
2212 .xnack_support,
2213 }),
2214 };
2215 result[@backingInt(Feature.xnack_on_off_modes)] = .{
2216 .llvm_name = "xnack-on-off-modes",
2217 .description = "Target supports XNACK on/off modes",
2218 .dependencies = featureSet(&[_]Feature{
2219 .xnack_support,
2220 }),
18712221 };
18722222 result[@backingInt(Feature.xnack_support)] = .{
18732223 .llvm_name = "xnack-support",
......@@ -1900,7 +2250,7 @@ pub const cpu = struct {
19002250 .ldsbankcount32,
19012251 .unpacked_d16_vmem,
19022252 .volcanic_islands,
1903 .xnack_support,
2253 .xnack_on_off_modes,
19042254 }),
19052255 };
19062256 pub const fiji: CpuModel = .{
......@@ -1951,7 +2301,7 @@ pub const cpu = struct {
19512301 .vcmpx_exec_war_hazard,
19522302 .vcmpx_permlane_hazard,
19532303 .vmem_to_scalar_write_hazard,
1954 .xnack_support,
2304 .xnack_on_off_modes,
19552305 }),
19562306 };
19572307 pub const gfx1011: CpuModel = .{
......@@ -1987,7 +2337,7 @@ pub const cpu = struct {
19872337 .vcmpx_exec_war_hazard,
19882338 .vcmpx_permlane_hazard,
19892339 .vmem_to_scalar_write_hazard,
1990 .xnack_support,
2340 .xnack_on_off_modes,
19912341 }),
19922342 };
19932343 pub const gfx1012: CpuModel = .{
......@@ -2023,7 +2373,7 @@ pub const cpu = struct {
20232373 .vcmpx_exec_war_hazard,
20242374 .vcmpx_permlane_hazard,
20252375 .vmem_to_scalar_write_hazard,
2026 .xnack_support,
2376 .xnack_on_off_modes,
20272377 }),
20282378 };
20292379 pub const gfx1013: CpuModel = .{
......@@ -2054,7 +2404,7 @@ pub const cpu = struct {
20542404 .vcmpx_exec_war_hazard,
20552405 .vcmpx_permlane_hazard,
20562406 .vmem_to_scalar_write_hazard,
2057 .xnack_support,
2407 .xnack_on_off_modes,
20582408 }),
20592409 };
20602410 pub const gfx1030: CpuModel = .{
......@@ -2232,7 +2582,7 @@ pub const cpu = struct {
22322582 .vcmpx_exec_war_hazard,
22332583 .vcmpx_permlane_hazard,
22342584 .vmem_to_scalar_write_hazard,
2235 .xnack_support,
2585 .xnack_on_off_modes,
22362586 }),
22372587 };
22382588 pub const gfx10_3_generic: CpuModel = .{
......@@ -2261,7 +2611,7 @@ pub const cpu = struct {
22612611 .name = "gfx1100",
22622612 .llvm_name = "gfx1100",
22632613 .features = featureSet(&[_]Feature{
2264 .allocate1_5xvgprs,
2614 .@"1536_physical_vgprs",
22652615 .architected_flat_scratch,
22662616 .atomic_fadd_no_rtn_insts,
22672617 .atomic_fadd_rtn_insts,
......@@ -2274,6 +2624,7 @@ pub const cpu = struct {
22742624 .dot7_insts,
22752625 .dot8_insts,
22762626 .dot9_insts,
2627 .dx10_clamp_and_ieee_mode,
22772628 .flat_atomic_fadd_f32_inst,
22782629 .gfx11,
22792630 .image_insts,
......@@ -2290,13 +2641,14 @@ pub const cpu = struct {
22902641 .user_sgpr_init16_bug,
22912642 .valu_trans_use_hazard,
22922643 .vcmpx_permlane_hazard,
2644 .wmma_256b_insts,
22932645 }),
22942646 };
22952647 pub const gfx1101: CpuModel = .{
22962648 .name = "gfx1101",
22972649 .llvm_name = "gfx1101",
22982650 .features = featureSet(&[_]Feature{
2299 .allocate1_5xvgprs,
2651 .@"1536_physical_vgprs",
23002652 .architected_flat_scratch,
23012653 .atomic_fadd_no_rtn_insts,
23022654 .atomic_fadd_rtn_insts,
......@@ -2309,6 +2661,7 @@ pub const cpu = struct {
23092661 .dot7_insts,
23102662 .dot8_insts,
23112663 .dot9_insts,
2664 .dx10_clamp_and_ieee_mode,
23122665 .flat_atomic_fadd_f32_inst,
23132666 .gfx11,
23142667 .image_insts,
......@@ -2324,6 +2677,7 @@ pub const cpu = struct {
23242677 .shader_cycles_register,
23252678 .valu_trans_use_hazard,
23262679 .vcmpx_permlane_hazard,
2680 .wmma_256b_insts,
23272681 }),
23282682 };
23292683 pub const gfx1102: CpuModel = .{
......@@ -2342,6 +2696,7 @@ pub const cpu = struct {
23422696 .dot7_insts,
23432697 .dot8_insts,
23442698 .dot9_insts,
2699 .dx10_clamp_and_ieee_mode,
23452700 .flat_atomic_fadd_f32_inst,
23462701 .gfx11,
23472702 .image_insts,
......@@ -2358,6 +2713,7 @@ pub const cpu = struct {
23582713 .user_sgpr_init16_bug,
23592714 .valu_trans_use_hazard,
23602715 .vcmpx_permlane_hazard,
2716 .wmma_256b_insts,
23612717 }),
23622718 };
23632719 pub const gfx1103: CpuModel = .{
......@@ -2376,6 +2732,7 @@ pub const cpu = struct {
23762732 .dot7_insts,
23772733 .dot8_insts,
23782734 .dot9_insts,
2735 .dx10_clamp_and_ieee_mode,
23792736 .flat_atomic_fadd_f32_inst,
23802737 .gfx11,
23812738 .image_insts,
......@@ -2391,6 +2748,7 @@ pub const cpu = struct {
23912748 .shader_cycles_register,
23922749 .valu_trans_use_hazard,
23932750 .vcmpx_permlane_hazard,
2751 .wmma_256b_insts,
23942752 }),
23952753 };
23962754 pub const gfx1150: CpuModel = .{
......@@ -2410,6 +2768,7 @@ pub const cpu = struct {
24102768 .dot8_insts,
24112769 .dot9_insts,
24122770 .dpp_src1_sgpr,
2771 .dx10_clamp_and_ieee_mode,
24132772 .flat_atomic_fadd_f32_inst,
24142773 .gfx11,
24152774 .image_insts,
......@@ -2424,13 +2783,14 @@ pub const cpu = struct {
24242783 .salu_float,
24252784 .shader_cycles_register,
24262785 .vcmpx_permlane_hazard,
2786 .wmma_256b_insts,
24272787 }),
24282788 };
24292789 pub const gfx1151: CpuModel = .{
24302790 .name = "gfx1151",
24312791 .llvm_name = "gfx1151",
24322792 .features = featureSet(&[_]Feature{
2433 .allocate1_5xvgprs,
2793 .@"1536_physical_vgprs",
24342794 .architected_flat_scratch,
24352795 .atomic_fadd_no_rtn_insts,
24362796 .atomic_fadd_rtn_insts,
......@@ -2444,6 +2804,7 @@ pub const cpu = struct {
24442804 .dot8_insts,
24452805 .dot9_insts,
24462806 .dpp_src1_sgpr,
2807 .dx10_clamp_and_ieee_mode,
24472808 .flat_atomic_fadd_f32_inst,
24482809 .gfx11,
24492810 .image_insts,
......@@ -2458,6 +2819,7 @@ pub const cpu = struct {
24582819 .salu_float,
24592820 .shader_cycles_register,
24602821 .vcmpx_permlane_hazard,
2822 .wmma_256b_insts,
24612823 }),
24622824 };
24632825 pub const gfx1152: CpuModel = .{
......@@ -2477,6 +2839,7 @@ pub const cpu = struct {
24772839 .dot8_insts,
24782840 .dot9_insts,
24792841 .dpp_src1_sgpr,
2842 .dx10_clamp_and_ieee_mode,
24802843 .flat_atomic_fadd_f32_inst,
24812844 .gfx11,
24822845 .image_insts,
......@@ -2491,6 +2854,7 @@ pub const cpu = struct {
24912854 .salu_float,
24922855 .shader_cycles_register,
24932856 .vcmpx_permlane_hazard,
2857 .wmma_256b_insts,
24942858 }),
24952859 };
24962860 pub const gfx1153: CpuModel = .{
......@@ -2510,6 +2874,7 @@ pub const cpu = struct {
25102874 .dot8_insts,
25112875 .dot9_insts,
25122876 .dpp_src1_sgpr,
2877 .dx10_clamp_and_ieee_mode,
25132878 .flat_atomic_fadd_f32_inst,
25142879 .gfx11,
25152880 .image_insts,
......@@ -2523,11 +2888,12 @@ pub const cpu = struct {
25232888 .salu_float,
25242889 .shader_cycles_register,
25252890 .vcmpx_permlane_hazard,
2891 .wmma_256b_insts,
25262892 }),
25272893 };
2528 pub const gfx11_generic: CpuModel = .{
2529 .name = "gfx11_generic",
2530 .llvm_name = "gfx11-generic",
2894 pub const gfx1154: CpuModel = .{
2895 .name = "gfx1154",
2896 .llvm_name = "gfx1154",
25312897 .features = featureSet(&[_]Feature{
25322898 .architected_flat_scratch,
25332899 .atomic_fadd_no_rtn_insts,
......@@ -2541,47 +2907,32 @@ pub const cpu = struct {
25412907 .dot7_insts,
25422908 .dot8_insts,
25432909 .dot9_insts,
2910 .dpp_src1_sgpr,
2911 .dx10_clamp_and_ieee_mode,
25442912 .flat_atomic_fadd_f32_inst,
25452913 .gfx11,
25462914 .image_insts,
25472915 .ldsbankcount32,
2548 .mad_intra_fwd_bug,
25492916 .memory_atomic_fadd_f32_denormal_support,
2550 .msaa_load_dst_sel_bug,
25512917 .nsa_encoding,
25522918 .packed_tid,
25532919 .partial_nsa_encoding,
2554 .priv_enabled_trap2_nop_bug,
25552920 .real_true16,
25562921 .required_export_priority,
2557 .requires_cov6,
2922 .salu_float,
25582923 .shader_cycles_register,
2559 .user_sgpr_init16_bug,
2560 .valu_trans_use_hazard,
25612924 .vcmpx_permlane_hazard,
2925 .wmma_256b_insts,
25622926 }),
25632927 };
2564 pub const gfx1200: CpuModel = .{
2565 .name = "gfx1200",
2566 .llvm_name = "gfx1200",
2928 pub const gfx1170: CpuModel = .{
2929 .name = "gfx1170",
2930 .llvm_name = "gfx1170",
25672931 .features = featureSet(&[_]Feature{
2568 .addressablelocalmemorysize65536,
2569 .allocate1_5xvgprs,
25702932 .architected_flat_scratch,
2571 .architected_sgprs,
2572 .atomic_buffer_global_pk_add_f16_insts,
2573 .atomic_buffer_pk_add_bf16_inst,
2574 .atomic_ds_pk_add_16_insts,
25752933 .atomic_fadd_no_rtn_insts,
25762934 .atomic_fadd_rtn_insts,
2577 .atomic_flat_pk_add_16_insts,
2578 .atomic_global_pk_add_bf16_inst,
25792935 .back_off_barrier,
2580 .bvh_dual_bvh_8_insts,
2581 .cube_insts,
2582 .cvt_norm_insts,
2583 .cvt_pknorm_vop2_insts,
2584 .cvt_pknorm_vop3_insts,
25852936 .d16_write_vgpr32,
25862937 .dl_insts,
25872938 .dot10_insts,
......@@ -2591,49 +2942,36 @@ pub const cpu = struct {
25912942 .dot8_insts,
25922943 .dot9_insts,
25932944 .dpp_src1_sgpr,
2594 .extended_image_insts,
25952945 .flat_atomic_fadd_f32_inst,
25962946 .fp8_conversion_insts,
2597 .gfx12,
2947 .gfx11,
2948 .gfx11_7_insts,
2949 .ieee_minimum_maximum_insts,
25982950 .image_insts,
25992951 .ldsbankcount32,
2600 .lerp_inst,
26012952 .memory_atomic_fadd_f32_denormal_support,
2953 .minimum3_maximum3_f16,
2954 .minimum3_maximum3_f32,
2955 .no_f16_pseudo_scalar_trans_inline_constants,
26022956 .nsa_encoding,
26032957 .packed_tid,
26042958 .partial_nsa_encoding,
2605 .pseudo_scalar_trans,
2606 .qsad_insts,
2607 .restricted_soffset,
2608 .sad_insts,
2959 .real_true16,
26092960 .salu_float,
2610 .scalar_dwordx3_loads,
2611 .shader_cycles_hi_lo_registers,
2961 .shader_cycles_register,
2962 .swmmac_gfx1200_insts,
26122963 .vcmpx_permlane_hazard,
2613 .waits_before_system_scope_stores,
2964 .wmma_128b_insts,
26142965 }),
26152966 };
2616 pub const gfx1201: CpuModel = .{
2617 .name = "gfx1201",
2618 .llvm_name = "gfx1201",
2967 pub const gfx1171: CpuModel = .{
2968 .name = "gfx1171",
2969 .llvm_name = "gfx1171",
26192970 .features = featureSet(&[_]Feature{
2620 .addressablelocalmemorysize65536,
2621 .allocate1_5xvgprs,
26222971 .architected_flat_scratch,
2623 .architected_sgprs,
2624 .atomic_buffer_global_pk_add_f16_insts,
2625 .atomic_buffer_pk_add_bf16_inst,
2626 .atomic_ds_pk_add_16_insts,
26272972 .atomic_fadd_no_rtn_insts,
26282973 .atomic_fadd_rtn_insts,
2629 .atomic_flat_pk_add_16_insts,
2630 .atomic_global_pk_add_bf16_inst,
26312974 .back_off_barrier,
2632 .bvh_dual_bvh_8_insts,
2633 .cube_insts,
2634 .cvt_norm_insts,
2635 .cvt_pknorm_vop2_insts,
2636 .cvt_pknorm_vop3_insts,
26372975 .d16_write_vgpr32,
26382976 .dl_insts,
26392977 .dot10_insts,
......@@ -2643,61 +2981,304 @@ pub const cpu = struct {
26432981 .dot8_insts,
26442982 .dot9_insts,
26452983 .dpp_src1_sgpr,
2646 .extended_image_insts,
26472984 .flat_atomic_fadd_f32_inst,
26482985 .fp8_conversion_insts,
2649 .gfx12,
2986 .gfx11,
2987 .gfx11_7_insts,
2988 .ieee_minimum_maximum_insts,
26502989 .image_insts,
26512990 .ldsbankcount32,
2652 .lerp_inst,
26532991 .memory_atomic_fadd_f32_denormal_support,
2992 .minimum3_maximum3_f16,
2993 .minimum3_maximum3_f32,
2994 .no_f16_pseudo_scalar_trans_inline_constants,
26542995 .nsa_encoding,
26552996 .packed_tid,
26562997 .partial_nsa_encoding,
2657 .pseudo_scalar_trans,
2658 .qsad_insts,
2659 .restricted_soffset,
2660 .sad_insts,
2998 .real_true16,
26612999 .salu_float,
2662 .scalar_dwordx3_loads,
2663 .shader_cycles_hi_lo_registers,
3000 .shader_cycles_register,
3001 .swmmac_gfx1200_insts,
26643002 .vcmpx_permlane_hazard,
2665 .waits_before_system_scope_stores,
3003 .wmma_128b_insts,
26663004 }),
26673005 };
2668 pub const gfx1250: CpuModel = .{
2669 .name = "gfx1250",
2670 .llvm_name = "gfx1250",
3006 pub const gfx1172: CpuModel = .{
3007 .name = "gfx1172",
3008 .llvm_name = "gfx1172",
26713009 .features = featureSet(&[_]Feature{
2672 .@"1024_addressable_vgprs",
2673 .@"45_bit_num_records_buffer_resource",
2674 .@"64_bit_literals",
2675 .add_min_max_insts,
2676 .add_sub_u64_insts,
2677 .addressablelocalmemorysize327680,
26783010 .architected_flat_scratch,
2679 .architected_sgprs,
2680 .ashr_pk_insts,
2681 .atomic_buffer_global_pk_add_f16_insts,
2682 .atomic_buffer_pk_add_bf16_inst,
2683 .atomic_ds_pk_add_16_insts,
26843011 .atomic_fadd_no_rtn_insts,
26853012 .atomic_fadd_rtn_insts,
2686 .atomic_flat_pk_add_16_insts,
2687 .atomic_fmin_fmax_flat_f64,
2688 .atomic_fmin_fmax_global_f64,
2689 .atomic_global_pk_add_bf16_inst,
2690 .bf16_cvt_insts,
2691 .bf16_pk_insts,
2692 .bf16_trans_insts,
2693 .bitop3_insts,
2694 .clusters,
2695 .cube_insts,
2696 .cumode,
2697 .cvt_norm_insts,
2698 .cvt_pk_f16_f32_inst,
2699 .cvt_pknorm_vop2_insts,
2700 .cvt_pknorm_vop3_insts,
3013 .back_off_barrier,
3014 .d16_write_vgpr32,
3015 .dl_insts,
3016 .dot10_insts,
3017 .dot11_insts,
3018 .dot12_insts,
3019 .dot7_insts,
3020 .dot8_insts,
3021 .dot9_insts,
3022 .dpp_src1_sgpr,
3023 .flat_atomic_fadd_f32_inst,
3024 .fp8_conversion_insts,
3025 .gfx11,
3026 .gfx11_7_insts,
3027 .ieee_minimum_maximum_insts,
3028 .image_insts,
3029 .ldsbankcount32,
3030 .memory_atomic_fadd_f32_denormal_support,
3031 .minimum3_maximum3_f16,
3032 .minimum3_maximum3_f32,
3033 .no_f16_pseudo_scalar_trans_inline_constants,
3034 .nsa_encoding,
3035 .packed_tid,
3036 .partial_nsa_encoding,
3037 .real_true16,
3038 .salu_float,
3039 .shader_cycles_register,
3040 .swmmac_gfx1200_insts,
3041 .vcmpx_permlane_hazard,
3042 .wmma_128b_insts,
3043 }),
3044 };
3045 pub const gfx11_7_generic: CpuModel = .{
3046 .name = "gfx11_7_generic",
3047 .llvm_name = "gfx11-7-generic",
3048 .features = featureSet(&[_]Feature{
3049 .architected_flat_scratch,
3050 .atomic_fadd_no_rtn_insts,
3051 .atomic_fadd_rtn_insts,
3052 .back_off_barrier,
3053 .d16_write_vgpr32,
3054 .dl_insts,
3055 .dot10_insts,
3056 .dot11_insts,
3057 .dot12_insts,
3058 .dot7_insts,
3059 .dot8_insts,
3060 .dot9_insts,
3061 .dpp_src1_sgpr,
3062 .flat_atomic_fadd_f32_inst,
3063 .fp8_conversion_insts,
3064 .gfx11,
3065 .gfx11_7_insts,
3066 .ieee_minimum_maximum_insts,
3067 .image_insts,
3068 .ldsbankcount32,
3069 .memory_atomic_fadd_f32_denormal_support,
3070 .minimum3_maximum3_f16,
3071 .minimum3_maximum3_f32,
3072 .no_f16_pseudo_scalar_trans_inline_constants,
3073 .nsa_encoding,
3074 .packed_tid,
3075 .partial_nsa_encoding,
3076 .real_true16,
3077 .requires_cov6,
3078 .salu_float,
3079 .shader_cycles_register,
3080 .swmmac_gfx1200_insts,
3081 .vcmpx_permlane_hazard,
3082 .wmma_128b_insts,
3083 }),
3084 };
3085 pub const gfx11_generic: CpuModel = .{
3086 .name = "gfx11_generic",
3087 .llvm_name = "gfx11-generic",
3088 .features = featureSet(&[_]Feature{
3089 .architected_flat_scratch,
3090 .atomic_fadd_no_rtn_insts,
3091 .atomic_fadd_rtn_insts,
3092 .back_off_barrier,
3093 .d16_write_vgpr32,
3094 .dl_insts,
3095 .dot10_insts,
3096 .dot12_insts,
3097 .dot5_insts,
3098 .dot7_insts,
3099 .dot8_insts,
3100 .dot9_insts,
3101 .dx10_clamp_and_ieee_mode,
3102 .flat_atomic_fadd_f32_inst,
3103 .gfx11,
3104 .image_insts,
3105 .ldsbankcount32,
3106 .mad_intra_fwd_bug,
3107 .memory_atomic_fadd_f32_denormal_support,
3108 .msaa_load_dst_sel_bug,
3109 .nsa_encoding,
3110 .packed_tid,
3111 .partial_nsa_encoding,
3112 .priv_enabled_trap2_nop_bug,
3113 .real_true16,
3114 .required_export_priority,
3115 .requires_cov6,
3116 .shader_cycles_register,
3117 .user_sgpr_init16_bug,
3118 .valu_trans_use_hazard,
3119 .vcmpx_permlane_hazard,
3120 .wmma_256b_insts,
3121 }),
3122 };
3123 pub const gfx1200: CpuModel = .{
3124 .name = "gfx1200",
3125 .llvm_name = "gfx1200",
3126 .features = featureSet(&[_]Feature{
3127 .@"1536_physical_vgprs",
3128 .addressablelocalmemorysize65536,
3129 .architected_flat_scratch,
3130 .architected_sgprs,
3131 .atomic_buffer_global_pk_add_f16_insts,
3132 .atomic_buffer_pk_add_bf16_inst,
3133 .atomic_ds_pk_add_16_insts,
3134 .atomic_fadd_no_rtn_insts,
3135 .atomic_fadd_rtn_insts,
3136 .atomic_flat_pk_add_16_insts,
3137 .atomic_global_pk_add_bf16_inst,
3138 .back_off_barrier,
3139 .bvh_dual_bvh_8_insts,
3140 .cube_insts,
3141 .cvt_norm_insts,
3142 .cvt_pknorm_vop2_insts,
3143 .cvt_pknorm_vop3_insts,
3144 .d16_write_vgpr32,
3145 .dl_insts,
3146 .dot10_insts,
3147 .dot11_insts,
3148 .dot12_insts,
3149 .dot7_insts,
3150 .dot8_insts,
3151 .dot9_insts,
3152 .dpp_src1_sgpr,
3153 .extended_image_insts,
3154 .flat_atomic_fadd_f32_inst,
3155 .formatted_mubuf_insts,
3156 .fp8_conversion_insts,
3157 .gfx12,
3158 .image_insts,
3159 .ldsbankcount32,
3160 .lerp_inst,
3161 .memory_atomic_fadd_f32_denormal_support,
3162 .mqsad_insts,
3163 .mqsad_pk_insts,
3164 .msad_insts,
3165 .mtbuf_insts,
3166 .no_f16_pseudo_scalar_trans_inline_constants,
3167 .nsa_encoding,
3168 .packed_tid,
3169 .partial_nsa_encoding,
3170 .pseudo_scalar_trans,
3171 .qsad_insts,
3172 .real_true16,
3173 .restricted_soffset,
3174 .sad_insts,
3175 .salu_float,
3176 .scalar_dwordx3_loads,
3177 .shader_cycles_hi_lo_registers,
3178 .smem_prefetch_insts,
3179 .swmmac_gfx1200_insts,
3180 .vcmpx_permlane_hazard,
3181 .waits_before_system_scope_stores,
3182 .wmma_128b_insts,
3183 }),
3184 };
3185 pub const gfx1201: CpuModel = .{
3186 .name = "gfx1201",
3187 .llvm_name = "gfx1201",
3188 .features = featureSet(&[_]Feature{
3189 .@"1536_physical_vgprs",
3190 .addressablelocalmemorysize65536,
3191 .architected_flat_scratch,
3192 .architected_sgprs,
3193 .atomic_buffer_global_pk_add_f16_insts,
3194 .atomic_buffer_pk_add_bf16_inst,
3195 .atomic_ds_pk_add_16_insts,
3196 .atomic_fadd_no_rtn_insts,
3197 .atomic_fadd_rtn_insts,
3198 .atomic_flat_pk_add_16_insts,
3199 .atomic_global_pk_add_bf16_inst,
3200 .back_off_barrier,
3201 .bvh_dual_bvh_8_insts,
3202 .cube_insts,
3203 .cvt_norm_insts,
3204 .cvt_pknorm_vop2_insts,
3205 .cvt_pknorm_vop3_insts,
3206 .d16_write_vgpr32,
3207 .dl_insts,
3208 .dot10_insts,
3209 .dot11_insts,
3210 .dot12_insts,
3211 .dot7_insts,
3212 .dot8_insts,
3213 .dot9_insts,
3214 .dpp_src1_sgpr,
3215 .extended_image_insts,
3216 .flat_atomic_fadd_f32_inst,
3217 .formatted_mubuf_insts,
3218 .fp8_conversion_insts,
3219 .gfx12,
3220 .image_insts,
3221 .ldsbankcount32,
3222 .lerp_inst,
3223 .memory_atomic_fadd_f32_denormal_support,
3224 .mqsad_insts,
3225 .mqsad_pk_insts,
3226 .msad_insts,
3227 .mtbuf_insts,
3228 .no_f16_pseudo_scalar_trans_inline_constants,
3229 .nsa_encoding,
3230 .packed_tid,
3231 .partial_nsa_encoding,
3232 .pseudo_scalar_trans,
3233 .qsad_insts,
3234 .real_true16,
3235 .restricted_soffset,
3236 .sad_insts,
3237 .salu_float,
3238 .scalar_dwordx3_loads,
3239 .shader_cycles_hi_lo_registers,
3240 .smem_prefetch_insts,
3241 .swmmac_gfx1200_insts,
3242 .vcmpx_permlane_hazard,
3243 .waits_before_system_scope_stores,
3244 .wmma_128b_insts,
3245 }),
3246 };
3247 pub const gfx1250: CpuModel = .{
3248 .name = "gfx1250",
3249 .llvm_name = "gfx1250",
3250 .features = featureSet(&[_]Feature{
3251 .@"1024_addressable_vgprs",
3252 .@"45_bit_num_records_buffer_resource",
3253 .@"64_bit_literals",
3254 .add_min_max_insts,
3255 .add_sub_u64_insts,
3256 .addressablelocalmemorysize327680,
3257 .architected_flat_scratch,
3258 .architected_sgprs,
3259 .ashr_pk_insts,
3260 .asynccnt,
3261 .atomic_buffer_global_pk_add_f16_insts,
3262 .atomic_buffer_pk_add_bf16_inst,
3263 .atomic_ds_pk_add_16_insts,
3264 .atomic_fadd_no_rtn_insts,
3265 .atomic_fadd_rtn_insts,
3266 .atomic_flat_pk_add_16_insts,
3267 .atomic_fmin_fmax_flat_f64,
3268 .atomic_fmin_fmax_global_f64,
3269 .atomic_global_pk_add_bf16_inst,
3270 .back_off_barrier,
3271 .bf16_cvt_insts,
3272 .bf16_pk_insts,
3273 .bf16_trans_insts,
3274 .bitop3_insts,
3275 .clusters,
3276 .cube_insts,
3277 .cumode,
3278 .cvt_norm_insts,
3279 .cvt_pk_f16_f32_inst,
3280 .cvt_pknorm_vop2_insts,
3281 .cvt_pknorm_vop3_insts,
27013282 .d16_write_vgpr32,
27023283 .dl_insts,
27033284 .dot7_insts,
......@@ -2719,12 +3300,18 @@ pub const cpu = struct {
27193300 .ldsbankcount32,
27203301 .lerp_inst,
27213302 .lshl_add_u64_inst,
3303 .mad_nc_64_32_insts,
27223304 .mad_u32_inst,
27233305 .max_hard_clause_length_63,
27243306 .mcast_load_insts,
27253307 .memory_atomic_fadd_f32_denormal_support,
27263308 .min3_max3_pkf16,
3309 .min_max_i64_insts,
27273310 .minimum3_maximum3_pkf16,
3311 .mqsad_insts,
3312 .mqsad_pk_insts,
3313 .msad_insts,
3314 .no_f16_pseudo_scalar_trans_inline_constants,
27283315 .packed_fp32_ops,
27293316 .packed_tid,
27303317 .permlane16_swap,
......@@ -2732,6 +3319,8 @@ pub const cpu = struct {
27323319 .prng_inst,
27333320 .pseudo_scalar_trans,
27343321 .qsad_insts,
3322 .real_true16,
3323 .requires_initial_unclause_vmem,
27353324 .restricted_soffset,
27363325 .s_wakeup_barrier_inst,
27373326 .sad_insts,
......@@ -2740,17 +3329,24 @@ pub const cpu = struct {
27403329 .setprio_inc_wg_inst,
27413330 .setreg_vgpr_msb_fixup,
27423331 .shader_cycles_hi_lo_registers,
3332 .smem_prefetch_insts,
27433333 .sramecc_support,
3334 .swmmac_gfx1200_insts,
3335 .swmmac_gfx1250_insts,
27443336 .tanh_insts,
27453337 .tensor_cvt_lut_insts,
3338 .trans_coexecution_hazard,
27463339 .transpose_load_f4f6_insts,
3340 .v_mov_b64_inst,
3341 .v_mul_u64_inst,
27473342 .vcmpx_permlane_hazard,
27483343 .vgpr_align2,
27493344 .vmem_pref_insts,
3345 .vop3px2_increments_va_vdst_twice,
27503346 .wait_xcnt,
27513347 .wavefrontsize32,
3348 .wmma_coexecution_hazards,
27523349 .xnack,
2753 .xnack_support,
27543350 }),
27553351 };
27563352 pub const gfx1251: CpuModel = .{
......@@ -2766,6 +3362,7 @@ pub const cpu = struct {
27663362 .architected_flat_scratch,
27673363 .architected_sgprs,
27683364 .ashr_pk_insts,
3365 .asynccnt,
27693366 .atomic_buffer_global_pk_add_f16_insts,
27703367 .atomic_buffer_pk_add_bf16_inst,
27713368 .atomic_ds_pk_add_16_insts,
......@@ -2775,6 +3372,7 @@ pub const cpu = struct {
27753372 .atomic_fmin_fmax_flat_f64,
27763373 .atomic_fmin_fmax_global_f64,
27773374 .atomic_global_pk_add_bf16_inst,
3375 .back_off_barrier,
27783376 .bf16_cvt_insts,
27793377 .bf16_pk_insts,
27803378 .bf16_trans_insts,
......@@ -2800,27 +3398,40 @@ pub const cpu = struct {
28003398 .fmacf64_inst,
28013399 .fp8_conversion_insts,
28023400 .fp8e5m3_insts,
3401 .full_rate_64_ops,
28033402 .gfx12,
28043403 .gfx1250_insts,
3404 .gfx1251_gemm_insts,
3405 .gfx125x_lowest_rate_wmma,
28053406 .globally_addressable_scratch,
28063407 .kernarg_preload,
28073408 .lds_barrier_arrive_atomic,
28083409 .ldsbankcount32,
28093410 .lerp_inst,
28103411 .lshl_add_u64_inst,
3412 .mad_nc_64_32_insts,
28113413 .mad_u32_inst,
28123414 .max_hard_clause_length_63,
28133415 .mcast_load_insts,
28143416 .memory_atomic_fadd_f32_denormal_support,
28153417 .min3_max3_pkf16,
3418 .min_max_i64_insts,
28163419 .minimum3_maximum3_pkf16,
3420 .mqsad_insts,
3421 .mqsad_pk_insts,
3422 .msad_insts,
3423 .no_f16_pseudo_scalar_trans_inline_constants,
28173424 .packed_fp32_ops,
3425 .packed_fp64_ops,
28183426 .packed_tid,
3427 .packed_u64_ops,
28193428 .permlane16_swap,
28203429 .pk_add_min_max_insts,
28213430 .prng_inst,
28223431 .pseudo_scalar_trans,
28233432 .qsad_insts,
3433 .real_true16,
3434 .requires_initial_unclause_vmem,
28243435 .restricted_soffset,
28253436 .s_wakeup_barrier_inst,
28263437 .sad_insts,
......@@ -2828,25 +3439,127 @@ pub const cpu = struct {
28283439 .scalar_dwordx3_loads,
28293440 .setprio_inc_wg_inst,
28303441 .shader_cycles_hi_lo_registers,
3442 .smem_prefetch_insts,
28313443 .sramecc_support,
3444 .swmmac_gfx1200_insts,
3445 .swmmac_gfx1250_insts,
28323446 .tanh_insts,
28333447 .tensor_cvt_lut_insts,
3448 .trans_coexecution_hazard,
28343449 .transpose_load_f4f6_insts,
3450 .use_add_pc64_inst,
3451 .v_mov_b64_inst,
3452 .v_mul_u64_inst,
28353453 .vcmpx_permlane_hazard,
28363454 .vgpr_align2,
28373455 .vmem_pref_insts,
3456 .vop3px2_increments_va_vdst_twice,
28383457 .wait_xcnt,
28393458 .wavefrontsize32,
3459 .wmma_coexecution_hazards,
3460 .xnack,
3461 }),
3462 };
3463 pub const gfx12_5_generic: CpuModel = .{
3464 .name = "gfx12_5_generic",
3465 .llvm_name = "gfx12-5-generic",
3466 .features = featureSet(&[_]Feature{
3467 .@"1024_addressable_vgprs",
3468 .@"45_bit_num_records_buffer_resource",
3469 .@"64_bit_literals",
3470 .add_min_max_insts,
3471 .add_sub_u64_insts,
3472 .addressablelocalmemorysize327680,
3473 .architected_flat_scratch,
3474 .architected_sgprs,
3475 .ashr_pk_insts,
3476 .asynccnt,
3477 .atomic_buffer_global_pk_add_f16_insts,
3478 .atomic_buffer_pk_add_bf16_inst,
3479 .atomic_ds_pk_add_16_insts,
3480 .atomic_fadd_no_rtn_insts,
3481 .atomic_fadd_rtn_insts,
3482 .atomic_flat_pk_add_16_insts,
3483 .atomic_fmin_fmax_flat_f64,
3484 .atomic_fmin_fmax_global_f64,
3485 .atomic_global_pk_add_bf16_inst,
3486 .back_off_barrier,
3487 .bf16_cvt_insts,
3488 .bf16_pk_insts,
3489 .bf16_trans_insts,
3490 .bitop3_insts,
3491 .clusters,
3492 .cumode,
3493 .cvt_pk_f16_f32_inst,
3494 .d16_write_vgpr32,
3495 .dl_insts,
3496 .dot7_insts,
3497 .dot8_insts,
3498 .dpp_src1_sgpr,
3499 .emulated_system_scope_atomics,
3500 .flat_atomic_fadd_f32_inst,
3501 .flat_buffer_global_fadd_f64_inst,
3502 .flat_gvs_mode,
3503 .fma_mix_bf16_insts,
3504 .fmacf64_inst,
3505 .fp8_conversion_insts,
3506 .fp8e5m3_insts,
3507 .gfx12,
3508 .gfx1250_insts,
3509 .gfx125x_lowest_rate_wmma,
3510 .globally_addressable_scratch,
3511 .kernarg_preload,
3512 .lds_barrier_arrive_atomic,
3513 .ldsbankcount32,
3514 .lshl_add_u64_inst,
3515 .mad_nc_64_32_insts,
3516 .mad_u32_inst,
3517 .max_hard_clause_length_63,
3518 .mcast_load_insts,
3519 .memory_atomic_fadd_f32_denormal_support,
3520 .min3_max3_pkf16,
3521 .min_max_i64_insts,
3522 .minimum3_maximum3_pkf16,
3523 .no_f16_pseudo_scalar_trans_inline_constants,
3524 .packed_fp32_ops,
3525 .packed_tid,
3526 .permlane16_swap,
3527 .pk_add_min_max_insts,
3528 .prng_inst,
3529 .pseudo_scalar_trans,
3530 .real_true16,
3531 .requires_cov6,
3532 .requires_initial_unclause_vmem,
3533 .restricted_soffset,
3534 .s_wakeup_barrier_inst,
3535 .salu_float,
3536 .scalar_dwordx3_loads,
3537 .setprio_inc_wg_inst,
3538 .setreg_vgpr_msb_fixup,
3539 .shader_cycles_hi_lo_registers,
3540 .smem_prefetch_insts,
3541 .sramecc_support,
3542 .tanh_insts,
3543 .tensor_cvt_lut_insts,
3544 .trans_coexecution_hazard,
3545 .transpose_load_f4f6_insts,
3546 .v_mov_b64_inst,
3547 .v_mul_u64_inst,
3548 .vcmpx_permlane_hazard,
3549 .vgpr_align2,
3550 .vmem_pref_insts,
3551 .wait_xcnt,
3552 .wavefrontsize32,
3553 .wmma_coexecution_hazards,
28403554 .xnack,
2841 .xnack_support,
28423555 }),
28433556 };
28443557 pub const gfx12_generic: CpuModel = .{
28453558 .name = "gfx12_generic",
28463559 .llvm_name = "gfx12-generic",
28473560 .features = featureSet(&[_]Feature{
3561 .@"1536_physical_vgprs",
28483562 .addressablelocalmemorysize65536,
2849 .allocate1_5xvgprs,
28503563 .architected_flat_scratch,
28513564 .architected_sgprs,
28523565 .atomic_buffer_global_pk_add_f16_insts,
......@@ -2873,25 +3586,170 @@ pub const cpu = struct {
28733586 .dpp_src1_sgpr,
28743587 .extended_image_insts,
28753588 .flat_atomic_fadd_f32_inst,
3589 .formatted_mubuf_insts,
28763590 .fp8_conversion_insts,
28773591 .gfx12,
28783592 .image_insts,
28793593 .ldsbankcount32,
28803594 .lerp_inst,
28813595 .memory_atomic_fadd_f32_denormal_support,
3596 .mqsad_insts,
3597 .mqsad_pk_insts,
3598 .msad_insts,
3599 .mtbuf_insts,
3600 .no_f16_pseudo_scalar_trans_inline_constants,
28823601 .nsa_encoding,
28833602 .packed_tid,
28843603 .partial_nsa_encoding,
28853604 .pseudo_scalar_trans,
28863605 .qsad_insts,
3606 .real_true16,
28873607 .requires_cov6,
28883608 .restricted_soffset,
28893609 .sad_insts,
28903610 .salu_float,
28913611 .scalar_dwordx3_loads,
28923612 .shader_cycles_hi_lo_registers,
3613 .smem_prefetch_insts,
3614 .swmmac_gfx1200_insts,
28933615 .vcmpx_permlane_hazard,
28943616 .waits_before_system_scope_stores,
3617 .wmma_128b_insts,
3618 }),
3619 };
3620 pub const gfx1310: CpuModel = .{
3621 .name = "gfx1310",
3622 .llvm_name = "gfx1310",
3623 .features = featureSet(&[_]Feature{
3624 .@"1536_physical_vgprs",
3625 .@"64_bit_literals",
3626 .addressablelocalmemorysize65536,
3627 .architected_flat_scratch,
3628 .architected_sgprs,
3629 .ashr_pk_insts,
3630 .atomic_buffer_global_pk_add_f16_insts,
3631 .atomic_buffer_pk_add_bf16_inst,
3632 .atomic_ds_pk_add_16_insts,
3633 .atomic_fadd_no_rtn_insts,
3634 .atomic_fadd_rtn_insts,
3635 .atomic_flat_pk_add_16_insts,
3636 .atomic_fmin_fmax_flat_f64,
3637 .atomic_fmin_fmax_global_f64,
3638 .atomic_global_pk_add_bf16_inst,
3639 .bf16_cvt_insts,
3640 .bf16_pk_insts,
3641 .bf16_trans_insts,
3642 .bitop3_insts,
3643 .clusters,
3644 .cube_insts,
3645 .cvt_norm_insts,
3646 .cvt_pk_f16_f32_inst,
3647 .cvt_pknorm_vop2_insts,
3648 .cvt_pknorm_vop3_insts,
3649 .dl_insts,
3650 .dot7_insts,
3651 .dot8_insts,
3652 .dpp_src1_sgpr,
3653 .f16bf16_to_fp6bf6_cvt_scale_insts,
3654 .flat_atomic_fadd_f32_inst,
3655 .flat_gvs_mode,
3656 .fma_mix_bf16_insts,
3657 .fmacf64_inst,
3658 .fp8_conversion_insts,
3659 .gfx1250_insts,
3660 .gfx13,
3661 .globally_addressable_scratch,
3662 .ldsbankcount32,
3663 .lerp_inst,
3664 .mqsad_insts,
3665 .mqsad_pk_insts,
3666 .msad_insts,
3667 .nsa_encoding,
3668 .packed_tid,
3669 .partial_nsa_encoding,
3670 .permlane16_swap,
3671 .prng_inst,
3672 .pseudo_scalar_trans,
3673 .qsad_insts,
3674 .restricted_soffset,
3675 .s_wakeup_barrier_inst,
3676 .sad_insts,
3677 .salu_float,
3678 .scalar_dwordx3_loads,
3679 .shader_cycles_register,
3680 .smem_prefetch_insts,
3681 .tanh_insts,
3682 .tensor_cvt_lut_insts,
3683 .transpose_load_f4f6_insts,
3684 .vcmpx_permlane_hazard,
3685 }),
3686 };
3687 pub const gfx13_generic: CpuModel = .{
3688 .name = "gfx13_generic",
3689 .llvm_name = "gfx13-generic",
3690 .features = featureSet(&[_]Feature{
3691 .@"1536_physical_vgprs",
3692 .@"64_bit_literals",
3693 .addressablelocalmemorysize65536,
3694 .architected_flat_scratch,
3695 .architected_sgprs,
3696 .ashr_pk_insts,
3697 .atomic_buffer_global_pk_add_f16_insts,
3698 .atomic_buffer_pk_add_bf16_inst,
3699 .atomic_ds_pk_add_16_insts,
3700 .atomic_fadd_no_rtn_insts,
3701 .atomic_fadd_rtn_insts,
3702 .atomic_flat_pk_add_16_insts,
3703 .atomic_fmin_fmax_flat_f64,
3704 .atomic_fmin_fmax_global_f64,
3705 .atomic_global_pk_add_bf16_inst,
3706 .bf16_cvt_insts,
3707 .bf16_pk_insts,
3708 .bf16_trans_insts,
3709 .bitop3_insts,
3710 .clusters,
3711 .cube_insts,
3712 .cvt_norm_insts,
3713 .cvt_pk_f16_f32_inst,
3714 .cvt_pknorm_vop2_insts,
3715 .cvt_pknorm_vop3_insts,
3716 .dl_insts,
3717 .dot7_insts,
3718 .dot8_insts,
3719 .dpp_src1_sgpr,
3720 .f16bf16_to_fp6bf6_cvt_scale_insts,
3721 .flat_atomic_fadd_f32_inst,
3722 .flat_gvs_mode,
3723 .fma_mix_bf16_insts,
3724 .fmacf64_inst,
3725 .fp8_conversion_insts,
3726 .gfx1250_insts,
3727 .gfx13,
3728 .globally_addressable_scratch,
3729 .ldsbankcount32,
3730 .lerp_inst,
3731 .mqsad_insts,
3732 .mqsad_pk_insts,
3733 .msad_insts,
3734 .nsa_encoding,
3735 .packed_tid,
3736 .partial_nsa_encoding,
3737 .permlane16_swap,
3738 .prng_inst,
3739 .pseudo_scalar_trans,
3740 .qsad_insts,
3741 .requires_cov6,
3742 .restricted_soffset,
3743 .s_wakeup_barrier_inst,
3744 .sad_insts,
3745 .salu_float,
3746 .scalar_dwordx3_loads,
3747 .shader_cycles_register,
3748 .smem_prefetch_insts,
3749 .tanh_insts,
3750 .tensor_cvt_lut_insts,
3751 .transpose_load_f4f6_insts,
3752 .vcmpx_permlane_hazard,
28953753 }),
28963754 };
28973755 pub const gfx600: CpuModel = .{
......@@ -2977,7 +3835,7 @@ pub const cpu = struct {
29773835 .ldsbankcount32,
29783836 .unpacked_d16_vmem,
29793837 .volcanic_islands,
2980 .xnack_support,
3838 .xnack_on_off_modes,
29813839 }),
29823840 };
29833841 pub const gfx802: CpuModel = .{
......@@ -3017,7 +3875,7 @@ pub const cpu = struct {
30173875 .image_store_d16_bug,
30183876 .ldsbankcount16,
30193877 .volcanic_islands,
3020 .xnack_support,
3878 .xnack_on_off_modes,
30213879 }),
30223880 };
30233881 pub const gfx900: CpuModel = .{
......@@ -3175,6 +4033,7 @@ pub const cpu = struct {
31754033 .packed_tid,
31764034 .pk_fmac_f16_inst,
31774035 .sramecc_support,
4036 .tgsplit_support,
31784037 .vgpr_align2,
31794038 }),
31804039 };
......@@ -3239,6 +4098,8 @@ pub const cpu = struct {
32394098 .packed_tid,
32404099 .pk_fmac_f16_inst,
32414100 .sramecc_support,
4101 .tgsplit_support,
4102 .v_mov_b64_inst,
32424103 .vgpr_align2,
32434104 .xf32_insts,
32444105 }),
......@@ -3295,6 +4156,8 @@ pub const cpu = struct {
32954156 .pk_fmac_f16_inst,
32964157 .prng_inst,
32974158 .sramecc_support,
4159 .tgsplit_support,
4160 .v_mov_b64_inst,
32984161 .vgpr_align2,
32994162 }),
33004163 };
......@@ -3342,6 +4205,8 @@ pub const cpu = struct {
33424205 .pk_fmac_f16_inst,
33434206 .requires_cov6,
33444207 .sramecc_support,
4208 .tgsplit_support,
4209 .v_mov_b64_inst,
33454210 .vgpr_align2,
33464211 }),
33474212 };
......@@ -3452,7 +4317,7 @@ pub const cpu = struct {
34524317 .image_store_d16_bug,
34534318 .ldsbankcount16,
34544319 .volcanic_islands,
3455 .xnack_support,
4320 .xnack_on_off_modes,
34564321 }),
34574322 };
34584323 pub const tahiti: CpuModel = .{
lib/std/Target/hexagon.zig+204
......@@ -34,7 +34,41 @@ pub const Feature = enum {
3434 nvs,
3535 packets,
3636 prev65,
37 reserved_r10,
38 reserved_r11,
39 reserved_r12,
40 reserved_r13,
41 reserved_r14,
42 reserved_r15,
43 reserved_r16,
44 reserved_r17,
45 reserved_r18,
3746 reserved_r19,
47 reserved_r20,
48 reserved_r21,
49 reserved_r22,
50 reserved_r23,
51 reserved_r24,
52 reserved_r25,
53 reserved_r26,
54 reserved_r27,
55 reserved_r28,
56 reserved_r6,
57 reserved_r7,
58 reserved_r8,
59 reserved_r9,
60 scs_reg_r16,
61 scs_reg_r17,
62 scs_reg_r18,
63 scs_reg_r19,
64 scs_reg_r20,
65 scs_reg_r21,
66 scs_reg_r22,
67 scs_reg_r23,
68 scs_reg_r24,
69 scs_reg_r25,
70 scs_reg_r26,
71 scs_reg_r27,
3872 small_data,
3973 tinycore,
4074 v5,
......@@ -241,11 +275,181 @@ pub const all_features = blk: {
241275 .description = "Support features deprecated in v65",
242276 .dependencies = featureSet(&[_]Feature{}),
243277 };
278 result[@backingInt(Feature.reserved_r10)] = .{
279 .llvm_name = "reserved-r10",
280 .description = "Reserve register R10",
281 .dependencies = featureSet(&[_]Feature{}),
282 };
283 result[@backingInt(Feature.reserved_r11)] = .{
284 .llvm_name = "reserved-r11",
285 .description = "Reserve register R11",
286 .dependencies = featureSet(&[_]Feature{}),
287 };
288 result[@backingInt(Feature.reserved_r12)] = .{
289 .llvm_name = "reserved-r12",
290 .description = "Reserve register R12",
291 .dependencies = featureSet(&[_]Feature{}),
292 };
293 result[@backingInt(Feature.reserved_r13)] = .{
294 .llvm_name = "reserved-r13",
295 .description = "Reserve register R13",
296 .dependencies = featureSet(&[_]Feature{}),
297 };
298 result[@backingInt(Feature.reserved_r14)] = .{
299 .llvm_name = "reserved-r14",
300 .description = "Reserve register R14",
301 .dependencies = featureSet(&[_]Feature{}),
302 };
303 result[@backingInt(Feature.reserved_r15)] = .{
304 .llvm_name = "reserved-r15",
305 .description = "Reserve register R15",
306 .dependencies = featureSet(&[_]Feature{}),
307 };
308 result[@backingInt(Feature.reserved_r16)] = .{
309 .llvm_name = "reserved-r16",
310 .description = "Reserve register R16",
311 .dependencies = featureSet(&[_]Feature{}),
312 };
313 result[@backingInt(Feature.reserved_r17)] = .{
314 .llvm_name = "reserved-r17",
315 .description = "Reserve register R17",
316 .dependencies = featureSet(&[_]Feature{}),
317 };
318 result[@backingInt(Feature.reserved_r18)] = .{
319 .llvm_name = "reserved-r18",
320 .description = "Reserve register R18",
321 .dependencies = featureSet(&[_]Feature{}),
322 };
244323 result[@backingInt(Feature.reserved_r19)] = .{
245324 .llvm_name = "reserved-r19",
246325 .description = "Reserve register R19",
247326 .dependencies = featureSet(&[_]Feature{}),
248327 };
328 result[@backingInt(Feature.reserved_r20)] = .{
329 .llvm_name = "reserved-r20",
330 .description = "Reserve register R20",
331 .dependencies = featureSet(&[_]Feature{}),
332 };
333 result[@backingInt(Feature.reserved_r21)] = .{
334 .llvm_name = "reserved-r21",
335 .description = "Reserve register R21",
336 .dependencies = featureSet(&[_]Feature{}),
337 };
338 result[@backingInt(Feature.reserved_r22)] = .{
339 .llvm_name = "reserved-r22",
340 .description = "Reserve register R22",
341 .dependencies = featureSet(&[_]Feature{}),
342 };
343 result[@backingInt(Feature.reserved_r23)] = .{
344 .llvm_name = "reserved-r23",
345 .description = "Reserve register R23",
346 .dependencies = featureSet(&[_]Feature{}),
347 };
348 result[@backingInt(Feature.reserved_r24)] = .{
349 .llvm_name = "reserved-r24",
350 .description = "Reserve register R24",
351 .dependencies = featureSet(&[_]Feature{}),
352 };
353 result[@backingInt(Feature.reserved_r25)] = .{
354 .llvm_name = "reserved-r25",
355 .description = "Reserve register R25",
356 .dependencies = featureSet(&[_]Feature{}),
357 };
358 result[@backingInt(Feature.reserved_r26)] = .{
359 .llvm_name = "reserved-r26",
360 .description = "Reserve register R26",
361 .dependencies = featureSet(&[_]Feature{}),
362 };
363 result[@backingInt(Feature.reserved_r27)] = .{
364 .llvm_name = "reserved-r27",
365 .description = "Reserve register R27",
366 .dependencies = featureSet(&[_]Feature{}),
367 };
368 result[@backingInt(Feature.reserved_r28)] = .{
369 .llvm_name = "reserved-r28",
370 .description = "Reserve register R28",
371 .dependencies = featureSet(&[_]Feature{}),
372 };
373 result[@backingInt(Feature.reserved_r6)] = .{
374 .llvm_name = "reserved-r6",
375 .description = "Reserve register R6",
376 .dependencies = featureSet(&[_]Feature{}),
377 };
378 result[@backingInt(Feature.reserved_r7)] = .{
379 .llvm_name = "reserved-r7",
380 .description = "Reserve register R7",
381 .dependencies = featureSet(&[_]Feature{}),
382 };
383 result[@backingInt(Feature.reserved_r8)] = .{
384 .llvm_name = "reserved-r8",
385 .description = "Reserve register R8",
386 .dependencies = featureSet(&[_]Feature{}),
387 };
388 result[@backingInt(Feature.reserved_r9)] = .{
389 .llvm_name = "reserved-r9",
390 .description = "Reserve register R9",
391 .dependencies = featureSet(&[_]Feature{}),
392 };
393 result[@backingInt(Feature.scs_reg_r16)] = .{
394 .llvm_name = "scs-reg-r16",
395 .description = "Use register R16 as the shadow call stack pointer",
396 .dependencies = featureSet(&[_]Feature{}),
397 };
398 result[@backingInt(Feature.scs_reg_r17)] = .{
399 .llvm_name = "scs-reg-r17",
400 .description = "Use register R17 as the shadow call stack pointer",
401 .dependencies = featureSet(&[_]Feature{}),
402 };
403 result[@backingInt(Feature.scs_reg_r18)] = .{
404 .llvm_name = "scs-reg-r18",
405 .description = "Use register R18 as the shadow call stack pointer",
406 .dependencies = featureSet(&[_]Feature{}),
407 };
408 result[@backingInt(Feature.scs_reg_r19)] = .{
409 .llvm_name = "scs-reg-r19",
410 .description = "Use register R19 as the shadow call stack pointer",
411 .dependencies = featureSet(&[_]Feature{}),
412 };
413 result[@backingInt(Feature.scs_reg_r20)] = .{
414 .llvm_name = "scs-reg-r20",
415 .description = "Use register R20 as the shadow call stack pointer",
416 .dependencies = featureSet(&[_]Feature{}),
417 };
418 result[@backingInt(Feature.scs_reg_r21)] = .{
419 .llvm_name = "scs-reg-r21",
420 .description = "Use register R21 as the shadow call stack pointer",
421 .dependencies = featureSet(&[_]Feature{}),
422 };
423 result[@backingInt(Feature.scs_reg_r22)] = .{
424 .llvm_name = "scs-reg-r22",
425 .description = "Use register R22 as the shadow call stack pointer",
426 .dependencies = featureSet(&[_]Feature{}),
427 };
428 result[@backingInt(Feature.scs_reg_r23)] = .{
429 .llvm_name = "scs-reg-r23",
430 .description = "Use register R23 as the shadow call stack pointer",
431 .dependencies = featureSet(&[_]Feature{}),
432 };
433 result[@backingInt(Feature.scs_reg_r24)] = .{
434 .llvm_name = "scs-reg-r24",
435 .description = "Use register R24 as the shadow call stack pointer",
436 .dependencies = featureSet(&[_]Feature{}),
437 };
438 result[@backingInt(Feature.scs_reg_r25)] = .{
439 .llvm_name = "scs-reg-r25",
440 .description = "Use register R25 as the shadow call stack pointer",
441 .dependencies = featureSet(&[_]Feature{}),
442 };
443 result[@backingInt(Feature.scs_reg_r26)] = .{
444 .llvm_name = "scs-reg-r26",
445 .description = "Use register R26 as the shadow call stack pointer",
446 .dependencies = featureSet(&[_]Feature{}),
447 };
448 result[@backingInt(Feature.scs_reg_r27)] = .{
449 .llvm_name = "scs-reg-r27",
450 .description = "Use register R27 as the shadow call stack pointer",
451 .dependencies = featureSet(&[_]Feature{}),
452 };
249453 result[@backingInt(Feature.small_data)] = .{
250454 .llvm_name = "small-data",
251455 .description = "Allow GP-relative addressing of global variables",
lib/std/Target/mips.zig+23
......@@ -13,6 +13,7 @@ pub const Feature = enum {
1313 dspr2,
1414 dspr3,
1515 eva,
16 fix_r5900,
1617 fp64,
1718 fpxx,
1819 ginv,
......@@ -52,6 +53,7 @@ pub const Feature = enum {
5253 notraps,
5354 p5600,
5455 ptr64,
56 r5900,
5557 single_float,
5658 soft_float,
5759 strict_align,
......@@ -121,6 +123,11 @@ pub const all_features = blk: {
121123 .description = "Mips EVA ASE",
122124 .dependencies = featureSet(&[_]Feature{}),
123125 };
126 result[@backingInt(Feature.fix_r5900)] = .{
127 .llvm_name = "fix-r5900",
128 .description = "Enable R5900 short loop erratum fix",
129 .dependencies = featureSet(&[_]Feature{}),
130 };
124131 result[@backingInt(Feature.fp64)] = .{
125132 .llvm_name = "fp64",
126133 .description = "Support 64-bit FP registers",
......@@ -372,6 +379,15 @@ pub const all_features = blk: {
372379 .description = "Pointers are 64-bit wide",
373380 .dependencies = featureSet(&[_]Feature{}),
374381 };
382 result[@backingInt(Feature.r5900)] = .{
383 .llvm_name = "r5900",
384 .description = "R5900 (PS2 Emotion Engine) Support",
385 .dependencies = featureSet(&[_]Feature{
386 .fix_r5900,
387 .mips3,
388 .single_float,
389 }),
390 };
375391 result[@backingInt(Feature.single_float)] = .{
376392 .llvm_name = "single-float",
377393 .description = "Only supports single precision float",
......@@ -596,4 +612,11 @@ pub const cpu = struct {
596612 .soft_float,
597613 }),
598614 };
615 pub const r5900: CpuModel = .{
616 .name = "r5900",
617 .llvm_name = "r5900",
618 .features = featureSet(&[_]Feature{
619 .r5900,
620 }),
621 };
599622};
lib/std/Target/nvptx.zig+18
......@@ -36,6 +36,9 @@ pub const Feature = enum {
3636 ptx87,
3737 ptx88,
3838 ptx90,
39 ptx91,
40 ptx92,
41 ptx93,
3942 sm_100,
4043 sm_100a,
4144 sm_100f,
......@@ -242,6 +245,21 @@ pub const all_features = blk: {
242245 .description = "Use PTX version 90",
243246 .dependencies = featureSet(&[_]Feature{}),
244247 };
248 result[@backingInt(Feature.ptx91)] = .{
249 .llvm_name = "ptx91",
250 .description = "Use PTX version 91",
251 .dependencies = featureSet(&[_]Feature{}),
252 };
253 result[@backingInt(Feature.ptx92)] = .{
254 .llvm_name = "ptx92",
255 .description = "Use PTX version 92",
256 .dependencies = featureSet(&[_]Feature{}),
257 };
258 result[@backingInt(Feature.ptx93)] = .{
259 .llvm_name = "ptx93",
260 .description = "Use PTX version 93",
261 .dependencies = featureSet(&[_]Feature{}),
262 };
245263 result[@backingInt(Feature.sm_100)] = .{
246264 .llvm_name = "sm_100",
247265 .description = "Target SM 100",
lib/std/Target/powerpc.zig+17-2
......@@ -43,6 +43,7 @@ pub const Feature = enum {
4343 fuse_wideimm,
4444 fuse_zeromove,
4545 fusion,
46 future_vector,
4647 hard_float,
4748 htm,
4849 icbt,
......@@ -83,6 +84,7 @@ pub const Feature = enum {
8384 spe,
8485 stfiwx,
8586 two_const_nr,
87 use_ptrgl_helper,
8688 vectors_use_two_units,
8789 vsx,
8890};
......@@ -342,6 +344,14 @@ pub const all_features = blk: {
342344 .description = "Target supports instruction fusion",
343345 .dependencies = featureSet(&[_]Feature{}),
344346 };
347 result[@backingInt(Feature.future_vector)] = .{
348 .llvm_name = "future-vector",
349 .description = "Enable Future vector instructions",
350 .dependencies = featureSet(&[_]Feature{
351 .isa_future_instructions,
352 .power10_vector,
353 }),
354 };
345355 result[@backingInt(Feature.hard_float)] = .{
346356 .llvm_name = "hard-float",
347357 .description = "Enable floating-point instructions",
......@@ -441,6 +451,7 @@ pub const all_features = blk: {
441451 .description = "32Byte load and store instructions",
442452 .dependencies = featureSet(&[_]Feature{
443453 .isa_v30_instructions,
454 .vsx,
444455 }),
445456 };
446457 result[@backingInt(Feature.partword_atomics)] = .{
......@@ -580,6 +591,11 @@ pub const all_features = blk: {
580591 .description = "Requires two constant Newton-Raphson computation",
581592 .dependencies = featureSet(&[_]Feature{}),
582593 };
594 result[@backingInt(Feature.use_ptrgl_helper)] = .{
595 .llvm_name = "use-ptrgl-helper",
596 .description = "Use ._ptrgl for indirect calls",
597 .dependencies = featureSet(&[_]Feature{}),
598 };
583599 result[@backingInt(Feature.vectors_use_two_units)] = .{
584600 .llvm_name = "vectors-use-two-units",
585601 .description = "Vectors use two units",
......@@ -803,8 +819,8 @@ pub const cpu = struct {
803819 .fuse_logical_add,
804820 .fuse_sha3,
805821 .fuse_store,
822 .future_vector,
806823 .icbt,
807 .isa_future_instructions,
808824 .isa_v206_instructions,
809825 .isel,
810826 .ldbrx,
......@@ -814,7 +830,6 @@ pub const cpu = struct {
814830 .partword_atomics,
815831 .pcrelative_memops,
816832 .popcntd,
817 .power10_vector,
818833 .ppc_postra_sched,
819834 .ppc_prera_sched,
820835 .predictable_select_expensive,
lib/std/Target/riscv.zig+673-134
......@@ -8,13 +8,8 @@ pub const Feature = enum {
88 @"32bit",
99 @"64bit",
1010 a,
11 add_load_fusion,
12 addi_load_fusion,
1311 andes45,
14 auipc_addi_fusion,
15 auipc_load_fusion,
1612 b,
17 bfext_fusion,
1813 c,
1914 conditional_cmv_fusion,
2015 d,
......@@ -25,6 +20,7 @@ pub const Feature = enum {
2520 disable_postmisched_store_clustering,
2621 dlen_factor_2,
2722 e,
23 enable_select_opt,
2824 enable_vsetvli_sched_heuristic,
2925 exact_asm,
3026 experimental,
......@@ -32,26 +28,57 @@ pub const Feature = enum {
3228 experimental_rvm23u32,
3329 experimental_smpmpmt,
3430 experimental_svukte,
35 experimental_xrivosvisni,
36 experimental_xrivosvizip,
31 experimental_xqccmt,
3732 experimental_xsfmclic,
3833 experimental_xsfsclic,
34 experimental_y,
3935 experimental_zibi,
4036 experimental_zicfilp,
4137 experimental_zicfiss,
38 experimental_zvabd,
4239 experimental_zvbc32e,
40 experimental_zvdot4a8i,
41 experimental_zvfbdota32f,
4342 experimental_zvfbfa,
4443 experimental_zvfofp8min,
44 experimental_zvfqwbdota8f,
45 experimental_zvfqwdota8f,
46 experimental_zvfwbdota16bf,
47 experimental_zvfwdota16bf,
4548 experimental_zvkgs,
46 experimental_zvqdotq,
49 experimental_zvqwbdota16i,
50 experimental_zvqwbdota8i,
51 experimental_zvqwdota16i,
52 experimental_zvqwdota8i,
53 experimental_zvvfmm,
54 experimental_zvvmm,
55 experimental_zvvmtls,
56 experimental_zvvmttls,
57 experimental_zvzip,
4758 f,
4859 forced_atomics,
60 fusion_add_load,
61 fusion_add_mem,
62 fusion_addi_load,
63 fusion_auipc_addi,
64 fusion_auipc_load,
65 fusion_bfext,
66 fusion_ld_add,
67 fusion_logic_imm_reg,
68 fusion_logic_reg_imm,
69 fusion_logic_reg_reg,
70 fusion_lui_addi,
71 fusion_lui_load,
72 fusion_mul_add,
73 fusion_qc_e_li_load_store,
74 fusion_shift_bit_extract,
75 fusion_shifted_zextw,
76 fusion_shxadd_load,
77 fusion_zexth,
78 fusion_zextw,
4979 h,
5080 i,
51 ld_add_fusion,
5281 log_vrgather,
53 lui_addi_fusion,
54 lui_load_fusion,
5582 m,
5683 mips_p8700,
5784 no_default_unroll,
......@@ -67,6 +94,7 @@ pub const Feature = enum {
6794 optimized_zero_stride_load,
6895 permissive_zalrsc,
6996 predictable_select_expensive,
97 prefer_ascending_load_store,
7098 prefer_vsetvli_over_read_vlenb,
7199 prefer_w_inst,
72100 q,
......@@ -118,17 +146,16 @@ pub const Feature = enum {
118146 sha,
119147 shcounterenw,
120148 shgatpa,
121 shifted_zextw_fusion,
122149 shlcofideleg,
123150 short_forward_branch_ialu,
124151 short_forward_branch_iload,
125152 short_forward_branch_iminmax,
153 short_forward_branch_imm,
126154 short_forward_branch_imul,
127155 shtvala,
128156 shvsatpa,
129157 shvstvala,
130158 shvstvecd,
131 shxadd_load_fusion,
132159 single_element_vec_fp64,
133160 smaia,
134161 smcdeleg,
......@@ -165,6 +192,7 @@ pub const Feature = enum {
165192 svinval,
166193 svnapot,
167194 svpbmt,
195 svrsw60t59b,
168196 svvptc,
169197 tagged_globals,
170198 unaligned_scalar_mem,
......@@ -174,6 +202,7 @@ pub const Feature = enum {
174202 ventana_veyron,
175203 vl_dependent_latency,
176204 vxrm_pipeline_flush,
205 xaifet,
177206 xandesbfhcvt,
178207 xandesperf,
179208 xandesvbfhcvt,
......@@ -181,6 +210,7 @@ pub const Feature = enum {
181210 xandesvpackfph,
182211 xandesvsinth,
183212 xandesvsintload,
213 xcheriot,
184214 xcvalu,
185215 xcvbi,
186216 xcvbitmanip,
......@@ -215,6 +245,7 @@ pub const Feature = enum {
215245 xsfcease,
216246 xsfmm128t,
217247 xsfmm16t,
248 xsfmm32a,
218249 xsfmm32a16f,
219250 xsfmm32a32f,
220251 xsfmm32a8f,
......@@ -236,6 +267,7 @@ pub const Feature = enum {
236267 xsifivecdiscarddlone,
237268 xsifivecflushdlone,
238269 xsmtvdot,
270 xsmtvdotii,
239271 xtheadba,
240272 xtheadbb,
241273 xtheadbs,
......@@ -275,8 +307,6 @@ pub const Feature = enum {
275307 zcmp,
276308 zcmt,
277309 zdinx,
278 zexth_fusion,
279 zextw_fusion,
280310 zfa,
281311 zfbfmin,
282312 zfh,
......@@ -290,6 +320,7 @@ pub const Feature = enum {
290320 zicboz,
291321 ziccamoa,
292322 ziccamoc,
323 ziccid,
293324 ziccif,
294325 zicclsm,
295326 ziccrse,
......@@ -301,7 +332,7 @@ pub const Feature = enum {
301332 zihintpause,
302333 zihpm,
303334 zilsd,
304 zilsd_4byte_align,
335 zilsd_word_align,
305336 zimop,
306337 zk,
307338 zkn,
......@@ -382,31 +413,11 @@ pub const all_features = blk: {
382413 .zalrsc,
383414 }),
384415 };
385 result[@backingInt(Feature.add_load_fusion)] = .{
386 .llvm_name = "add-load-fusion",
387 .description = "Enable ADD(.UW) + load macrofusion",
388 .dependencies = featureSet(&[_]Feature{}),
389 };
390 result[@backingInt(Feature.addi_load_fusion)] = .{
391 .llvm_name = "addi-load-fusion",
392 .description = "Enable ADDI + load macrofusion",
393 .dependencies = featureSet(&[_]Feature{}),
394 };
395416 result[@backingInt(Feature.andes45)] = .{
396417 .llvm_name = "andes45",
397418 .description = "Andes 45-Series processors",
398419 .dependencies = featureSet(&[_]Feature{}),
399420 };
400 result[@backingInt(Feature.auipc_addi_fusion)] = .{
401 .llvm_name = "auipc-addi-fusion",
402 .description = "Enable AUIPC+ADDI macrofusion",
403 .dependencies = featureSet(&[_]Feature{}),
404 };
405 result[@backingInt(Feature.auipc_load_fusion)] = .{
406 .llvm_name = "auipc-load-fusion",
407 .description = "Enable AUIPC + load macrofusion",
408 .dependencies = featureSet(&[_]Feature{}),
409 };
410421 result[@backingInt(Feature.b)] = .{
411422 .llvm_name = "b",
412423 .description = "'B' (the collection of the Zba, Zbb, Zbs extensions)",
......@@ -416,11 +427,6 @@ pub const all_features = blk: {
416427 .zbs,
417428 }),
418429 };
419 result[@backingInt(Feature.bfext_fusion)] = .{
420 .llvm_name = "bfext-fusion",
421 .description = "Enable SLLI+SRLI (bitfield extract) macrofusion",
422 .dependencies = featureSet(&[_]Feature{}),
423 };
424430 result[@backingInt(Feature.c)] = .{
425431 .llvm_name = "c",
426432 .description = "'C' (Compressed Instructions)",
......@@ -475,6 +481,11 @@ pub const all_features = blk: {
475481 .description = "'E' (Embedded Instruction Set with 16 GPRs)",
476482 .dependencies = featureSet(&[_]Feature{}),
477483 };
484 result[@backingInt(Feature.enable_select_opt)] = .{
485 .llvm_name = "enable-select-opt",
486 .description = "Enable the select optimize pass for select loop heuristics",
487 .dependencies = featureSet(&[_]Feature{}),
488 };
478489 result[@backingInt(Feature.enable_vsetvli_sched_heuristic)] = .{
479490 .llvm_name = "enable-vsetvli-sched-heuristic",
480491 .description = "Enable vsetvli-based scheduling heuristic",
......@@ -493,7 +504,12 @@ pub const all_features = blk: {
493504 result[@backingInt(Feature.experimental_p)] = .{
494505 .llvm_name = "experimental-p",
495506 .description = "'P' ('Base P' (Packed SIMD))",
496 .dependencies = featureSet(&[_]Feature{}),
507 .dependencies = featureSet(&[_]Feature{
508 .zba,
509 .zbb,
510 .zicsr,
511 .zmmul,
512 }),
497513 };
498514 result[@backingInt(Feature.experimental_rvm23u32)] = .{
499515 .llvm_name = "experimental-rvm23u32",
......@@ -522,15 +538,13 @@ pub const all_features = blk: {
522538 .description = "'Svukte' (Address-Independent Latency of User-Mode Faults to Supervisor Addresses)",
523539 .dependencies = featureSet(&[_]Feature{}),
524540 };
525 result[@backingInt(Feature.experimental_xrivosvisni)] = .{
526 .llvm_name = "experimental-xrivosvisni",
527 .description = "'XRivosVisni' (Rivos Vector Integer Small New)",
528 .dependencies = featureSet(&[_]Feature{}),
529 };
530 result[@backingInt(Feature.experimental_xrivosvizip)] = .{
531 .llvm_name = "experimental-xrivosvizip",
532 .description = "'XRivosVizip' (Rivos Vector Register Zips)",
533 .dependencies = featureSet(&[_]Feature{}),
541 result[@backingInt(Feature.experimental_xqccmt)] = .{
542 .llvm_name = "experimental-xqccmt",
543 .description = "'Xqccmt' (Qualcomm 16-bit Table Jump)",
544 .dependencies = featureSet(&[_]Feature{
545 .zca,
546 .zicsr,
547 }),
534548 };
535549 result[@backingInt(Feature.experimental_xsfmclic)] = .{
536550 .llvm_name = "experimental-xsfmclic",
......@@ -542,6 +556,11 @@ pub const all_features = blk: {
542556 .description = "'XSfsclic' (SiFive CLIC Supervisor-mode CSRs)",
543557 .dependencies = featureSet(&[_]Feature{}),
544558 };
559 result[@backingInt(Feature.experimental_y)] = .{
560 .llvm_name = "experimental-y",
561 .description = "'Y' ('Base Y' (CHERI))",
562 .dependencies = featureSet(&[_]Feature{}),
563 };
545564 result[@backingInt(Feature.experimental_zibi)] = .{
546565 .llvm_name = "experimental-zibi",
547566 .description = "'Zibi' (Branch with Immediate)",
......@@ -562,6 +581,11 @@ pub const all_features = blk: {
562581 .zimop,
563582 }),
564583 };
584 result[@backingInt(Feature.experimental_zvabd)] = .{
585 .llvm_name = "experimental-zvabd",
586 .description = "'Zvabd' (Vector Absolute Difference)",
587 .dependencies = featureSet(&[_]Feature{}),
588 };
565589 result[@backingInt(Feature.experimental_zvbc32e)] = .{
566590 .llvm_name = "experimental-zvbc32e",
567591 .description = "'Zvbc32e' (Vector Carryless Multiplication with 32-bits elements)",
......@@ -569,6 +593,20 @@ pub const all_features = blk: {
569593 .zve32x,
570594 }),
571595 };
596 result[@backingInt(Feature.experimental_zvdot4a8i)] = .{
597 .llvm_name = "experimental-zvdot4a8i",
598 .description = "'Zvdot4a8i' (Vector 4-element Dot Product of packed 8-bit Integers)",
599 .dependencies = featureSet(&[_]Feature{
600 .zve32x,
601 }),
602 };
603 result[@backingInt(Feature.experimental_zvfbdota32f)] = .{
604 .llvm_name = "experimental-zvfbdota32f",
605 .description = "'Zvfbdota32f' (FP32 batched dot-product extension)",
606 .dependencies = featureSet(&[_]Feature{
607 .zve32f,
608 }),
609 };
572610 result[@backingInt(Feature.experimental_zvfbfa)] = .{
573611 .llvm_name = "experimental-zvfbfa",
574612 .description = "'Zvfbfa' (Additional BF16 vector compute support)",
......@@ -584,6 +622,34 @@ pub const all_features = blk: {
584622 .zve32f,
585623 }),
586624 };
625 result[@backingInt(Feature.experimental_zvfqwbdota8f)] = .{
626 .llvm_name = "experimental-zvfqwbdota8f",
627 .description = "'Zvfqwbdota8f' (OCP FP8 batched dot-product extension)",
628 .dependencies = featureSet(&[_]Feature{
629 .zve32f,
630 }),
631 };
632 result[@backingInt(Feature.experimental_zvfqwdota8f)] = .{
633 .llvm_name = "experimental-zvfqwdota8f",
634 .description = "'Zvfqwdota8f' (OCP FP8 Dot-Product)",
635 .dependencies = featureSet(&[_]Feature{
636 .zve32f,
637 }),
638 };
639 result[@backingInt(Feature.experimental_zvfwbdota16bf)] = .{
640 .llvm_name = "experimental-zvfwbdota16bf",
641 .description = "'Zvfwbdota16bf' (BF16 batched dot-product extension)",
642 .dependencies = featureSet(&[_]Feature{
643 .zve32f,
644 }),
645 };
646 result[@backingInt(Feature.experimental_zvfwdota16bf)] = .{
647 .llvm_name = "experimental-zvfwdota16bf",
648 .description = "'Zvfwdota16bf' (BF16 Dot-Product)",
649 .dependencies = featureSet(&[_]Feature{
650 .zve32f,
651 }),
652 };
587653 result[@backingInt(Feature.experimental_zvkgs)] = .{
588654 .llvm_name = "experimental-zvkgs",
589655 .description = "'Zvkgs' (Vector-Scalar GCM instructions for Cryptography)",
......@@ -591,9 +657,65 @@ pub const all_features = blk: {
591657 .zvkg,
592658 }),
593659 };
594 result[@backingInt(Feature.experimental_zvqdotq)] = .{
595 .llvm_name = "experimental-zvqdotq",
596 .description = "'Zvqdotq' (Vector quad widening 4D Dot Product)",
660 result[@backingInt(Feature.experimental_zvqwbdota16i)] = .{
661 .llvm_name = "experimental-zvqwbdota16i",
662 .description = "'Zvqwbdota16i' (16-bit integer batched dot-product extension)",
663 .dependencies = featureSet(&[_]Feature{
664 .zve64x,
665 }),
666 };
667 result[@backingInt(Feature.experimental_zvqwbdota8i)] = .{
668 .llvm_name = "experimental-zvqwbdota8i",
669 .description = "'Zvqwbdota8i' (8-bit integer batched dot-product extension)",
670 .dependencies = featureSet(&[_]Feature{
671 .zve32x,
672 }),
673 };
674 result[@backingInt(Feature.experimental_zvqwdota16i)] = .{
675 .llvm_name = "experimental-zvqwdota16i",
676 .description = "'Zvqwdota16i' (16-bit Integer Dot-Product)",
677 .dependencies = featureSet(&[_]Feature{
678 .zve64x,
679 }),
680 };
681 result[@backingInt(Feature.experimental_zvqwdota8i)] = .{
682 .llvm_name = "experimental-zvqwdota8i",
683 .description = "'Zvqwdota8i' (8-bit Integer Dot-Product)",
684 .dependencies = featureSet(&[_]Feature{
685 .zve32x,
686 }),
687 };
688 result[@backingInt(Feature.experimental_zvvfmm)] = .{
689 .llvm_name = "experimental-zvvfmm",
690 .description = "'Zvvfmm' (Floating-Point Matrix Multiply-Accumulate)",
691 .dependencies = featureSet(&[_]Feature{
692 .zve32f,
693 }),
694 };
695 result[@backingInt(Feature.experimental_zvvmm)] = .{
696 .llvm_name = "experimental-zvvmm",
697 .description = "'Zvvmm' (Integer Matrix Multiply-Accumulate)",
698 .dependencies = featureSet(&[_]Feature{
699 .zve32x,
700 }),
701 };
702 result[@backingInt(Feature.experimental_zvvmtls)] = .{
703 .llvm_name = "experimental-zvvmtls",
704 .description = "'Zvvmtls' (Matrix Tile Load/Store)",
705 .dependencies = featureSet(&[_]Feature{
706 .zve32x,
707 }),
708 };
709 result[@backingInt(Feature.experimental_zvvmttls)] = .{
710 .llvm_name = "experimental-zvvmttls",
711 .description = "'Zvvmttls' (Transposing Matrix Tile Load/Store)",
712 .dependencies = featureSet(&[_]Feature{
713 .zve32x,
714 }),
715 };
716 result[@backingInt(Feature.experimental_zvzip)] = .{
717 .llvm_name = "experimental-zvzip",
718 .description = "'Zvzip' (Vector Reordering Structured Data)",
597719 .dependencies = featureSet(&[_]Feature{
598720 .zve32x,
599721 }),
......@@ -610,36 +732,116 @@ pub const all_features = blk: {
610732 .description = "Assume that lock-free native-width atomics are available",
611733 .dependencies = featureSet(&[_]Feature{}),
612734 };
613 result[@backingInt(Feature.h)] = .{
614 .llvm_name = "h",
615 .description = "'H' (Hypervisor)",
735 result[@backingInt(Feature.fusion_add_load)] = .{
736 .llvm_name = "fusion-add-load",
737 .description = "Enable ADD(.UW) + load macrofusion",
616738 .dependencies = featureSet(&[_]Feature{}),
617739 };
618 result[@backingInt(Feature.i)] = .{
619 .llvm_name = "i",
620 .description = "'I' (Base Integer Instruction Set)",
740 result[@backingInt(Feature.fusion_add_mem)] = .{
741 .llvm_name = "fusion-add-mem",
742 .description = "Enable ADD+LOAD/STORE macrofusion",
743 .dependencies = featureSet(&[_]Feature{}),
744 };
745 result[@backingInt(Feature.fusion_addi_load)] = .{
746 .llvm_name = "fusion-addi-load",
747 .description = "Enable ADDI + load macrofusion",
748 .dependencies = featureSet(&[_]Feature{}),
749 };
750 result[@backingInt(Feature.fusion_auipc_addi)] = .{
751 .llvm_name = "fusion-auipc-addi",
752 .description = "Enable AUIPC+ADDI macrofusion",
753 .dependencies = featureSet(&[_]Feature{}),
754 };
755 result[@backingInt(Feature.fusion_auipc_load)] = .{
756 .llvm_name = "fusion-auipc-load",
757 .description = "Enable AUIPC + load macrofusion",
758 .dependencies = featureSet(&[_]Feature{}),
759 };
760 result[@backingInt(Feature.fusion_bfext)] = .{
761 .llvm_name = "fusion-bfext",
762 .description = "Enable SLLI+SRLI (bitfield extract) macrofusion",
621763 .dependencies = featureSet(&[_]Feature{}),
622764 };
623 result[@backingInt(Feature.ld_add_fusion)] = .{
624 .llvm_name = "ld-add-fusion",
765 result[@backingInt(Feature.fusion_ld_add)] = .{
766 .llvm_name = "fusion-ld-add",
625767 .description = "Enable LD+ADD macrofusion",
626768 .dependencies = featureSet(&[_]Feature{}),
627769 };
628 result[@backingInt(Feature.log_vrgather)] = .{
629 .llvm_name = "log-vrgather",
630 .description = "Has vrgather.vv with LMUL*log2(LMUL) latency",
770 result[@backingInt(Feature.fusion_logic_imm_reg)] = .{
771 .llvm_name = "fusion-logic-imm-reg",
772 .description = "Enable ANDI/ORI/XORI+AND/OR/XOR macrofusion",
773 .dependencies = featureSet(&[_]Feature{}),
774 };
775 result[@backingInt(Feature.fusion_logic_reg_imm)] = .{
776 .llvm_name = "fusion-logic-reg-imm",
777 .description = "Enable AND/OR/XOR+ANDI/ORI/XORI macrofusion",
778 .dependencies = featureSet(&[_]Feature{}),
779 };
780 result[@backingInt(Feature.fusion_logic_reg_reg)] = .{
781 .llvm_name = "fusion-logic-reg-reg",
782 .description = "Enable AND/OR/XOR+AND/OR/XOR macrofusion",
631783 .dependencies = featureSet(&[_]Feature{}),
632784 };
633 result[@backingInt(Feature.lui_addi_fusion)] = .{
634 .llvm_name = "lui-addi-fusion",
785 result[@backingInt(Feature.fusion_lui_addi)] = .{
786 .llvm_name = "fusion-lui-addi",
635787 .description = "Enable LUI+ADDI macro fusion",
636788 .dependencies = featureSet(&[_]Feature{}),
637789 };
638 result[@backingInt(Feature.lui_load_fusion)] = .{
639 .llvm_name = "lui-load-fusion",
790 result[@backingInt(Feature.fusion_lui_load)] = .{
791 .llvm_name = "fusion-lui-load",
640792 .description = "Enable LUI + load macrofusion",
641793 .dependencies = featureSet(&[_]Feature{}),
642794 };
795 result[@backingInt(Feature.fusion_mul_add)] = .{
796 .llvm_name = "fusion-mul-add",
797 .description = "Enable MUL+ADD macrofusion",
798 .dependencies = featureSet(&[_]Feature{}),
799 };
800 result[@backingInt(Feature.fusion_qc_e_li_load_store)] = .{
801 .llvm_name = "fusion-qc-e-li-load-store",
802 .description = "Enable QC.E.LI + Load/Store macrofusion",
803 .dependencies = featureSet(&[_]Feature{}),
804 };
805 result[@backingInt(Feature.fusion_shift_bit_extract)] = .{
806 .llvm_name = "fusion-shift-bit-extract",
807 .description = "Enable SLLI+SRLI/SRAI macrofusion",
808 .dependencies = featureSet(&[_]Feature{}),
809 };
810 result[@backingInt(Feature.fusion_shifted_zextw)] = .{
811 .llvm_name = "fusion-shifted-zextw",
812 .description = "Enable SLLI+SRLI to be fused when computing (shifted) word zero extension",
813 .dependencies = featureSet(&[_]Feature{}),
814 };
815 result[@backingInt(Feature.fusion_shxadd_load)] = .{
816 .llvm_name = "fusion-shxadd-load",
817 .description = "Enable SH(1|2|3)ADD(.UW) + load macrofusion",
818 .dependencies = featureSet(&[_]Feature{}),
819 };
820 result[@backingInt(Feature.fusion_zexth)] = .{
821 .llvm_name = "fusion-zexth",
822 .description = "Enable SLLI+SRLI to be fused to zero extension of halfword",
823 .dependencies = featureSet(&[_]Feature{}),
824 };
825 result[@backingInt(Feature.fusion_zextw)] = .{
826 .llvm_name = "fusion-zextw",
827 .description = "Enable SLLI+SRLI to be fused to zero extension of word",
828 .dependencies = featureSet(&[_]Feature{}),
829 };
830 result[@backingInt(Feature.h)] = .{
831 .llvm_name = "h",
832 .description = "'H' (Hypervisor)",
833 .dependencies = featureSet(&[_]Feature{}),
834 };
835 result[@backingInt(Feature.i)] = .{
836 .llvm_name = "i",
837 .description = "'I' (Base Integer Instruction Set)",
838 .dependencies = featureSet(&[_]Feature{}),
839 };
840 result[@backingInt(Feature.log_vrgather)] = .{
841 .llvm_name = "log-vrgather",
842 .description = "Has vrgather.vv with LMUL*log2(LMUL) latency",
843 .dependencies = featureSet(&[_]Feature{}),
844 };
643845 result[@backingInt(Feature.m)] = .{
644846 .llvm_name = "m",
645847 .description = "'M' (Integer Multiplication and Division)",
......@@ -654,7 +856,7 @@ pub const all_features = blk: {
654856 };
655857 result[@backingInt(Feature.no_default_unroll)] = .{
656858 .llvm_name = "no-default-unroll",
657 .description = "Disable default unroll preference.",
859 .description = "Disable default unroll preference",
658860 .dependencies = featureSet(&[_]Feature{}),
659861 };
660862 result[@backingInt(Feature.no_sink_splat_operands)] = .{
......@@ -664,7 +866,7 @@ pub const all_features = blk: {
664866 };
665867 result[@backingInt(Feature.no_trailing_seq_cst_fence)] = .{
666868 .llvm_name = "no-trailing-seq-cst-fence",
667 .description = "Disable trailing fence for seq-cst store.",
869 .description = "Disable trailing fence for seq-cst store",
668870 .dependencies = featureSet(&[_]Feature{}),
669871 };
670872 result[@backingInt(Feature.optimized_nf2_segment_load_store)] = .{
......@@ -717,6 +919,11 @@ pub const all_features = blk: {
717919 .description = "Prefer likely predicted branches over selects",
718920 .dependencies = featureSet(&[_]Feature{}),
719921 };
922 result[@backingInt(Feature.prefer_ascending_load_store)] = .{
923 .llvm_name = "prefer-ascending-load-store",
924 .description = "Prefer ascending load/store order for better clustering and performance",
925 .dependencies = featureSet(&[_]Feature{}),
926 };
720927 result[@backingInt(Feature.prefer_vsetvli_over_read_vlenb)] = .{
721928 .llvm_name = "prefer-vsetvli-over-read-vlenb",
722929 .description = "Prefer vsetvli over read vlenb CSR to calculate VLEN",
......@@ -736,7 +943,7 @@ pub const all_features = blk: {
736943 };
737944 result[@backingInt(Feature.relax)] = .{
738945 .llvm_name = "relax",
739 .description = "Enable Linker relaxation.",
946 .description = "Enable Linker relaxation",
740947 .dependencies = featureSet(&[_]Feature{}),
741948 };
742949 result[@backingInt(Feature.reserve_x1)] = .{
......@@ -1187,7 +1394,7 @@ pub const all_features = blk: {
11871394 };
11881395 result[@backingInt(Feature.save_restore)] = .{
11891396 .llvm_name = "save-restore",
1190 .description = "Enable save/restore.",
1397 .description = "Enable save/restore",
11911398 .dependencies = featureSet(&[_]Feature{}),
11921399 };
11931400 result[@backingInt(Feature.sdext)] = .{
......@@ -1224,11 +1431,6 @@ pub const all_features = blk: {
12241431 .description = "'Shgatpa' (SvNNx4 mode supported for all modes supported by satp, as well as Bare)",
12251432 .dependencies = featureSet(&[_]Feature{}),
12261433 };
1227 result[@backingInt(Feature.shifted_zextw_fusion)] = .{
1228 .llvm_name = "shifted-zextw-fusion",
1229 .description = "Enable SLLI+SRLI to be fused when computing (shifted) word zero extension",
1230 .dependencies = featureSet(&[_]Feature{}),
1231 };
12321434 result[@backingInt(Feature.shlcofideleg)] = .{
12331435 .llvm_name = "shlcofideleg",
12341436 .description = "'Shlcofideleg' (Delegating LCOFI Interrupts to VS-mode)",
......@@ -1253,6 +1455,13 @@ pub const all_features = blk: {
12531455 .short_forward_branch_ialu,
12541456 }),
12551457 };
1458 result[@backingInt(Feature.short_forward_branch_imm)] = .{
1459 .llvm_name = "short-forward-branch-imm",
1460 .description = "Enable short forward branch optimization for branches with immediates",
1461 .dependencies = featureSet(&[_]Feature{
1462 .short_forward_branch_ialu,
1463 }),
1464 };
12561465 result[@backingInt(Feature.short_forward_branch_imul)] = .{
12571466 .llvm_name = "short-forward-branch-imul",
12581467 .description = "Enable short forward branch optimization for MUL instruction",
......@@ -1280,11 +1489,6 @@ pub const all_features = blk: {
12801489 .description = "'Shvstvecd' (vstvec supports Direct mode)",
12811490 .dependencies = featureSet(&[_]Feature{}),
12821491 };
1283 result[@backingInt(Feature.shxadd_load_fusion)] = .{
1284 .llvm_name = "shxadd-load-fusion",
1285 .description = "Enable SH(1|2|3)ADD(.UW) + load macrofusion",
1286 .dependencies = featureSet(&[_]Feature{}),
1287 };
12881492 result[@backingInt(Feature.single_element_vec_fp64)] = .{
12891493 .llvm_name = "single-element-vec-fp64",
12901494 .description = "Certain vector FP64 operations produce a single result element per cycle",
......@@ -1473,6 +1677,11 @@ pub const all_features = blk: {
14731677 .description = "'Svpbmt' (Page-Based Memory Types)",
14741678 .dependencies = featureSet(&[_]Feature{}),
14751679 };
1680 result[@backingInt(Feature.svrsw60t59b)] = .{
1681 .llvm_name = "svrsw60t59b",
1682 .description = "'Svrsw60t59b' (PTE Reserved-for-Software Bits 60-59)",
1683 .dependencies = featureSet(&[_]Feature{}),
1684 };
14761685 result[@backingInt(Feature.svvptc)] = .{
14771686 .llvm_name = "svvptc",
14781687 .description = "'Svvptc' (Obviating Memory-Management Instructions after Marking PTEs Valid)",
......@@ -1521,6 +1730,13 @@ pub const all_features = blk: {
15211730 .description = "VXRM writes causes pipeline flush",
15221731 .dependencies = featureSet(&[_]Feature{}),
15231732 };
1733 result[@backingInt(Feature.xaifet)] = .{
1734 .llvm_name = "xaifet",
1735 .description = "'XAIFET' (AI Foundry ET Extension)",
1736 .dependencies = featureSet(&[_]Feature{
1737 .f,
1738 }),
1739 };
15241740 result[@backingInt(Feature.xandesbfhcvt)] = .{
15251741 .llvm_name = "xandesbfhcvt",
15261742 .description = "'XAndesBFHCvt' (Andes Scalar BFLOAT16 Conversion Extension)",
......@@ -1568,6 +1784,15 @@ pub const all_features = blk: {
15681784 .zve32x,
15691785 }),
15701786 };
1787 result[@backingInt(Feature.xcheriot)] = .{
1788 .llvm_name = "xcheriot",
1789 .description = "'XCheriot' (CHERIoT extension)",
1790 .dependencies = featureSet(&[_]Feature{
1791 .e,
1792 .m,
1793 .zca,
1794 }),
1795 };
15711796 result[@backingInt(Feature.xcvalu)] = .{
15721797 .llvm_name = "xcvalu",
15731798 .description = "'XCValu' (CORE-V ALU Operations)",
......@@ -1787,6 +2012,15 @@ pub const all_features = blk: {
17872012 .zvl64b,
17882013 }),
17892014 };
2015 result[@backingInt(Feature.xsfmm32a)] = .{
2016 .llvm_name = "xsfmm32a",
2017 .description = "'XSfmm32a' (TEW=32-bit accumulation operands - int: 8b; float: fp16, bf16, fp32)",
2018 .dependencies = featureSet(&[_]Feature{
2019 .xsfmm32a16f,
2020 .xsfmm32a32f,
2021 .xsfmm32a8i,
2022 }),
2023 };
17902024 result[@backingInt(Feature.xsfmm32a16f)] = .{
17912025 .llvm_name = "xsfmm32a16f",
17922026 .description = "'XSfmm32a16f' (TEW=32-bit accumulation, operands - float: 16b, widen=2 (IEEE, BF))",
......@@ -1938,6 +2172,13 @@ pub const all_features = blk: {
19382172 .zve32f,
19392173 }),
19402174 };
2175 result[@backingInt(Feature.xsmtvdotii)] = .{
2176 .llvm_name = "xsmtvdotii",
2177 .description = "'XSMTVDotII' (SpacemiT Vector Extension for Matrix 2.0)",
2178 .dependencies = featureSet(&[_]Feature{
2179 .zve32f,
2180 }),
2181 };
19412182 result[@backingInt(Feature.xtheadba)] = .{
19422183 .llvm_name = "xtheadba",
19432184 .description = "'XTHeadBa' (T-Head address calculation instructions)",
......@@ -2069,7 +2310,9 @@ pub const all_features = blk: {
20692310 result[@backingInt(Feature.zbc)] = .{
20702311 .llvm_name = "zbc",
20712312 .description = "'Zbc' (Carry-Less Multiplication)",
2072 .dependencies = featureSet(&[_]Feature{}),
2313 .dependencies = featureSet(&[_]Feature{
2314 .zbkc,
2315 }),
20732316 };
20742317 result[@backingInt(Feature.zbkb)] = .{
20752318 .llvm_name = "zbkb",
......@@ -2165,16 +2408,6 @@ pub const all_features = blk: {
21652408 .zfinx,
21662409 }),
21672410 };
2168 result[@backingInt(Feature.zexth_fusion)] = .{
2169 .llvm_name = "zexth-fusion",
2170 .description = "Enable SLLI+SRLI to be fused to zero extension of halfword",
2171 .dependencies = featureSet(&[_]Feature{}),
2172 };
2173 result[@backingInt(Feature.zextw_fusion)] = .{
2174 .llvm_name = "zextw-fusion",
2175 .description = "Enable SLLI+SRLI to be fused to zero extension of word",
2176 .dependencies = featureSet(&[_]Feature{}),
2177 };
21782411 result[@backingInt(Feature.zfa)] = .{
21792412 .llvm_name = "zfa",
21802413 .description = "'Zfa' (Additional Floating-Point)",
......@@ -2254,6 +2487,13 @@ pub const all_features = blk: {
22542487 .description = "'Ziccamoc' (Main Memory Supports Atomics in Zacas)",
22552488 .dependencies = featureSet(&[_]Feature{}),
22562489 };
2490 result[@backingInt(Feature.ziccid)] = .{
2491 .llvm_name = "ziccid",
2492 .description = "'Ziccid' (Instruction/Data Coherence and Consistency)",
2493 .dependencies = featureSet(&[_]Feature{
2494 .ziccif,
2495 }),
2496 };
22572497 result[@backingInt(Feature.ziccif)] = .{
22582498 .llvm_name = "ziccif",
22592499 .description = "'Ziccif' (Main Memory Supports Instruction Fetch with Atomicity Requirement)",
......@@ -2313,8 +2553,8 @@ pub const all_features = blk: {
23132553 .description = "'Zilsd' (Load/Store Pair Instructions)",
23142554 .dependencies = featureSet(&[_]Feature{}),
23152555 };
2316 result[@backingInt(Feature.zilsd_4byte_align)] = .{
2317 .llvm_name = "zilsd-4byte-align",
2556 result[@backingInt(Feature.zilsd_word_align)] = .{
2557 .llvm_name = "zilsd-word-align",
23182558 .description = "Allow 4-byte alignment for Zilsd LD/SD instructions",
23192559 .dependencies = featureSet(&[_]Feature{}),
23202560 };
......@@ -2543,6 +2783,7 @@ pub const all_features = blk: {
25432783 .description = "'Zvknhb' (Vector SHA-2 (SHA-256 and SHA-512))",
25442784 .dependencies = featureSet(&[_]Feature{
25452785 .zve64x,
2786 .zvknha,
25462787 }),
25472788 };
25482789 result[@backingInt(Feature.zvks)] = .{
......@@ -2681,6 +2922,16 @@ pub const all_features = blk: {
26812922};
26822923
26832924pub const cpu = struct {
2925 pub const an_erbium: CpuModel = .{
2926 .name = "an_erbium",
2927 .llvm_name = "an-erbium",
2928 .features = featureSet(&[_]Feature{
2929 .@"64bit",
2930 .c,
2931 .m,
2932 .xaifet,
2933 }),
2934 };
26842935 pub const andes_45_series: CpuModel = .{
26852936 .name = "andes_45_series",
26862937 .llvm_name = "andes-45-series",
......@@ -2833,6 +3084,16 @@ pub const cpu = struct {
28333084 .m,
28343085 }),
28353086 };
3087 pub const et_soc1: CpuModel = .{
3088 .name = "et_soc1",
3089 .llvm_name = "et-soc1",
3090 .features = featureSet(&[_]Feature{
3091 .@"64bit",
3092 .c,
3093 .m,
3094 .xaifet,
3095 }),
3096 };
28363097 pub const generic: CpuModel = .{
28373098 .name = "generic",
28383099 .llvm_name = "generic",
......@@ -2848,6 +3109,7 @@ pub const cpu = struct {
28483109 .llvm_name = "generic-rv32",
28493110 .features = featureSet(&[_]Feature{
28503111 .@"32bit",
3112 .enable_select_opt,
28513113 .i,
28523114 .optimized_nf2_segment_load_store,
28533115 }),
......@@ -2857,6 +3119,7 @@ pub const cpu = struct {
28573119 .llvm_name = "generic-rv64",
28583120 .features = featureSet(&[_]Feature{
28593121 .@"64bit",
3122 .enable_select_opt,
28603123 .i,
28613124 .optimized_nf2_segment_load_store,
28623125 }),
......@@ -3020,13 +3283,13 @@ pub const cpu = struct {
30203283 .features = featureSet(&[_]Feature{
30213284 .@"64bit",
30223285 .a,
3023 .auipc_addi_fusion,
30243286 .b,
30253287 .c,
30263288 .conditional_cmv_fusion,
30273289 .d,
3290 .fusion_auipc_addi,
3291 .fusion_lui_addi,
30283292 .i,
3029 .lui_addi_fusion,
30303293 .m,
30313294 .no_default_unroll,
30323295 .unaligned_scalar_mem,
......@@ -3055,12 +3318,12 @@ pub const cpu = struct {
30553318 .features = featureSet(&[_]Feature{
30563319 .@"64bit",
30573320 .a,
3058 .auipc_addi_fusion,
30593321 .b,
30603322 .c,
30613323 .conditional_cmv_fusion,
3324 .fusion_auipc_addi,
3325 .fusion_lui_addi,
30623326 .i,
3063 .lui_addi_fusion,
30643327 .m,
30653328 .no_default_unroll,
30663329 .no_sink_splat_operands,
......@@ -3099,12 +3362,13 @@ pub const cpu = struct {
30993362 .features = featureSet(&[_]Feature{
31003363 .@"64bit",
31013364 .a,
3102 .auipc_addi_fusion,
31033365 .c,
31043366 .conditional_cmv_fusion,
31053367 .d,
3368 .enable_select_opt,
3369 .fusion_auipc_addi,
3370 .fusion_lui_addi,
31063371 .i,
3107 .lui_addi_fusion,
31083372 .m,
31093373 .no_default_unroll,
31103374 .use_postra_scheduler,
......@@ -3119,12 +3383,12 @@ pub const cpu = struct {
31193383 .features = featureSet(&[_]Feature{
31203384 .@"64bit",
31213385 .a,
3122 .auipc_addi_fusion,
31233386 .b,
31243387 .c,
31253388 .conditional_cmv_fusion,
3389 .fusion_auipc_addi,
3390 .fusion_lui_addi,
31263391 .i,
3127 .lui_addi_fusion,
31283392 .m,
31293393 .no_default_unroll,
31303394 .no_sink_splat_operands,
......@@ -3155,18 +3419,18 @@ pub const cpu = struct {
31553419 .zvksg,
31563420 }),
31573421 };
3158 pub const sifive_p870: CpuModel = .{
3159 .name = "sifive_p870",
3160 .llvm_name = "sifive-p870",
3422 pub const sifive_p870_d: CpuModel = .{
3423 .name = "sifive_p870_d",
3424 .llvm_name = "sifive-p870-d",
31613425 .features = featureSet(&[_]Feature{
31623426 .@"64bit",
31633427 .a,
3164 .auipc_addi_fusion,
31653428 .b,
31663429 .c,
31673430 .conditional_cmv_fusion,
3431 .fusion_auipc_addi,
3432 .fusion_lui_addi,
31683433 .i,
3169 .lui_addi_fusion,
31703434 .m,
31713435 .no_default_unroll,
31723436 .no_sink_splat_operands,
......@@ -3294,6 +3558,103 @@ pub const cpu = struct {
32943558 .zifencei,
32953559 }),
32963560 };
3561 pub const sifive_x160: CpuModel = .{
3562 .name = "sifive_x160",
3563 .llvm_name = "sifive-x160",
3564 .features = featureSet(&[_]Feature{
3565 .@"32bit",
3566 .a,
3567 .b,
3568 .c,
3569 .dlen_factor_2,
3570 .experimental_zicfilp,
3571 .experimental_zvdot4a8i,
3572 .experimental_zvfbfa,
3573 .i,
3574 .m,
3575 .no_default_unroll,
3576 .optimized_nf2_segment_load_store,
3577 .optimized_zero_stride_load,
3578 .short_forward_branch_ialu,
3579 .use_postra_scheduler,
3580 .vl_dependent_latency,
3581 .xsfcease,
3582 .zawrs,
3583 .zce,
3584 .zcf,
3585 .zcmop,
3586 .zfa,
3587 .zfh,
3588 .zicbom,
3589 .zicbop,
3590 .zicboz,
3591 .zicond,
3592 .zifencei,
3593 .zihintntl,
3594 .zihintpause,
3595 .zihpm,
3596 .zimop,
3597 .zkt,
3598 .zvbb,
3599 .zvfbfwma,
3600 .zvfh,
3601 .zvkt,
3602 .zvl128b,
3603 }),
3604 };
3605 pub const sifive_x180: CpuModel = .{
3606 .name = "sifive_x180",
3607 .llvm_name = "sifive-x180",
3608 .features = featureSet(&[_]Feature{
3609 .@"64bit",
3610 .a,
3611 .b,
3612 .c,
3613 .dlen_factor_2,
3614 .experimental_zicfilp,
3615 .experimental_zvdot4a8i,
3616 .experimental_zvfbfa,
3617 .i,
3618 .m,
3619 .no_default_unroll,
3620 .optimized_nf2_segment_load_store,
3621 .optimized_zero_stride_load,
3622 .short_forward_branch_ialu,
3623 .use_postra_scheduler,
3624 .v,
3625 .vl_dependent_latency,
3626 .xsfcease,
3627 .xsfvfbfexp16e,
3628 .xsfvfexp16e,
3629 .xsfvfexp32e,
3630 .xsfvfexpa,
3631 .xsifivecflushdlone,
3632 .za64rs,
3633 .zawrs,
3634 .zcb,
3635 .zcd,
3636 .zcmop,
3637 .zfa,
3638 .zfh,
3639 .zic64b,
3640 .zicbom,
3641 .zicbop,
3642 .zicboz,
3643 .ziccamoa,
3644 .ziccif,
3645 .ziccrse,
3646 .zicond,
3647 .zifencei,
3648 .zihintntl,
3649 .zihintpause,
3650 .zihpm,
3651 .zimop,
3652 .zkt,
3653 .zvbb,
3654 .zvfbfwma,
3655 .zvkt,
3656 }),
3657 };
32973658 pub const sifive_x280: CpuModel = .{
32983659 .name = "sifive_x280",
32993660 .llvm_name = "sifive-x280",
......@@ -3372,7 +3733,7 @@ pub const cpu = struct {
33723733 };
33733734 pub const spacemit_a100: CpuModel = .{
33743735 .name = "spacemit_a100",
3375 .llvm_name = null,
3736 .llvm_name = "spacemit-a100",
33763737 .features = featureSet(&[_]Feature{
33773738 .@"64bit",
33783739 .a,
......@@ -3405,10 +3766,10 @@ pub const cpu = struct {
34053766 .unaligned_scalar_mem,
34063767 .v,
34073768 .vxrm_pipeline_flush,
3769 .xsmtvdotii,
34083770 .za64rs,
34093771 .zawrs,
34103772 .zbc,
3411 .zbkc,
34123773 .zcb,
34133774 .zcmop,
34143775 .zfa,
......@@ -3433,7 +3794,6 @@ pub const cpu = struct {
34333794 .zvfbfwma,
34343795 .zvfh,
34353796 .zvkng,
3436 .zvknha,
34373797 .zvksc,
34383798 .zvksg,
34393799 .zvl1024b,
......@@ -3441,27 +3801,75 @@ pub const cpu = struct {
34413801 };
34423802 pub const spacemit_x100: CpuModel = .{
34433803 .name = "spacemit_x100",
3444 .llvm_name = null,
3804 .llvm_name = "spacemit-x100",
34453805 .features = featureSet(&[_]Feature{
3806 .@"64bit",
3807 .a,
3808 .b,
3809 .c,
34463810 .dlen_factor_2,
3811 .fusion_add_mem,
3812 .fusion_logic_imm_reg,
3813 .fusion_logic_reg_imm,
3814 .fusion_logic_reg_reg,
3815 .fusion_mul_add,
3816 .fusion_shift_bit_extract,
3817 .i,
3818 .m,
3819 .no_default_unroll,
34473820 .optimized_nf2_segment_load_store,
34483821 .optimized_nf3_segment_load_store,
34493822 .optimized_nf4_segment_load_store,
3450 .rva23s64,
3823 .sha,
34513824 .smepmp,
34523825 .smnpm,
34533826 .smstateen,
3827 .ssccptr,
3828 .sscofpmf,
3829 .sscounterenw,
3830 .ssnpm,
34543831 .sspm,
3832 .sstc,
3833 .sstvala,
3834 .sstvecd,
3835 .ssu64xl,
3836 .supm,
3837 .svade,
3838 .svbare,
3839 .svinval,
3840 .svnapot,
3841 .svpbmt,
34553842 .unaligned_scalar_mem,
3843 .v,
34563844 .vxrm_pipeline_flush,
34573845 .xsmtvdot,
3846 .za64rs,
3847 .zawrs,
34583848 .zbc,
3459 .zbkc,
3849 .zcb,
3850 .zcmop,
3851 .zfa,
34603852 .zfh,
3853 .zic64b,
3854 .zicbom,
3855 .zicbop,
3856 .zicboz,
3857 .ziccamoa,
3858 .ziccif,
3859 .zicclsm,
3860 .ziccrse,
3861 .zicntr,
3862 .zicond,
3863 .zifencei,
3864 .zihintntl,
3865 .zihintpause,
3866 .zihpm,
3867 .zimop,
3868 .zkt,
3869 .zvbb,
34613870 .zvfbfwma,
34623871 .zvfh,
34633872 .zvkng,
3464 .zvknha,
34653873 .zvksc,
34663874 .zvksg,
34673875 .zvl256b,
......@@ -3476,11 +3884,13 @@ pub const cpu = struct {
34763884 .b,
34773885 .c,
34783886 .dlen_factor_2,
3887 .enable_select_opt,
34793888 .i,
34803889 .m,
34813890 .optimized_nf2_segment_load_store,
34823891 .optimized_nf3_segment_load_store,
34833892 .optimized_nf4_segment_load_store,
3893 .prefer_ascending_load_store,
34843894 .ssccptr,
34853895 .sscofpmf,
34863896 .sscounterenw,
......@@ -3498,7 +3908,6 @@ pub const cpu = struct {
34983908 .xsmtvdot,
34993909 .za64rs,
35003910 .zbc,
3501 .zbkc,
35023911 .zfh,
35033912 .zic64b,
35043913 .zicbom,
......@@ -3652,9 +4061,9 @@ pub const cpu = struct {
36524061 .zkn,
36534062 }),
36544063 };
3655 pub const tt_ascalon_d8: CpuModel = .{
3656 .name = "tt_ascalon_d8",
3657 .llvm_name = "tt-ascalon-d8",
4064 pub const tt_ascalon_x: CpuModel = .{
4065 .name = "tt_ascalon_x",
4066 .llvm_name = "tt-ascalon-x",
36584067 .features = featureSet(&[_]Feature{
36594068 .@"64bit",
36604069 .a,
......@@ -3674,6 +4083,10 @@ pub const cpu = struct {
36744083 .optimized_zero_stride_load,
36754084 .sha,
36764085 .smaia,
4086 .smmpm,
4087 .smnpm,
4088 .smrnmi,
4089 .smstateen,
36774090 .ssaia,
36784091 .ssccptr,
36794092 .sscofpmf,
......@@ -3715,6 +4128,7 @@ pub const cpu = struct {
37154128 .zihintpause,
37164129 .zihpm,
37174130 .zimop,
4131 .zkr,
37184132 .zkt,
37194133 .zvbb,
37204134 .zvbc,
......@@ -3730,27 +4144,27 @@ pub const cpu = struct {
37304144 .features = featureSet(&[_]Feature{
37314145 .@"64bit",
37324146 .a,
3733 .add_load_fusion,
3734 .auipc_addi_fusion,
3735 .auipc_load_fusion,
37364147 .c,
37374148 .d,
37384149 .disable_misched_load_clustering,
37394150 .disable_postmisched_load_clustering,
37404151 .disable_postmisched_store_clustering,
4152 .fusion_add_load,
4153 .fusion_auipc_addi,
4154 .fusion_auipc_load,
4155 .fusion_lui_addi,
4156 .fusion_lui_load,
4157 .fusion_shifted_zextw,
4158 .fusion_zexth,
4159 .fusion_zextw,
37414160 .i,
3742 .lui_addi_fusion,
3743 .lui_load_fusion,
37444161 .m,
3745 .shifted_zextw_fusion,
37464162 .ventana_veyron,
37474163 .xventanacondops,
37484164 .zba,
37494165 .zbb,
37504166 .zbc,
37514167 .zbs,
3752 .zexth_fusion,
3753 .zextw_fusion,
37544168 .zicbom,
37554169 .zicbop,
37564170 .zicboz,
......@@ -3768,11 +4182,13 @@ pub const cpu = struct {
37684182 .a,
37694183 .b,
37704184 .c,
4185 .fusion_shifted_zextw,
4186 .fusion_zexth,
4187 .fusion_zextw,
37714188 .i,
37724189 .m,
37734190 .no_default_unroll,
37744191 .sha,
3775 .shifted_zextw_fusion,
37764192 .smaia,
37774193 .smcsrind,
37784194 .smdbltrp,
......@@ -3806,8 +4222,6 @@ pub const cpu = struct {
38064222 .zbc,
38074223 .zcb,
38084224 .zcmop,
3809 .zexth_fusion,
3810 .zextw_fusion,
38114225 .zfa,
38124226 .zfh,
38134227 .zic64b,
......@@ -3841,17 +4255,17 @@ pub const cpu = struct {
38414255 .a,
38424256 .c,
38434257 .d,
4258 .fusion_shifted_zextw,
4259 .fusion_zexth,
4260 .fusion_zextw,
38444261 .i,
38454262 .m,
38464263 .no_default_unroll,
3847 .shifted_zextw_fusion,
38484264 .svinval,
38494265 .zba,
38504266 .zbb,
38514267 .zbc,
38524268 .zbs,
3853 .zexth_fusion,
3854 .zextw_fusion,
38554269 .zicbom,
38564270 .zicboz,
38574271 .zifencei,
......@@ -3860,4 +4274,129 @@ pub const cpu = struct {
38604274 .zksh,
38614275 }),
38624276 };
4277 pub const xt_c910v2: CpuModel = .{
4278 .name = "xt_c910v2",
4279 .llvm_name = "xt-c910v2",
4280 .features = featureSet(&[_]Feature{
4281 .@"64bit",
4282 .a,
4283 .b,
4284 .c,
4285 .i,
4286 .m,
4287 .ssccptr,
4288 .sscofpmf,
4289 .sscounterenw,
4290 .sstc,
4291 .sstvala,
4292 .sstvecd,
4293 .ssu64xl,
4294 .svade,
4295 .svbare,
4296 .svinval,
4297 .svnapot,
4298 .svpbmt,
4299 .unaligned_scalar_mem,
4300 .use_postra_scheduler,
4301 .vxrm_pipeline_flush,
4302 .xtheadba,
4303 .xtheadbb,
4304 .xtheadbs,
4305 .xtheadcmo,
4306 .xtheadcondmov,
4307 .xtheadfmemidx,
4308 .xtheadmac,
4309 .xtheadmemidx,
4310 .xtheadmempair,
4311 .xtheadsync,
4312 .za64rs,
4313 .zawrs,
4314 .zbc,
4315 .zcb,
4316 .zcd,
4317 .zcmop,
4318 .zfa,
4319 .zfbfmin,
4320 .zfh,
4321 .zic64b,
4322 .zicbom,
4323 .zicbop,
4324 .zicboz,
4325 .ziccamoa,
4326 .ziccif,
4327 .zicclsm,
4328 .ziccrse,
4329 .zicntr,
4330 .zicond,
4331 .zifencei,
4332 .zihintntl,
4333 .zihintpause,
4334 .zihpm,
4335 .zimop,
4336 .zkt,
4337 }),
4338 };
4339 pub const xt_c920v2: CpuModel = .{
4340 .name = "xt_c920v2",
4341 .llvm_name = "xt-c920v2",
4342 .features = featureSet(&[_]Feature{
4343 .@"64bit",
4344 .a,
4345 .b,
4346 .c,
4347 .i,
4348 .m,
4349 .ssccptr,
4350 .sscofpmf,
4351 .sscounterenw,
4352 .sstc,
4353 .sstvala,
4354 .sstvecd,
4355 .ssu64xl,
4356 .svade,
4357 .svbare,
4358 .svinval,
4359 .svnapot,
4360 .svpbmt,
4361 .unaligned_scalar_mem,
4362 .use_postra_scheduler,
4363 .vxrm_pipeline_flush,
4364 .xtheadba,
4365 .xtheadbb,
4366 .xtheadbs,
4367 .xtheadcmo,
4368 .xtheadcondmov,
4369 .xtheadfmemidx,
4370 .xtheadmac,
4371 .xtheadmemidx,
4372 .xtheadmempair,
4373 .xtheadsync,
4374 .xtheadvdot,
4375 .za64rs,
4376 .zawrs,
4377 .zbc,
4378 .zcb,
4379 .zcd,
4380 .zcmop,
4381 .zfa,
4382 .zfh,
4383 .zic64b,
4384 .zicbom,
4385 .zicbop,
4386 .zicboz,
4387 .ziccamoa,
4388 .ziccif,
4389 .ziccrse,
4390 .zicntr,
4391 .zicond,
4392 .zifencei,
4393 .zihintntl,
4394 .zihintpause,
4395 .zihpm,
4396 .zimop,
4397 .zkt,
4398 .zvfbfwma,
4399 .zvfh,
4400 }),
4401 };
38634402};
lib/std/Target/sparc.zig+1
......@@ -462,6 +462,7 @@ pub const cpu = struct {
462462 .name = "leon3",
463463 .llvm_name = "leon3",
464464 .features = featureSet(&[_]Feature{
465 .hasleoncasa,
465466 .hasumacsmac,
466467 .leon,
467468 }),
lib/std/Target/wasm.zig+13-4
......@@ -19,6 +19,7 @@ pub const Feature = enum {
1919 nontrapping_bulk_memory_len0,
2020 nontrapping_fptoint,
2121 reference_types,
22 relaxed_atomics,
2223 relaxed_simd,
2324 sign_ext,
2425 simd128,
......@@ -60,7 +61,10 @@ pub const all_features = blk: {
6061 result[@backingInt(Feature.exception_handling)] = .{
6162 .llvm_name = "exception-handling",
6263 .description = "Enable Wasm exception handling",
63 .dependencies = featureSet(&[_]Feature{}),
64 .dependencies = featureSet(&[_]Feature{
65 .multivalue,
66 .reference_types,
67 }),
6468 };
6569 result[@backingInt(Feature.extended_const)] = .{
6670 .llvm_name = "extended-const",
......@@ -75,7 +79,9 @@ pub const all_features = blk: {
7579 result[@backingInt(Feature.gc)] = .{
7680 .llvm_name = "gc",
7781 .description = "Enable wasm gc",
78 .dependencies = featureSet(&[_]Feature{}),
82 .dependencies = featureSet(&[_]Feature{
83 .reference_types,
84 }),
7985 };
8086 result[@backingInt(Feature.multimemory)] = .{
8187 .llvm_name = "multimemory",
......@@ -111,6 +117,11 @@ pub const all_features = blk: {
111117 .call_indirect_overlong,
112118 }),
113119 };
120 result[@backingInt(Feature.relaxed_atomics)] = .{
121 .llvm_name = "relaxed-atomics",
122 .description = "Enable relaxed-atomics proposal",
123 .dependencies = featureSet(&[_]Feature{}),
124 };
114125 result[@backingInt(Feature.relaxed_simd)] = .{
115126 .llvm_name = "relaxed-simd",
116127 .description = "Enable relaxed-simd instructions",
......@@ -156,10 +167,8 @@ pub const cpu = struct {
156167 .fp16,
157168 .gc,
158169 .multimemory,
159 .multivalue,
160170 .mutable_globals,
161171 .nontrapping_fptoint,
162 .reference_types,
163172 .relaxed_simd,
164173 .sign_ext,
165174 .simd128,
lib/std/Target/x86.zig+533-16
......@@ -20,7 +20,6 @@ pub const Feature = enum {
2020 amx_fp8,
2121 amx_int8,
2222 amx_movrs,
23 amx_tf32,
2423 amx_tile,
2524 avx,
2625 avx10_1,
......@@ -28,6 +27,7 @@ pub const Feature = enum {
2827 avx2,
2928 avx512bf16,
3029 avx512bitalg,
30 avx512bmm,
3131 avx512bw,
3232 avx512cd,
3333 avx512dq,
......@@ -67,13 +67,17 @@ pub const Feature = enum {
6767 enqcmd,
6868 ermsb,
6969 f16c,
70 false_deps_bls,
71 false_deps_compress,
72 false_deps_expand,
7073 false_deps_getmant,
71 false_deps_lzcnt_tzcnt,
74 false_deps_lzcnt,
7275 false_deps_mulc,
7376 false_deps_mullq,
7477 false_deps_perm,
7578 false_deps_popcnt,
7679 false_deps_range,
80 false_deps_tzcnt,
7781 fast_11bytenop,
7882 fast_15bytenop,
7983 fast_7bytenop,
......@@ -105,6 +109,7 @@ pub const Feature = enum {
105109 idivq_to_divl,
106110 inline_asm_use_gpr32,
107111 invpcid,
112 jmpabs,
108113 kl,
109114 lea_sp,
110115 lea_uses_ag,
......@@ -137,6 +142,7 @@ pub const Feature = enum {
137142 prefer_legacy_setcc,
138143 prefer_mask_registers,
139144 prefer_movmsk_over_vtest,
145 prefer_ndd_mem,
140146 prefer_no_gather,
141147 prefer_no_scatter,
142148 prefetchi,
......@@ -149,6 +155,31 @@ pub const Feature = enum {
149155 rdpru,
150156 rdrnd,
151157 rdseed,
158 reserve_edi,
159 reserve_r10,
160 reserve_r11,
161 reserve_r12,
162 reserve_r13,
163 reserve_r14,
164 reserve_r15,
165 reserve_r16,
166 reserve_r17,
167 reserve_r18,
168 reserve_r19,
169 reserve_r20,
170 reserve_r21,
171 reserve_r22,
172 reserve_r23,
173 reserve_r24,
174 reserve_r25,
175 reserve_r26,
176 reserve_r27,
177 reserve_r28,
178 reserve_r29,
179 reserve_r30,
180 reserve_r31,
181 reserve_r8,
182 reserve_r9,
152183 retpoline,
153184 retpoline_external_thunk,
154185 retpoline_indirect_branches,
......@@ -164,6 +195,7 @@ pub const Feature = enum {
164195 shstk,
165196 slow_3ops_lea,
166197 slow_incdec,
198 slow_indirect_call,
167199 slow_lea,
168200 slow_pmaddwd,
169201 slow_pmulld,
......@@ -313,13 +345,6 @@ pub const all_features = blk: {
313345 .amx_tile,
314346 }),
315347 };
316 result[@backingInt(Feature.amx_tf32)] = .{
317 .llvm_name = "amx-tf32",
318 .description = "Support AMX-TF32 instructions",
319 .dependencies = featureSet(&[_]Feature{
320 .amx_tile,
321 }),
322 };
323348 result[@backingInt(Feature.amx_tile)] = .{
324349 .llvm_name = "amx-tile",
325350 .description = "Support AMX-TILE instructions",
......@@ -377,6 +402,13 @@ pub const all_features = blk: {
377402 .avx512bw,
378403 }),
379404 };
405 result[@backingInt(Feature.avx512bmm)] = .{
406 .llvm_name = "avx512bmm",
407 .description = "Enable AVX512 Bit Matrix Multiply",
408 .dependencies = featureSet(&[_]Feature{
409 .avx512bw,
410 }),
411 };
380412 result[@backingInt(Feature.avx512bw)] = .{
381413 .llvm_name = "avx512bw",
382414 .description = "Enable AVX-512 Byte and Word Instructions",
......@@ -616,14 +648,29 @@ pub const all_features = blk: {
616648 .avx,
617649 }),
618650 };
651 result[@backingInt(Feature.false_deps_bls)] = .{
652 .llvm_name = "false-deps-bls",
653 .description = "BLSR/BLSI/BLSMSK have a false dependency on dest register",
654 .dependencies = featureSet(&[_]Feature{}),
655 };
656 result[@backingInt(Feature.false_deps_compress)] = .{
657 .llvm_name = "false-deps-compress",
658 .description = "V[P]COMPRESSPD/PS/Q/D/W/B with zero-masking has a false dependency on dest register",
659 .dependencies = featureSet(&[_]Feature{}),
660 };
661 result[@backingInt(Feature.false_deps_expand)] = .{
662 .llvm_name = "false-deps-expand",
663 .description = "V[P]EXPANDPD/PS/Q/D/W/B with zero-masking has a false dependency on dest register",
664 .dependencies = featureSet(&[_]Feature{}),
665 };
619666 result[@backingInt(Feature.false_deps_getmant)] = .{
620667 .llvm_name = "false-deps-getmant",
621668 .description = "VGETMANTSS/SD/SH and VGETMANDPS/PD(memory version) has a false dependency on dest register",
622669 .dependencies = featureSet(&[_]Feature{}),
623670 };
624 result[@backingInt(Feature.false_deps_lzcnt_tzcnt)] = .{
625 .llvm_name = "false-deps-lzcnt-tzcnt",
626 .description = "LZCNT/TZCNT have a false dependency on dest register",
671 result[@backingInt(Feature.false_deps_lzcnt)] = .{
672 .llvm_name = "false-deps-lzcnt",
673 .description = "LZCNT has a false dependency on dest register",
627674 .dependencies = featureSet(&[_]Feature{}),
628675 };
629676 result[@backingInt(Feature.false_deps_mulc)] = .{
......@@ -651,6 +698,11 @@ pub const all_features = blk: {
651698 .description = "VRANGEPD/PS/SD/SS has a false dependency on dest register",
652699 .dependencies = featureSet(&[_]Feature{}),
653700 };
701 result[@backingInt(Feature.false_deps_tzcnt)] = .{
702 .llvm_name = "false-deps-tzcnt",
703 .description = "TZCNT has a false dependency on dest register",
704 .dependencies = featureSet(&[_]Feature{}),
705 };
654706 result[@backingInt(Feature.fast_11bytenop)] = .{
655707 .llvm_name = "fast-11bytenop",
656708 .description = "Target can quickly decode up to 11 byte NOPs",
......@@ -813,6 +865,11 @@ pub const all_features = blk: {
813865 .description = "Invalidate Process-Context Identifier",
814866 .dependencies = featureSet(&[_]Feature{}),
815867 };
868 result[@backingInt(Feature.jmpabs)] = .{
869 .llvm_name = "jmpabs",
870 .description = "Support 64-bit absolute JMP",
871 .dependencies = featureSet(&[_]Feature{}),
872 };
816873 result[@backingInt(Feature.kl)] = .{
817874 .llvm_name = "kl",
818875 .description = "Support Key Locker kl Instructions",
......@@ -977,6 +1034,11 @@ pub const all_features = blk: {
9771034 .description = "Prefer movmsk over vtest instruction",
9781035 .dependencies = featureSet(&[_]Feature{}),
9791036 };
1037 result[@backingInt(Feature.prefer_ndd_mem)] = .{
1038 .llvm_name = "prefer-ndd-mem",
1039 .description = "Prefer NDD memory addressing",
1040 .dependencies = featureSet(&[_]Feature{}),
1041 };
9801042 result[@backingInt(Feature.prefer_no_gather)] = .{
9811043 .llvm_name = "prefer-no-gather",
9821044 .description = "Prefer no gather instructions",
......@@ -1037,6 +1099,131 @@ pub const all_features = blk: {
10371099 .description = "Support RDSEED instruction",
10381100 .dependencies = featureSet(&[_]Feature{}),
10391101 };
1102 result[@backingInt(Feature.reserve_edi)] = .{
1103 .llvm_name = "reserve-edi",
1104 .description = "Reserve EDI, making it unavailable as a GPR",
1105 .dependencies = featureSet(&[_]Feature{}),
1106 };
1107 result[@backingInt(Feature.reserve_r10)] = .{
1108 .llvm_name = "reserve-r10",
1109 .description = "Reserve R10, making it unavailable as a GPR",
1110 .dependencies = featureSet(&[_]Feature{}),
1111 };
1112 result[@backingInt(Feature.reserve_r11)] = .{
1113 .llvm_name = "reserve-r11",
1114 .description = "Reserve R11, making it unavailable as a GPR",
1115 .dependencies = featureSet(&[_]Feature{}),
1116 };
1117 result[@backingInt(Feature.reserve_r12)] = .{
1118 .llvm_name = "reserve-r12",
1119 .description = "Reserve R12, making it unavailable as a GPR",
1120 .dependencies = featureSet(&[_]Feature{}),
1121 };
1122 result[@backingInt(Feature.reserve_r13)] = .{
1123 .llvm_name = "reserve-r13",
1124 .description = "Reserve R13, making it unavailable as a GPR",
1125 .dependencies = featureSet(&[_]Feature{}),
1126 };
1127 result[@backingInt(Feature.reserve_r14)] = .{
1128 .llvm_name = "reserve-r14",
1129 .description = "Reserve R14, making it unavailable as a GPR",
1130 .dependencies = featureSet(&[_]Feature{}),
1131 };
1132 result[@backingInt(Feature.reserve_r15)] = .{
1133 .llvm_name = "reserve-r15",
1134 .description = "Reserve R15, making it unavailable as a GPR",
1135 .dependencies = featureSet(&[_]Feature{}),
1136 };
1137 result[@backingInt(Feature.reserve_r16)] = .{
1138 .llvm_name = "reserve-r16",
1139 .description = "Reserve R16, making it unavailable as a GPR",
1140 .dependencies = featureSet(&[_]Feature{}),
1141 };
1142 result[@backingInt(Feature.reserve_r17)] = .{
1143 .llvm_name = "reserve-r17",
1144 .description = "Reserve R17, making it unavailable as a GPR",
1145 .dependencies = featureSet(&[_]Feature{}),
1146 };
1147 result[@backingInt(Feature.reserve_r18)] = .{
1148 .llvm_name = "reserve-r18",
1149 .description = "Reserve R18, making it unavailable as a GPR",
1150 .dependencies = featureSet(&[_]Feature{}),
1151 };
1152 result[@backingInt(Feature.reserve_r19)] = .{
1153 .llvm_name = "reserve-r19",
1154 .description = "Reserve R19, making it unavailable as a GPR",
1155 .dependencies = featureSet(&[_]Feature{}),
1156 };
1157 result[@backingInt(Feature.reserve_r20)] = .{
1158 .llvm_name = "reserve-r20",
1159 .description = "Reserve R20, making it unavailable as a GPR",
1160 .dependencies = featureSet(&[_]Feature{}),
1161 };
1162 result[@backingInt(Feature.reserve_r21)] = .{
1163 .llvm_name = "reserve-r21",
1164 .description = "Reserve R21, making it unavailable as a GPR",
1165 .dependencies = featureSet(&[_]Feature{}),
1166 };
1167 result[@backingInt(Feature.reserve_r22)] = .{
1168 .llvm_name = "reserve-r22",
1169 .description = "Reserve R22, making it unavailable as a GPR",
1170 .dependencies = featureSet(&[_]Feature{}),
1171 };
1172 result[@backingInt(Feature.reserve_r23)] = .{
1173 .llvm_name = "reserve-r23",
1174 .description = "Reserve R23, making it unavailable as a GPR",
1175 .dependencies = featureSet(&[_]Feature{}),
1176 };
1177 result[@backingInt(Feature.reserve_r24)] = .{
1178 .llvm_name = "reserve-r24",
1179 .description = "Reserve R24, making it unavailable as a GPR",
1180 .dependencies = featureSet(&[_]Feature{}),
1181 };
1182 result[@backingInt(Feature.reserve_r25)] = .{
1183 .llvm_name = "reserve-r25",
1184 .description = "Reserve R25, making it unavailable as a GPR",
1185 .dependencies = featureSet(&[_]Feature{}),
1186 };
1187 result[@backingInt(Feature.reserve_r26)] = .{
1188 .llvm_name = "reserve-r26",
1189 .description = "Reserve R26, making it unavailable as a GPR",
1190 .dependencies = featureSet(&[_]Feature{}),
1191 };
1192 result[@backingInt(Feature.reserve_r27)] = .{
1193 .llvm_name = "reserve-r27",
1194 .description = "Reserve R27, making it unavailable as a GPR",
1195 .dependencies = featureSet(&[_]Feature{}),
1196 };
1197 result[@backingInt(Feature.reserve_r28)] = .{
1198 .llvm_name = "reserve-r28",
1199 .description = "Reserve R28, making it unavailable as a GPR",
1200 .dependencies = featureSet(&[_]Feature{}),
1201 };
1202 result[@backingInt(Feature.reserve_r29)] = .{
1203 .llvm_name = "reserve-r29",
1204 .description = "Reserve R29, making it unavailable as a GPR",
1205 .dependencies = featureSet(&[_]Feature{}),
1206 };
1207 result[@backingInt(Feature.reserve_r30)] = .{
1208 .llvm_name = "reserve-r30",
1209 .description = "Reserve R30, making it unavailable as a GPR",
1210 .dependencies = featureSet(&[_]Feature{}),
1211 };
1212 result[@backingInt(Feature.reserve_r31)] = .{
1213 .llvm_name = "reserve-r31",
1214 .description = "Reserve R31, making it unavailable as a GPR",
1215 .dependencies = featureSet(&[_]Feature{}),
1216 };
1217 result[@backingInt(Feature.reserve_r8)] = .{
1218 .llvm_name = "reserve-r8",
1219 .description = "Reserve R8, making it unavailable as a GPR",
1220 .dependencies = featureSet(&[_]Feature{}),
1221 };
1222 result[@backingInt(Feature.reserve_r9)] = .{
1223 .llvm_name = "reserve-r9",
1224 .description = "Reserve R9, making it unavailable as a GPR",
1225 .dependencies = featureSet(&[_]Feature{}),
1226 };
10401227 result[@backingInt(Feature.retpoline)] = .{
10411228 .llvm_name = "retpoline",
10421229 .description = "Remove speculation of indirect branches from the generated code, either by avoiding them entirely or lowering them with a speculation blocking construct",
......@@ -1123,6 +1310,11 @@ pub const all_features = blk: {
11231310 .description = "INC and DEC instructions are slower than ADD and SUB",
11241311 .dependencies = featureSet(&[_]Feature{}),
11251312 };
1313 result[@backingInt(Feature.slow_indirect_call)] = .{
1314 .llvm_name = "slow-indirect-call",
1315 .description = "Indirect calls from memory are slow",
1316 .dependencies = featureSet(&[_]Feature{}),
1317 };
11261318 result[@backingInt(Feature.slow_lea)] = .{
11271319 .llvm_name = "slow-lea",
11281320 .description = "LEA instruction with certain arguments is slow",
......@@ -2039,8 +2231,9 @@ pub const cpu = struct {
20392231 .cx16,
20402232 .ermsb,
20412233 .f16c,
2042 .false_deps_lzcnt_tzcnt,
2234 .false_deps_lzcnt,
20432235 .false_deps_popcnt,
2236 .false_deps_tzcnt,
20442237 .fast_15bytenop,
20452238 .fast_scalar_fsqrt,
20462239 .fast_shld_rotate,
......@@ -2159,6 +2352,239 @@ pub const cpu = struct {
21592352 .x87,
21602353 }),
21612354 };
2355 pub const c86_4g_m4: CpuModel = .{
2356 .name = "c86_4g_m4",
2357 .llvm_name = "c86-4g-m4",
2358 .features = featureSet(&[_]Feature{
2359 .@"64bit",
2360 .adx,
2361 .aes,
2362 .allow_light_256_bit,
2363 .avx2,
2364 .bmi,
2365 .bmi2,
2366 .clflushopt,
2367 .clzero,
2368 .cmov,
2369 .cx16,
2370 .f16c,
2371 .fast_15bytenop,
2372 .fast_bextr,
2373 .fast_imm16,
2374 .fast_lzcnt,
2375 .fast_movbe,
2376 .fast_scalar_fsqrt,
2377 .fast_scalar_shift_masks,
2378 .fast_variable_perlane_shuffle,
2379 .fast_vector_fsqrt,
2380 .fma,
2381 .fsgsbase,
2382 .fxsr,
2383 .idivq_to_divl,
2384 .lzcnt,
2385 .mmx,
2386 .movbe,
2387 .mwaitx,
2388 .nopl,
2389 .pclmul,
2390 .popcnt,
2391 .prfchw,
2392 .rdrnd,
2393 .rdseed,
2394 .sahf,
2395 .sbb_dep_breaking,
2396 .sha,
2397 .slow_shld,
2398 .sse4a,
2399 .vzeroupper,
2400 .x87,
2401 .xsavec,
2402 .xsaveopt,
2403 .xsaves,
2404 }),
2405 };
2406 pub const c86_4g_m6: CpuModel = .{
2407 .name = "c86_4g_m6",
2408 .llvm_name = "c86-4g-m6",
2409 .features = featureSet(&[_]Feature{
2410 .@"64bit",
2411 .adx,
2412 .aes,
2413 .allow_light_256_bit,
2414 .avx2,
2415 .bmi,
2416 .bmi2,
2417 .clflushopt,
2418 .clzero,
2419 .cmov,
2420 .cx16,
2421 .f16c,
2422 .fast_15bytenop,
2423 .fast_bextr,
2424 .fast_imm16,
2425 .fast_lzcnt,
2426 .fast_movbe,
2427 .fast_scalar_fsqrt,
2428 .fast_scalar_shift_masks,
2429 .fast_variable_perlane_shuffle,
2430 .fast_vector_fsqrt,
2431 .fma,
2432 .fsgsbase,
2433 .fxsr,
2434 .idivq_to_divl,
2435 .lzcnt,
2436 .mmx,
2437 .movbe,
2438 .mwaitx,
2439 .nopl,
2440 .pclmul,
2441 .popcnt,
2442 .prfchw,
2443 .rdrnd,
2444 .rdseed,
2445 .sahf,
2446 .sbb_dep_breaking,
2447 .sha,
2448 .slow_shld,
2449 .sse4a,
2450 .vzeroupper,
2451 .x87,
2452 .xsavec,
2453 .xsaveopt,
2454 .xsaves,
2455 }),
2456 };
2457 pub const c86_4g_m7: CpuModel = .{
2458 .name = "c86_4g_m7",
2459 .llvm_name = "c86-4g-m7",
2460 .features = featureSet(&[_]Feature{
2461 .@"64bit",
2462 .adx,
2463 .allow_light_256_bit,
2464 .avx512bf16,
2465 .avx512bitalg,
2466 .avx512cd,
2467 .avx512dq,
2468 .avx512ifma,
2469 .avx512vbmi,
2470 .avx512vbmi2,
2471 .avx512vl,
2472 .avx512vnni,
2473 .avx512vpopcntdq,
2474 .bmi,
2475 .bmi2,
2476 .branchfusion,
2477 .clflushopt,
2478 .clwb,
2479 .clzero,
2480 .cmov,
2481 .cx16,
2482 .fast_15bytenop,
2483 .fast_bextr,
2484 .fast_imm16,
2485 .fast_lzcnt,
2486 .fast_movbe,
2487 .fast_scalar_fsqrt,
2488 .fast_scalar_shift_masks,
2489 .fast_variable_perlane_shuffle,
2490 .fast_vector_fsqrt,
2491 .fsgsbase,
2492 .fxsr,
2493 .gfni,
2494 .idivq_to_divl,
2495 .lzcnt,
2496 .mmx,
2497 .movbe,
2498 .mwaitx,
2499 .nopl,
2500 .popcnt,
2501 .prefer_256_bit,
2502 .prefer_no_gather,
2503 .prefer_no_scatter,
2504 .prfchw,
2505 .rdrnd,
2506 .rdseed,
2507 .sahf,
2508 .sbb_dep_breaking,
2509 .sha,
2510 .slow_shld,
2511 .sse4a,
2512 .vaes,
2513 .vpclmulqdq,
2514 .vzeroupper,
2515 .wbnoinvd,
2516 .x87,
2517 .xsavec,
2518 .xsaveopt,
2519 .xsaves,
2520 }),
2521 };
2522 pub const c86_4g_m8: CpuModel = .{
2523 .name = "c86_4g_m8",
2524 .llvm_name = "c86-4g-m8",
2525 .features = featureSet(&[_]Feature{
2526 .@"64bit",
2527 .adx,
2528 .allow_light_256_bit,
2529 .avx512bf16,
2530 .avx512bitalg,
2531 .avx512cd,
2532 .avx512dq,
2533 .avx512ifma,
2534 .avx512vbmi,
2535 .avx512vbmi2,
2536 .avx512vl,
2537 .avx512vnni,
2538 .avx512vpopcntdq,
2539 .bmi,
2540 .bmi2,
2541 .branchfusion,
2542 .clflushopt,
2543 .clwb,
2544 .clzero,
2545 .cmov,
2546 .cx16,
2547 .fast_15bytenop,
2548 .fast_bextr,
2549 .fast_imm16,
2550 .fast_lzcnt,
2551 .fast_movbe,
2552 .fast_scalar_fsqrt,
2553 .fast_scalar_shift_masks,
2554 .fast_variable_perlane_shuffle,
2555 .fast_vector_fsqrt,
2556 .fsgsbase,
2557 .fxsr,
2558 .gfni,
2559 .idivq_to_divl,
2560 .lzcnt,
2561 .mmx,
2562 .movbe,
2563 .mwaitx,
2564 .nopl,
2565 .popcnt,
2566 .prefer_256_bit,
2567 .prefer_no_gather,
2568 .prefer_no_scatter,
2569 .prfchw,
2570 .rdrnd,
2571 .rdseed,
2572 .sahf,
2573 .sbb_dep_breaking,
2574 .sha,
2575 .shstk,
2576 .slow_shld,
2577 .sse4a,
2578 .vaes,
2579 .vpclmulqdq,
2580 .vzeroupper,
2581 .wbnoinvd,
2582 .x87,
2583 .xsavec,
2584 .xsaveopt,
2585 .xsaves,
2586 }),
2587 };
21622588 pub const cannonlake: CpuModel = .{
21632589 .name = "cannonlake",
21642590 .llvm_name = "cannonlake",
......@@ -2467,7 +2893,6 @@ pub const cpu = struct {
24672893 .amx_fp8,
24682894 .amx_int8,
24692895 .amx_movrs,
2470 .amx_tf32,
24712896 .avx10_2,
24722897 .avxifma,
24732898 .avxneconvert,
......@@ -2505,6 +2930,7 @@ pub const cpu = struct {
25052930 .gfni,
25062931 .idivq_to_divl,
25072932 .invpcid,
2933 .jmpabs,
25082934 .lzcnt,
25092935 .macrofusion,
25102936 .mmx,
......@@ -2523,6 +2949,7 @@ pub const cpu = struct {
25232949 .popcnt,
25242950 .ppx,
25252951 .prefer_256_bit,
2952 .prefer_legacy_setcc,
25262953 .prefetchi,
25272954 .prfchw,
25282955 .ptwrite,
......@@ -3056,8 +3483,9 @@ pub const cpu = struct {
30563483 .cx16,
30573484 .ermsb,
30583485 .f16c,
3059 .false_deps_lzcnt_tzcnt,
3486 .false_deps_lzcnt,
30603487 .false_deps_popcnt,
3488 .false_deps_tzcnt,
30613489 .fast_15bytenop,
30623490 .fast_scalar_fsqrt,
30633491 .fast_shld_rotate,
......@@ -3679,6 +4107,7 @@ pub const cpu = struct {
36794107 .hreset,
36804108 .idivq_to_divl,
36814109 .invpcid,
4110 .jmpabs,
36824111 .lzcnt,
36834112 .macrofusion,
36844113 .mmx,
......@@ -3696,6 +4125,7 @@ pub const cpu = struct {
36964125 .pku,
36974126 .popcnt,
36984127 .ppx,
4128 .prefer_legacy_setcc,
36994129 .prefer_movmsk_over_vtest,
37004130 .prefetchi,
37014131 .prfchw,
......@@ -4813,8 +5243,9 @@ pub const cpu = struct {
48135243 .cmov,
48145244 .cx16,
48155245 .f16c,
4816 .false_deps_lzcnt_tzcnt,
5246 .false_deps_lzcnt,
48175247 .false_deps_popcnt,
5248 .false_deps_tzcnt,
48185249 .fast_15bytenop,
48195250 .fast_scalar_fsqrt,
48205251 .fast_shld_rotate,
......@@ -5086,6 +5517,8 @@ pub const cpu = struct {
50865517 .clzero,
50875518 .cmov,
50885519 .cx16,
5520 .false_deps_compress,
5521 .false_deps_expand,
50895522 .fast_15bytenop,
50905523 .fast_bextr,
50915524 .fast_dpwssd,
......@@ -5159,6 +5592,10 @@ pub const cpu = struct {
51595592 .clzero,
51605593 .cmov,
51615594 .cx16,
5595 .false_deps_bls,
5596 .false_deps_compress,
5597 .false_deps_expand,
5598 .false_deps_tzcnt,
51625599 .fast_15bytenop,
51635600 .fast_bextr,
51645601 .fast_dpwssd,
......@@ -5195,6 +5632,7 @@ pub const cpu = struct {
51955632 .sbb_dep_breaking,
51965633 .sha,
51975634 .shstk,
5635 .slow_indirect_call,
51985636 .smap,
51995637 .smep,
52005638 .sse4a,
......@@ -5208,4 +5646,83 @@ pub const cpu = struct {
52085646 .xsaves,
52095647 }),
52105648 };
5649 pub const znver6: CpuModel = .{
5650 .name = "znver6",
5651 .llvm_name = "znver6",
5652 .features = featureSet(&[_]Feature{
5653 .@"64bit",
5654 .adx,
5655 .allow_light_256_bit,
5656 .avx512bf16,
5657 .avx512bitalg,
5658 .avx512bmm,
5659 .avx512cd,
5660 .avx512dq,
5661 .avx512fp16,
5662 .avx512ifma,
5663 .avx512vbmi,
5664 .avx512vbmi2,
5665 .avx512vl,
5666 .avx512vnni,
5667 .avx512vp2intersect,
5668 .avx512vpopcntdq,
5669 .avxifma,
5670 .avxneconvert,
5671 .avxvnni,
5672 .avxvnniint8,
5673 .bmi,
5674 .bmi2,
5675 .branchfusion,
5676 .clflushopt,
5677 .clwb,
5678 .clzero,
5679 .cmov,
5680 .cx16,
5681 .fast_15bytenop,
5682 .fast_bextr,
5683 .fast_dpwssd,
5684 .fast_imm16,
5685 .fast_lzcnt,
5686 .fast_movbe,
5687 .fast_scalar_fsqrt,
5688 .fast_scalar_shift_masks,
5689 .fast_variable_perlane_shuffle,
5690 .fast_vector_fsqrt,
5691 .fsgsbase,
5692 .fsrm,
5693 .fxsr,
5694 .gfni,
5695 .idivq_to_divl,
5696 .invpcid,
5697 .lzcnt,
5698 .macrofusion,
5699 .mmx,
5700 .movbe,
5701 .movdir64b,
5702 .movdiri,
5703 .mwaitx,
5704 .nopl,
5705 .pku,
5706 .popcnt,
5707 .prefetchi,
5708 .prfchw,
5709 .rdpid,
5710 .rdpru,
5711 .rdrnd,
5712 .rdseed,
5713 .sahf,
5714 .sbb_dep_breaking,
5715 .sha,
5716 .shstk,
5717 .sse4a,
5718 .vaes,
5719 .vpclmulqdq,
5720 .vzeroupper,
5721 .wbnoinvd,
5722 .x87,
5723 .xsavec,
5724 .xsaveopt,
5725 .xsaves,
5726 }),
5727 };
52115728};
lib/std/Target/xtensa.zig+35
......@@ -13,6 +13,7 @@ pub const Feature = enum {
1313 density,
1414 dfpaccel,
1515 div32,
16 esp32s2ops,
1617 exception,
1718 extendedl32r,
1819 forced_atomics,
......@@ -93,6 +94,11 @@ pub const all_features = blk: {
9394 .description = "Enable Xtensa Div32 option",
9495 .dependencies = featureSet(&[_]Feature{}),
9596 };
97 result[@backingInt(Feature.esp32s2ops)] = .{
98 .llvm_name = "esp32s2ops",
99 .description = "Support Xtensa esp32-s2 ISA extension",
100 .dependencies = featureSet(&[_]Feature{}),
101 };
96102 result[@backingInt(Feature.exception)] = .{
97103 .llvm_name = "exception",
98104 .description = "Enable Xtensa Exception option",
......@@ -291,6 +297,35 @@ pub const cpu = struct {
291297 .windowed,
292298 }),
293299 };
300 pub const esp32s2: CpuModel = .{
301 .name = "esp32s2",
302 .llvm_name = "esp32s2",
303 .features = featureSet(&[_]Feature{
304 .clamps,
305 .coprocessor,
306 .dcache,
307 .debug,
308 .density,
309 .div32,
310 .esp32s2ops,
311 .exception,
312 .highpriinterrupts_level7,
313 .interrupt,
314 .minmax,
315 .miscsr,
316 .mul16,
317 .mul32,
318 .mul32high,
319 .nsa,
320 .prid,
321 .regprotect,
322 .rvector,
323 .sext,
324 .threadptr,
325 .timers3,
326 .windowed,
327 }),
328 };
294329 pub const esp8266: CpuModel = .{
295330 .name = "esp8266",
296331 .llvm_name = "esp8266",
src/codegen/x86_64/CodeGen.zig+19-18
......@@ -67559,7 +67559,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6755967559 .{ ._, ._, .sub, .dst0b, .sia(32, .src0, .sub_bit_size), ._, ._ },
6756067560 } },
6756167561 }, .{
67562 .required_features = .{ .false_deps_lzcnt_tzcnt, .lzcnt, null, null },
67562 .required_features = .{ .false_deps_lzcnt, .lzcnt, null, null },
6756367563 .src_constraints = .{ .{ .exact_int = 16 }, .any, .any },
6756467564 .patterns = &.{
6756567565 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -67595,7 +67595,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6759567595 .{ ._, ._, .sub, .dst0b, .sia(16, .src0, .sub_bit_size), ._, ._ },
6759667596 } },
6759767597 }, .{
67598 .required_features = .{ .false_deps_lzcnt_tzcnt, .lzcnt, null, null },
67598 .required_features = .{ .false_deps_lzcnt, .lzcnt, null, null },
6759967599 .src_constraints = .{ .{ .unsigned_int = .word }, .any, .any },
6760067600 .patterns = &.{
6760167601 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -67620,7 +67620,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6762067620 .{ ._, ._, .sub, .dst0b, .sia(16, .src0, .sub_bit_size), ._, ._ },
6762167621 } },
6762267622 }, .{
67623 .required_features = .{ .false_deps_lzcnt_tzcnt, .lzcnt, null, null },
67623 .required_features = .{ .false_deps_lzcnt, .lzcnt, null, null },
6762467624 .src_constraints = .{ .{ .exact_int = 32 }, .any, .any },
6762567625 .patterns = &.{
6762667626 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -67656,7 +67656,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6765667656 .{ ._, ._, .sub, .dst0b, .sia(32, .src0, .sub_bit_size), ._, ._ },
6765767657 } },
6765867658 }, .{
67659 .required_features = .{ .false_deps_lzcnt_tzcnt, .lzcnt, null, null },
67659 .required_features = .{ .false_deps_lzcnt, .lzcnt, null, null },
6766067660 .src_constraints = .{ .{ .unsigned_int = .dword }, .any, .any },
6766167661 .patterns = &.{
6766267662 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -67681,7 +67681,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6768167681 .{ ._, ._, .sub, .dst0b, .sia(32, .src0, .sub_bit_size), ._, ._ },
6768267682 } },
6768367683 }, .{
67684 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
67684 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6768567685 .src_constraints = .{ .{ .exact_int = 64 }, .any, .any },
6768667686 .patterns = &.{
6768767687 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -67719,7 +67719,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6771967719 .{ ._, ._, .sub, .dst0b, .sia(64, .src0, .sub_bit_size), ._, ._ },
6772067720 } },
6772167721 }, .{
67722 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
67722 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6772367723 .src_constraints = .{ .{ .unsigned_int = .qword }, .any, .any },
6772467724 .patterns = &.{
6772567725 .{ .src = .{ .to_mut_gpr, .none, .none } },
......@@ -68576,7 +68576,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6857668576 .{ ._, ._, .sub, .dst0b, .tmp0b, ._, ._ },
6857768577 } },
6857868578 }, .{
68579 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
68579 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6858068580 .src_constraints = .{ .{ .unsigned_or_exact_remainder_int = .{ .of = .xword, .is = .qword } }, .any, .any },
6858168581 .patterns = &.{
6858268582 .{ .src = .{ .to_mem, .none, .none } },
......@@ -68704,7 +68704,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6870468704 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
6870568705 } },
6870668706 }, .{
68707 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
68707 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6870868708 .src_constraints = .{ .{ .unsigned_or_exact_remainder_int = .{ .of = .xword, .is = .xword } }, .any, .any },
6870968709 .patterns = &.{
6871068710 .{ .src = .{ .to_mem, .none, .none } },
......@@ -68832,7 +68832,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6883268832 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
6883368833 } },
6883468834 }, .{
68835 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
68835 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6883668836 .src_constraints = .{ .{ .remainder_int = .{ .of = .xword, .is = .qword } }, .any, .any },
6883768837 .patterns = &.{
6883868838 .{ .src = .{ .to_mem, .none, .none } },
......@@ -68935,7 +68935,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
6893568935 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
6893668936 } },
6893768937 }, .{
68938 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
68938 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
6893968939 .src_constraints = .{ .{ .remainder_int = .{ .of = .xword, .is = .xword } }, .any, .any },
6894068940 .patterns = &.{
6894168941 .{ .src = .{ .to_mem, .none, .none } },
......@@ -70091,7 +70091,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7009170091 .{ ._, ._nz, .j, .@"0b", ._, ._, ._ },
7009270092 } },
7009370093 }, .{
70094 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
70094 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
7009570095 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any, .any },
7009670096 .dst_constraints = .{ .{ .scalar_int_is = .byte }, .any },
7009770097 .patterns = &.{
......@@ -70215,7 +70215,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7021570215 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
7021670216 } },
7021770217 }, .{
70218 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
70218 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
7021970219 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any, .any },
7022070220 .dst_constraints = .{ .{ .scalar_int_is = .byte }, .any },
7022170221 .patterns = &.{
......@@ -70339,7 +70339,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7033970339 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
7034070340 } },
7034170341 }, .{
70342 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
70342 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
7034370343 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any, .any },
7034470344 .dst_constraints = .{ .{ .scalar_int_is = .word }, .any },
7034570345 .patterns = &.{
......@@ -70463,7 +70463,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7046370463 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
7046470464 } },
7046570465 }, .{
70466 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
70466 .required_features = .{ .@"64bit", .false_deps_lzcnt, .lzcnt, null },
7046770467 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any, .any },
7046870468 .dst_constraints = .{ .{ .scalar_int_is = .word }, .any },
7046970469 .patterns = &.{
......@@ -70648,7 +70648,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7064870648 .{ ._, ._, .tzcnt, .dst0w, .src0w, ._, ._ },
7064970649 } },
7065070650 }, .{
70651 .required_features = .{ .bmi, .false_deps_lzcnt_tzcnt, null, null },
70651 .required_features = .{ .bmi, .false_deps_tzcnt, null, null },
7065270652 .src_constraints = .{ .{ .exact_int = 32 }, .any, .any },
7065370653 .patterns = &.{
7065470654 .{ .src = .{ .mem, .none, .none } },
......@@ -70685,7 +70685,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7068570685 .{ ._, ._, .tzcnt, .dst0d, .src0d, ._, ._ },
7068670686 } },
7068770687 }, .{
70688 .required_features = .{ .@"64bit", .bmi, .false_deps_lzcnt_tzcnt, null },
70688 .required_features = .{ .@"64bit", .bmi, .false_deps_tzcnt, null },
7068970689 .src_constraints = .{ .{ .exact_int = 64 }, .any, .any },
7069070690 .patterns = &.{
7069170691 .{ .src = .{ .mem, .none, .none } },
......@@ -70862,7 +70862,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
7086270862 .{ ._, ._f, .bs, .dst0q, .src0q, ._, ._ },
7086370863 } },
7086470864 }, .{
70865 .required_features = .{ .@"64bit", .bmi, .false_deps_lzcnt_tzcnt, null },
70865 .required_features = .{ .@"64bit", .bmi, .false_deps_tzcnt, null },
7086670866 .src_constraints = .{ .{ .remainder_int = .{ .of = .qword, .is = .qword } }, .any, .any },
7086770867 .patterns = &.{
7086870868 .{ .src = .{ .to_mem, .none, .none } },
......@@ -182366,12 +182366,13 @@ fn hasFeature(cg: *CodeGen, feature: std.Target.x86.Feature) bool {
182366182366 .x86_64 => true,
182367182367 },
182368182368 .false_deps_getmant,
182369 .false_deps_lzcnt_tzcnt,
182369 .false_deps_lzcnt,
182370182370 .false_deps_mulc,
182371182371 .false_deps_mullq,
182372182372 .false_deps_perm,
182373182373 .false_deps_popcnt,
182374182374 .false_deps_range,
182375 .false_deps_tzcnt,
182375182376 .slow_3ops_lea,
182376182377 .slow_incdec,
182377182378 .slow_lea,
src/link/Wasm.zig+3
......@@ -3245,6 +3245,7 @@ pub const Feature = packed struct(u8) {
32453245 @"tail-call",
32463246 @"shared-mem",
32473247 @"wide-arithmetic",
3248 @"relaxed-atomics",
32483249
32493250 pub fn fromCpuFeature(feature: std.Target.wasm.Feature) Tag {
32503251 return switch (feature) {
......@@ -3262,6 +3263,7 @@ pub const Feature = packed struct(u8) {
32623263 .nontrapping_bulk_memory_len0 => .@"nontrapping-bulk-memory-len0", // Zig extension.
32633264 .nontrapping_fptoint => .@"nontrapping-fptoint",
32643265 .reference_types => .@"reference-types",
3266 .relaxed_atomics => .@"relaxed-atomics",
32653267 .relaxed_simd => .@"relaxed-simd",
32663268 .sign_ext => .@"sign-ext",
32673269 .simd128 => .simd128,
......@@ -3287,6 +3289,7 @@ pub const Feature = packed struct(u8) {
32873289 .@"nontrapping-bulk-memory-len0" => .nontrapping_bulk_memory_len0, // Zig extension.
32883290 .@"nontrapping-fptoint" => .nontrapping_fptoint,
32893291 .@"reference-types" => .reference_types,
3292 .@"relaxed-atomics" => .relaxed_atomics,
32903293 .@"relaxed-simd" => .relaxed_simd,
32913294 .@"sign-ext" => .sign_ext,
32923295 .simd128 => .simd128,
src/target.zig+3
......@@ -416,6 +416,9 @@ pub fn hasDebugInfo(target: *const std.Target) bool {
416416 .ptx87,
417417 .ptx88,
418418 .ptx90,
419 .ptx91,
420 .ptx92,
421 .ptx93,
419422 }),
420423 .bpfel, .bpfeb => false,
421424 else => true,
test/tests.zig+12-1
......@@ -2395,13 +2395,17 @@ pub fn isNative(actual_target: *const std.Build.ResolvedTarget, host: *const std
23952395 .@"16bit_mode",
23962396 .@"32bit_mode",
23972397 .@"64bit",
2398 .false_deps_bls,
2399 .false_deps_compress,
2400 .false_deps_expand,
23982401 .false_deps_getmant,
2399 .false_deps_lzcnt_tzcnt,
2402 .false_deps_lzcnt,
24002403 .false_deps_mulc,
24012404 .false_deps_mullq,
24022405 .false_deps_perm,
24032406 .false_deps_popcnt,
24042407 .false_deps_range,
2408 .false_deps_tzcnt,
24052409 .fast_11bytenop,
24062410 .fast_15bytenop,
24072411 .fast_7bytenop,
......@@ -2429,10 +2433,12 @@ pub fn isNative(actual_target: *const std.Build.ResolvedTarget, host: *const std
24292433 .prefer_legacy_setcc,
24302434 .prefer_mask_registers,
24312435 .prefer_movmsk_over_vtest,
2436 .prefer_ndd_mem,
24322437 .prefer_no_gather,
24332438 .prefer_no_scatter,
24342439 .slow_3ops_lea,
24352440 .slow_incdec,
2441 .slow_indirect_call,
24362442 .slow_lea,
24372443 .slow_pmaddwd,
24382444 .slow_pmulld,
......@@ -2444,10 +2450,13 @@ pub fn isNative(actual_target: *const std.Build.ResolvedTarget, host: *const std
24442450 }),
24452451 .aarch64, .aarch64_be => std.Target.aarch64.featureSet(&.{
24462452 .addr_lsl_slow_14,
2453 .align_cmp_csel_pairs,
24472454 .alu_lsl_fast,
24482455 .avoid_ldapur,
24492456 .disable_fast_inc_vl,
24502457 .exynos_cheap_as_move,
2458 .fast_ld1_single,
2459 .fixed_load_latency_4,
24512460 .fuse_address,
24522461 .fuse_addsub_2reg_const1,
24532462 .fuse_adrp_add,
......@@ -2456,7 +2465,9 @@ pub fn isNative(actual_target: *const std.Build.ResolvedTarget, host: *const std
24562465 .fuse_crypto_eor,
24572466 .fuse_csel,
24582467 .fuse_cset,
2468 .fuse_fcsel,
24592469 .fuse_literals,
2470 .has_limited_64bit_vector_mul_bandwidth,
24602471 .predictable_select_expensive,
24612472 .slow_misaligned_128store,
24622473 .slow_paired_128,
tools/update_cpu_features.zig+10-99
......@@ -131,6 +131,14 @@ const targets = [_]ArchTarget{
131131 .zig_name = "contextidr_el2",
132132 .desc = "Enable RW operand Context ID Register (EL2)",
133133 },
134 .{
135 .llvm_name = "hip12",
136 .flatten = true,
137 },
138 .{
139 .llvm_name = "mca-streaming-sched",
140 .omit = true,
141 },
134142 .{
135143 .llvm_name = "neoversee1",
136144 .flatten = true,
......@@ -1553,103 +1561,6 @@ const targets = [_]ArchTarget{
15531561 .zig_name = "baseline_rv64",
15541562 .features = &.{ "64bit", "a", "c", "d", "f", "i", "m" },
15551563 },
1556 .{
1557 .llvm_name = null,
1558 .zig_name = "spacemit_a100",
1559 .features = &.{
1560 "64bit",
1561 "a",
1562 "b",
1563 "c",
1564 "dlen_factor_2",
1565 "i",
1566 "m",
1567 "optimized_nf2_segment_load_store",
1568 "optimized_nf3_segment_load_store",
1569 "optimized_nf4_segment_load_store",
1570 "smepmp",
1571 "smnpm",
1572 "smstateen",
1573 "ssccptr",
1574 "sscofpmf",
1575 "sscounterenw",
1576 "ssnpm",
1577 "sspm",
1578 "sstc",
1579 "sstvala",
1580 "sstvecd",
1581 "ssu64xl",
1582 "supm",
1583 "svade",
1584 "svbare",
1585 "svinval",
1586 "svnapot",
1587 "svpbmt",
1588 "unaligned_scalar_mem",
1589 "v",
1590 "vxrm_pipeline_flush",
1591 "za64rs",
1592 "zawrs",
1593 "zbc",
1594 "zbkc",
1595 "zcb",
1596 "zcmop",
1597 "zfa",
1598 "zfh",
1599 "zic64b",
1600 "zicbom",
1601 "zicbop",
1602 "zicboz",
1603 "ziccamoa",
1604 "ziccif",
1605 "zicclsm",
1606 "ziccrse",
1607 "zicntr",
1608 "zicond",
1609 "zifencei",
1610 "zihintntl",
1611 "zihintpause",
1612 "zihpm",
1613 "zimop",
1614 "zkt",
1615 "zvbb",
1616 "zvfbfwma",
1617 "zvfh",
1618 "zvkng",
1619 "zvknha",
1620 "zvksc",
1621 "zvksg",
1622 "zvl1024b",
1623 },
1624 },
1625 .{
1626 .llvm_name = null,
1627 .zig_name = "spacemit_x100",
1628 .features = &.{
1629 "dlen_factor_2",
1630 "optimized_nf2_segment_load_store",
1631 "optimized_nf3_segment_load_store",
1632 "optimized_nf4_segment_load_store",
1633 "rva23s64",
1634 "smepmp",
1635 "smnpm",
1636 "smstateen",
1637 "sspm",
1638 "unaligned_scalar_mem",
1639 "vxrm_pipeline_flush",
1640 "xsmtvdot",
1641 "zbc",
1642 "zbkc",
1643 "zfh",
1644 "zvfbfwma",
1645 "zvfh",
1646 "zvkng",
1647 "zvknha",
1648 "zvksc",
1649 "zvksg",
1650 "zvl256b",
1651 },
1652 },
16531564 },
16541565 },
16551566 .{
......@@ -2450,7 +2361,7 @@ fn processOneTargetInner(io: Io, job: Job) !void {
24502361 for (all_features.items) |feature| {
24512362 if (feature.llvm_name) |llvm_name| {
24522363 try w.print(
2453 \\ result[@intFromEnum(Feature.{f})] = .{{
2364 \\ result[@backingInt(Feature.{f})] = .{{
24542365 \\ .llvm_name = "{f}",
24552366 \\ .description = "{f}",
24562367 \\ .dependencies = featureSet(&[_]Feature{{
......@@ -2463,7 +2374,7 @@ fn processOneTargetInner(io: Io, job: Job) !void {
24632374 );
24642375 } else {
24652376 try w.print(
2466 \\ result[@intFromEnum(Feature.{f})] = .{{
2377 \\ result[@backingInt(Feature.{f})] = .{{
24672378 \\ .llvm_name = null,
24682379 \\ .description = "{f}",
24692380 \\ .dependencies = featureSet(&[_]Feature{{