authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-08-11 16:15:19-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-09-19 09:37:31-07:00
log3ed40b114020ff774279a5af993851d74da64b52
tree733076dbb0b66df6fd51a6bcadbc0091b4eab99f
parent1c7adf5064386fe668fe580d701db07d226245ed

update CPU features to LLVM 17

release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8

12 files changed, 1142 insertions(+), 295 deletions(-)

lib/std/target/aarch64.zig+53
......@@ -37,6 +37,7 @@ pub const Feature = enum {
3737 ccdp,
3838 ccidx,
3939 ccpp,
40 chk,
4041 clrbhb,
4142 cmp_bcc_fusion,
4243 complxnum,
......@@ -68,12 +69,14 @@ pub const Feature = enum {
6869 fptoint,
6970 fullfp16,
7071 fuse_address,
72 fuse_addsub_2reg_const1,
7173 fuse_adrp_add,
7274 fuse_aes,
7375 fuse_arith_logic,
7476 fuse_crypto_eor,
7577 fuse_csel,
7678 fuse_literals,
79 gcs,
7780 harden_sls_blr,
7881 harden_sls_nocomdat,
7982 harden_sls_retbr,
......@@ -96,6 +99,7 @@ pub const Feature = enum {
9699 nmi,
97100 no_bti_at_return_twice,
98101 no_neg_immediates,
102 no_sve_fp_ld1r,
99103 no_zcz_fp,
100104 nv,
101105 outline_atomics,
......@@ -173,6 +177,7 @@ pub const Feature = enum {
173177 tpidr_el1,
174178 tpidr_el2,
175179 tpidr_el3,
180 tpidrro_el0,
176181 tracev8_4,
177182 trbe,
178183 uaops,
......@@ -233,6 +238,7 @@ pub const all_features = blk: {
233238 .fuse_adrp_add,
234239 .fuse_aes,
235240 .fuse_literals,
241 .predictable_select_expensive,
236242 }),
237243 };
238244 result[@intFromEnum(Feature.a710)] = .{
......@@ -244,6 +250,7 @@ pub const all_features = blk: {
244250 .fuse_adrp_add,
245251 .fuse_aes,
246252 .lsl_fast,
253 .predictable_select_expensive,
247254 .use_postra_scheduler,
248255 }),
249256 };
......@@ -255,6 +262,7 @@ pub const all_features = blk: {
255262 .fuse_adrp_add,
256263 .fuse_aes,
257264 .lsl_fast,
265 .predictable_select_expensive,
258266 }),
259267 };
260268 result[@intFromEnum(Feature.a78)] = .{
......@@ -266,6 +274,7 @@ pub const all_features = blk: {
266274 .fuse_adrp_add,
267275 .fuse_aes,
268276 .lsl_fast,
277 .predictable_select_expensive,
269278 .use_postra_scheduler,
270279 }),
271280 };
......@@ -278,6 +287,7 @@ pub const all_features = blk: {
278287 .fuse_adrp_add,
279288 .fuse_aes,
280289 .lsl_fast,
290 .predictable_select_expensive,
281291 .use_postra_scheduler,
282292 }),
283293 };
......@@ -415,6 +425,11 @@ pub const all_features = blk: {
415425 .description = "Enable v8.2 data Cache Clean to Point of Persistence (FEAT_DPB)",
416426 .dependencies = featureSet(&[_]Feature{}),
417427 };
428 result[@intFromEnum(Feature.chk)] = .{
429 .llvm_name = "chk",
430 .description = "Enable Armv8.0-A Check Feature Status Extension (FEAT_CHK)",
431 .dependencies = featureSet(&[_]Feature{}),
432 };
418433 result[@intFromEnum(Feature.clrbhb)] = .{
419434 .llvm_name = "clrbhb",
420435 .description = "Enable Clear BHB instruction (FEAT_CLRBHB)",
......@@ -591,6 +606,11 @@ pub const all_features = blk: {
591606 .description = "CPU fuses address generation and memory operations",
592607 .dependencies = featureSet(&[_]Feature{}),
593608 };
609 result[@intFromEnum(Feature.fuse_addsub_2reg_const1)] = .{
610 .llvm_name = "fuse-addsub-2reg-const1",
611 .description = "CPU fuses (a + b + 1) and (a - b - 1)",
612 .dependencies = featureSet(&[_]Feature{}),
613 };
594614 result[@intFromEnum(Feature.fuse_adrp_add)] = .{
595615 .llvm_name = "fuse-adrp-add",
596616 .description = "CPU fuses adrp+add operations",
......@@ -621,6 +641,13 @@ pub const all_features = blk: {
621641 .description = "CPU fuses literal generation operations",
622642 .dependencies = featureSet(&[_]Feature{}),
623643 };
644 result[@intFromEnum(Feature.gcs)] = .{
645 .llvm_name = "gcs",
646 .description = "Enable Armv9.4-A Guarded Call Stack Extension",
647 .dependencies = featureSet(&[_]Feature{
648 .chk,
649 }),
650 };
624651 result[@intFromEnum(Feature.harden_sls_blr)] = .{
625652 .llvm_name = "harden-sls-blr",
626653 .description = "Harden against straight line speculation across BLR instructions",
......@@ -741,6 +768,11 @@ pub const all_features = blk: {
741768 .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.",
742769 .dependencies = featureSet(&[_]Feature{}),
743770 };
771 result[@intFromEnum(Feature.no_sve_fp_ld1r)] = .{
772 .llvm_name = "no-sve-fp-ld1r",
773 .description = "Avoid using LD1RX instructions for FP",
774 .dependencies = featureSet(&[_]Feature{}),
775 };
744776 result[@intFromEnum(Feature.no_zcz_fp)] = .{
745777 .llvm_name = "no-zcz-fp",
746778 .description = "Has no zero-cycle zeroing instructions for FP registers",
......@@ -1171,6 +1203,11 @@ pub const all_features = blk: {
11711203 .description = "Permit use of TPIDR_EL3 for the TLS base",
11721204 .dependencies = featureSet(&[_]Feature{}),
11731205 };
1206 result[@intFromEnum(Feature.tpidrro_el0)] = .{
1207 .llvm_name = "tpidrro-el0",
1208 .description = "Permit use of TPIDRRO_EL0 for the TLS base",
1209 .dependencies = featureSet(&[_]Feature{}),
1210 };
11741211 result[@intFromEnum(Feature.tracev8_4)] = .{
11751212 .llvm_name = "tracev8.4",
11761213 .description = "Enable v8.4-A Trace extension (FEAT_TRF)",
......@@ -1311,6 +1348,7 @@ pub const all_features = blk: {
13111348 .llvm_name = "v8.9a",
13121349 .description = "Support ARM v8.9a instructions",
13131350 .dependencies = featureSet(&[_]Feature{
1351 .chk,
13141352 .clrbhb,
13151353 .cssc,
13161354 .prfm_slc_target,
......@@ -1974,6 +2012,7 @@ pub const cpu = struct {
19742012 .lsl_fast,
19752013 .mte,
19762014 .perfmon,
2015 .predictable_select_expensive,
19772016 .spe,
19782017 .sve2_bitperm,
19792018 .use_postra_scheduler,
......@@ -1991,6 +2030,7 @@ pub const cpu = struct {
19912030 .fuse_aes,
19922031 .fuse_literals,
19932032 .perfmon,
2033 .predictable_select_expensive,
19942034 .v8a,
19952035 }),
19962036 };
......@@ -2004,6 +2044,7 @@ pub const cpu = struct {
20042044 .fuse_adrp_add,
20052045 .fuse_aes,
20062046 .perfmon,
2047 .predictable_select_expensive,
20072048 .v8a,
20082049 }),
20092050 };
......@@ -2018,6 +2059,7 @@ pub const cpu = struct {
20182059 .fuse_adrp_add,
20192060 .fuse_aes,
20202061 .perfmon,
2062 .predictable_select_expensive,
20212063 .rcpc,
20222064 .v8_2a,
20232065 }),
......@@ -2063,6 +2105,7 @@ pub const cpu = struct {
20632105 .fuse_aes,
20642106 .lsl_fast,
20652107 .perfmon,
2108 .predictable_select_expensive,
20662109 .rcpc,
20672110 .ssbs,
20682111 .v8_2a,
......@@ -2126,6 +2169,7 @@ pub const cpu = struct {
21262169 .fuse_aes,
21272170 .lsl_fast,
21282171 .perfmon,
2172 .predictable_select_expensive,
21292173 .rcpc,
21302174 .spe,
21312175 .ssbs,
......@@ -2149,6 +2193,7 @@ pub const cpu = struct {
21492193 .lsl_fast,
21502194 .pauth,
21512195 .perfmon,
2196 .predictable_select_expensive,
21522197 .rcpc_immo,
21532198 .spe,
21542199 .ssbs,
......@@ -2171,6 +2216,7 @@ pub const cpu = struct {
21712216 .lsl_fast,
21722217 .mte,
21732218 .perfmon,
2219 .predictable_select_expensive,
21742220 .sve2_bitperm,
21752221 .use_postra_scheduler,
21762222 .v9a,
......@@ -2190,6 +2236,7 @@ pub const cpu = struct {
21902236 .lsl_fast,
21912237 .mte,
21922238 .perfmon,
2239 .predictable_select_expensive,
21932240 .spe,
21942241 .sve2_bitperm,
21952242 .use_postra_scheduler,
......@@ -2383,6 +2430,7 @@ pub const cpu = struct {
23832430 .i8mm,
23842431 .lsl_fast,
23852432 .perfmon,
2433 .predictable_select_expensive,
23862434 .rand,
23872435 .spe,
23882436 .ssbs,
......@@ -2419,6 +2467,7 @@ pub const cpu = struct {
24192467 .fuse_aes,
24202468 .lsl_fast,
24212469 .perfmon,
2470 .predictable_select_expensive,
24222471 .rcpc,
24232472 .spe,
24242473 .ssbs,
......@@ -2440,6 +2489,7 @@ pub const cpu = struct {
24402489 .lsl_fast,
24412490 .mte,
24422491 .perfmon,
2492 .predictable_select_expensive,
24432493 .sve2_bitperm,
24442494 .use_postra_scheduler,
24452495 .v8_5a,
......@@ -2458,7 +2508,9 @@ pub const cpu = struct {
24582508 .fuse_aes,
24592509 .i8mm,
24602510 .lsl_fast,
2511 .no_sve_fp_ld1r,
24612512 .perfmon,
2513 .predictable_select_expensive,
24622514 .rand,
24632515 .spe,
24642516 .ssbs,
......@@ -2480,6 +2532,7 @@ pub const cpu = struct {
24802532 .lsl_fast,
24812533 .mte,
24822534 .perfmon,
2535 .predictable_select_expensive,
24832536 .rand,
24842537 .spe,
24852538 .sve2_bitperm,
lib/std/target/amdgpu.zig+215-35
......@@ -10,14 +10,20 @@ pub const Feature = enum {
1010 add_no_carry_insts,
1111 aperture_regs,
1212 architected_flat_scratch,
13 architected_sgprs,
14 atomic_buffer_global_pk_add_f16_insts,
15 atomic_buffer_global_pk_add_f16_no_rtn_insts,
16 atomic_ds_pk_add_16_insts,
1317 atomic_fadd_no_rtn_insts,
1418 atomic_fadd_rtn_insts,
15 atomic_pk_fadd_no_rtn_insts,
19 atomic_flat_pk_add_16_insts,
20 atomic_global_pk_add_bf16_inst,
1621 auto_waitcnt_before_barrier,
1722 back_off_barrier,
1823 ci_insts,
1924 cumode,
2025 dl_insts,
26 dot10_insts,
2127 dot1_insts,
2228 dot2_insts,
2329 dot3_insts,
......@@ -46,6 +52,7 @@ pub const Feature = enum {
4652 fma_mix_insts,
4753 fmacf64_inst,
4854 fmaf,
55 force_store_sc0_sc1,
4956 fp64,
5057 fp8_insts,
5158 full_rate_64_ops,
......@@ -96,12 +103,11 @@ pub const Feature = enum {
96103 no_sdst_cmpx,
97104 nsa_clause_bug,
98105 nsa_encoding,
99 nsa_max_size_13,
100 nsa_max_size_5,
101106 nsa_to_vmem_bug,
102107 offset_3f_bug,
103108 packed_fp32_ops,
104109 packed_tid,
110 partial_nsa_encoding,
105111 pk_fmac_f16_inst,
106112 promote_alloca,
107113 prt_strict_null,
......@@ -187,6 +193,30 @@ pub const all_features = blk: {
187193 .description = "Flat Scratch register is a readonly SPI initialized architected register",
188194 .dependencies = featureSet(&[_]Feature{}),
189195 };
196 result[@intFromEnum(Feature.architected_sgprs)] = .{
197 .llvm_name = "architected-sgprs",
198 .description = "Enable the architected SGPRs",
199 .dependencies = featureSet(&[_]Feature{}),
200 };
201 result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_insts)] = .{
202 .llvm_name = "atomic-buffer-global-pk-add-f16-insts",
203 .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that can return original value",
204 .dependencies = featureSet(&[_]Feature{
205 .flat_global_insts,
206 }),
207 };
208 result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_no_rtn_insts)] = .{
209 .llvm_name = "atomic-buffer-global-pk-add-f16-no-rtn-insts",
210 .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that don't return original value",
211 .dependencies = featureSet(&[_]Feature{
212 .flat_global_insts,
213 }),
214 };
215 result[@intFromEnum(Feature.atomic_ds_pk_add_16_insts)] = .{
216 .llvm_name = "atomic-ds-pk-add-16-insts",
217 .description = "Has ds_pk_add_bf16, ds_pk_add_f16, ds_pk_add_rtn_bf16, ds_pk_add_rtn_f16 instructions",
218 .dependencies = featureSet(&[_]Feature{}),
219 };
190220 result[@intFromEnum(Feature.atomic_fadd_no_rtn_insts)] = .{
191221 .llvm_name = "atomic-fadd-no-rtn-insts",
192222 .description = "Has buffer_atomic_add_f32 and global_atomic_add_f32 instructions that don't return original value",
......@@ -201,9 +231,14 @@ pub const all_features = blk: {
201231 .flat_global_insts,
202232 }),
203233 };
204 result[@intFromEnum(Feature.atomic_pk_fadd_no_rtn_insts)] = .{
205 .llvm_name = "atomic-pk-fadd-no-rtn-insts",
206 .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that don't return original value",
234 result[@intFromEnum(Feature.atomic_flat_pk_add_16_insts)] = .{
235 .llvm_name = "atomic-flat-pk-add-16-insts",
236 .description = "Has flat_atomic_pk_add_f16 and flat_atomic_pk_add_bf16 instructions",
237 .dependencies = featureSet(&[_]Feature{}),
238 };
239 result[@intFromEnum(Feature.atomic_global_pk_add_bf16_inst)] = .{
240 .llvm_name = "atomic-global-pk-add-bf16-inst",
241 .description = "Has global_atomic_pk_add_bf16 instruction",
207242 .dependencies = featureSet(&[_]Feature{
208243 .flat_global_insts,
209244 }),
......@@ -233,6 +268,11 @@ pub const all_features = blk: {
233268 .description = "Has v_fmac_f32 and v_xnor_b32 instructions",
234269 .dependencies = featureSet(&[_]Feature{}),
235270 };
271 result[@intFromEnum(Feature.dot10_insts)] = .{
272 .llvm_name = "dot10-insts",
273 .description = "Has v_dot2_f32_f16 instruction",
274 .dependencies = featureSet(&[_]Feature{}),
275 };
236276 result[@intFromEnum(Feature.dot1_insts)] = .{
237277 .llvm_name = "dot1-insts",
238278 .description = "Has v_dot4_i32_i8 and v_dot8_i32_i4 instructions",
......@@ -265,7 +305,7 @@ pub const all_features = blk: {
265305 };
266306 result[@intFromEnum(Feature.dot7_insts)] = .{
267307 .llvm_name = "dot7-insts",
268 .description = "Has v_dot2_f32_f16, v_dot4_u32_u8, v_dot8_u32_u4 instructions",
308 .description = "Has v_dot4_u32_u8, v_dot8_u32_u4 instructions",
269309 .dependencies = featureSet(&[_]Feature{}),
270310 };
271311 result[@intFromEnum(Feature.dot8_insts)] = .{
......@@ -373,6 +413,11 @@ pub const all_features = blk: {
373413 .description = "Enable single precision FMA (not as fast as mul+add, but fused)",
374414 .dependencies = featureSet(&[_]Feature{}),
375415 };
416 result[@intFromEnum(Feature.force_store_sc0_sc1)] = .{
417 .llvm_name = "force-store-sc0-sc1",
418 .description = "Has SC0 and SC1 on stores",
419 .dependencies = featureSet(&[_]Feature{}),
420 };
376421 result[@intFromEnum(Feature.fp64)] = .{
377422 .llvm_name = "fp64",
378423 .description = "Enable double precision operations",
......@@ -742,16 +787,6 @@ pub const all_features = blk: {
742787 .description = "Support NSA encoding for image instructions",
743788 .dependencies = featureSet(&[_]Feature{}),
744789 };
745 result[@intFromEnum(Feature.nsa_max_size_13)] = .{
746 .llvm_name = "nsa-max-size-13",
747 .description = "The maximum non-sequential address size in VGPRs.",
748 .dependencies = featureSet(&[_]Feature{}),
749 };
750 result[@intFromEnum(Feature.nsa_max_size_5)] = .{
751 .llvm_name = "nsa-max-size-5",
752 .description = "The maximum non-sequential address size in VGPRs.",
753 .dependencies = featureSet(&[_]Feature{}),
754 };
755790 result[@intFromEnum(Feature.nsa_to_vmem_bug)] = .{
756791 .llvm_name = "nsa-to-vmem-bug",
757792 .description = "MIMG-NSA followed by VMEM fail if EXEC_LO or EXEC_HI equals zero",
......@@ -772,6 +807,11 @@ pub const all_features = blk: {
772807 .description = "Workitem IDs are packed into v0 at kernel launch",
773808 .dependencies = featureSet(&[_]Feature{}),
774809 };
810 result[@intFromEnum(Feature.partial_nsa_encoding)] = .{
811 .llvm_name = "partial-nsa-encoding",
812 .description = "Support partial NSA encoding for image instructions",
813 .dependencies = featureSet(&[_]Feature{}),
814 };
775815 result[@intFromEnum(Feature.pk_fmac_f16_inst)] = .{
776816 .llvm_name = "pk-fmac-f16-inst",
777817 .description = "Has v_pk_fmac_f16 instruction",
......@@ -1146,7 +1186,6 @@ pub const cpu = struct {
11461186 .negative_unaligned_scratch_offset_bug,
11471187 .nsa_clause_bug,
11481188 .nsa_encoding,
1149 .nsa_max_size_5,
11501189 .nsa_to_vmem_bug,
11511190 .offset_3f_bug,
11521191 .scalar_atomics,
......@@ -1166,6 +1205,7 @@ pub const cpu = struct {
11661205 .features = featureSet(&[_]Feature{
11671206 .back_off_barrier,
11681207 .dl_insts,
1208 .dot10_insts,
11691209 .dot1_insts,
11701210 .dot2_insts,
11711211 .dot5_insts,
......@@ -1183,7 +1223,6 @@ pub const cpu = struct {
11831223 .negative_unaligned_scratch_offset_bug,
11841224 .nsa_clause_bug,
11851225 .nsa_encoding,
1186 .nsa_max_size_5,
11871226 .nsa_to_vmem_bug,
11881227 .offset_3f_bug,
11891228 .scalar_atomics,
......@@ -1203,6 +1242,7 @@ pub const cpu = struct {
12031242 .features = featureSet(&[_]Feature{
12041243 .back_off_barrier,
12051244 .dl_insts,
1245 .dot10_insts,
12061246 .dot1_insts,
12071247 .dot2_insts,
12081248 .dot5_insts,
......@@ -1220,7 +1260,6 @@ pub const cpu = struct {
12201260 .negative_unaligned_scratch_offset_bug,
12211261 .nsa_clause_bug,
12221262 .nsa_encoding,
1223 .nsa_max_size_5,
12241263 .nsa_to_vmem_bug,
12251264 .offset_3f_bug,
12261265 .scalar_atomics,
......@@ -1253,7 +1292,6 @@ pub const cpu = struct {
12531292 .negative_unaligned_scratch_offset_bug,
12541293 .nsa_clause_bug,
12551294 .nsa_encoding,
1256 .nsa_max_size_5,
12571295 .nsa_to_vmem_bug,
12581296 .offset_3f_bug,
12591297 .scalar_atomics,
......@@ -1273,6 +1311,7 @@ pub const cpu = struct {
12731311 .features = featureSet(&[_]Feature{
12741312 .back_off_barrier,
12751313 .dl_insts,
1314 .dot10_insts,
12761315 .dot1_insts,
12771316 .dot2_insts,
12781317 .dot5_insts,
......@@ -1284,7 +1323,6 @@ pub const cpu = struct {
12841323 .gfx10_b_encoding,
12851324 .ldsbankcount32,
12861325 .nsa_encoding,
1287 .nsa_max_size_13,
12881326 .shader_cycles_register,
12891327 .wavefrontsize32,
12901328 }),
......@@ -1295,6 +1333,7 @@ pub const cpu = struct {
12951333 .features = featureSet(&[_]Feature{
12961334 .back_off_barrier,
12971335 .dl_insts,
1336 .dot10_insts,
12981337 .dot1_insts,
12991338 .dot2_insts,
13001339 .dot5_insts,
......@@ -1306,7 +1345,6 @@ pub const cpu = struct {
13061345 .gfx10_b_encoding,
13071346 .ldsbankcount32,
13081347 .nsa_encoding,
1309 .nsa_max_size_13,
13101348 .shader_cycles_register,
13111349 .wavefrontsize32,
13121350 }),
......@@ -1317,6 +1355,7 @@ pub const cpu = struct {
13171355 .features = featureSet(&[_]Feature{
13181356 .back_off_barrier,
13191357 .dl_insts,
1358 .dot10_insts,
13201359 .dot1_insts,
13211360 .dot2_insts,
13221361 .dot5_insts,
......@@ -1328,7 +1367,6 @@ pub const cpu = struct {
13281367 .gfx10_b_encoding,
13291368 .ldsbankcount32,
13301369 .nsa_encoding,
1331 .nsa_max_size_13,
13321370 .shader_cycles_register,
13331371 .wavefrontsize32,
13341372 }),
......@@ -1339,6 +1377,7 @@ pub const cpu = struct {
13391377 .features = featureSet(&[_]Feature{
13401378 .back_off_barrier,
13411379 .dl_insts,
1380 .dot10_insts,
13421381 .dot1_insts,
13431382 .dot2_insts,
13441383 .dot5_insts,
......@@ -1350,7 +1389,6 @@ pub const cpu = struct {
13501389 .gfx10_b_encoding,
13511390 .ldsbankcount32,
13521391 .nsa_encoding,
1353 .nsa_max_size_13,
13541392 .shader_cycles_register,
13551393 .wavefrontsize32,
13561394 }),
......@@ -1361,6 +1399,7 @@ pub const cpu = struct {
13611399 .features = featureSet(&[_]Feature{
13621400 .back_off_barrier,
13631401 .dl_insts,
1402 .dot10_insts,
13641403 .dot1_insts,
13651404 .dot2_insts,
13661405 .dot5_insts,
......@@ -1372,7 +1411,6 @@ pub const cpu = struct {
13721411 .gfx10_b_encoding,
13731412 .ldsbankcount32,
13741413 .nsa_encoding,
1375 .nsa_max_size_13,
13761414 .shader_cycles_register,
13771415 .wavefrontsize32,
13781416 }),
......@@ -1383,6 +1421,7 @@ pub const cpu = struct {
13831421 .features = featureSet(&[_]Feature{
13841422 .back_off_barrier,
13851423 .dl_insts,
1424 .dot10_insts,
13861425 .dot1_insts,
13871426 .dot2_insts,
13881427 .dot5_insts,
......@@ -1394,7 +1433,6 @@ pub const cpu = struct {
13941433 .gfx10_b_encoding,
13951434 .ldsbankcount32,
13961435 .nsa_encoding,
1397 .nsa_max_size_13,
13981436 .shader_cycles_register,
13991437 .wavefrontsize32,
14001438 }),
......@@ -1405,6 +1443,7 @@ pub const cpu = struct {
14051443 .features = featureSet(&[_]Feature{
14061444 .back_off_barrier,
14071445 .dl_insts,
1446 .dot10_insts,
14081447 .dot1_insts,
14091448 .dot2_insts,
14101449 .dot5_insts,
......@@ -1416,7 +1455,6 @@ pub const cpu = struct {
14161455 .gfx10_b_encoding,
14171456 .ldsbankcount32,
14181457 .nsa_encoding,
1419 .nsa_max_size_13,
14201458 .shader_cycles_register,
14211459 .wavefrontsize32,
14221460 }),
......@@ -1429,6 +1467,7 @@ pub const cpu = struct {
14291467 .atomic_fadd_no_rtn_insts,
14301468 .atomic_fadd_rtn_insts,
14311469 .dl_insts,
1470 .dot10_insts,
14321471 .dot5_insts,
14331472 .dot7_insts,
14341473 .dot8_insts,
......@@ -1440,8 +1479,8 @@ pub const cpu = struct {
14401479 .ldsbankcount32,
14411480 .mad_intra_fwd_bug,
14421481 .nsa_encoding,
1443 .nsa_max_size_5,
14441482 .packed_tid,
1483 .partial_nsa_encoding,
14451484 .shader_cycles_register,
14461485 .user_sgpr_init16_bug,
14471486 .valu_trans_use_hazard,
......@@ -1457,6 +1496,7 @@ pub const cpu = struct {
14571496 .atomic_fadd_no_rtn_insts,
14581497 .atomic_fadd_rtn_insts,
14591498 .dl_insts,
1499 .dot10_insts,
14601500 .dot5_insts,
14611501 .dot7_insts,
14621502 .dot8_insts,
......@@ -1468,8 +1508,8 @@ pub const cpu = struct {
14681508 .ldsbankcount32,
14691509 .mad_intra_fwd_bug,
14701510 .nsa_encoding,
1471 .nsa_max_size_5,
14721511 .packed_tid,
1512 .partial_nsa_encoding,
14731513 .shader_cycles_register,
14741514 .valu_trans_use_hazard,
14751515 .vcmpx_permlane_hazard,
......@@ -1484,6 +1524,7 @@ pub const cpu = struct {
14841524 .atomic_fadd_no_rtn_insts,
14851525 .atomic_fadd_rtn_insts,
14861526 .dl_insts,
1527 .dot10_insts,
14871528 .dot5_insts,
14881529 .dot7_insts,
14891530 .dot8_insts,
......@@ -1494,8 +1535,8 @@ pub const cpu = struct {
14941535 .ldsbankcount32,
14951536 .mad_intra_fwd_bug,
14961537 .nsa_encoding,
1497 .nsa_max_size_5,
14981538 .packed_tid,
1539 .partial_nsa_encoding,
14991540 .shader_cycles_register,
15001541 .user_sgpr_init16_bug,
15011542 .valu_trans_use_hazard,
......@@ -1511,6 +1552,7 @@ pub const cpu = struct {
15111552 .atomic_fadd_no_rtn_insts,
15121553 .atomic_fadd_rtn_insts,
15131554 .dl_insts,
1555 .dot10_insts,
15141556 .dot5_insts,
15151557 .dot7_insts,
15161558 .dot8_insts,
......@@ -1521,14 +1563,67 @@ pub const cpu = struct {
15211563 .ldsbankcount32,
15221564 .mad_intra_fwd_bug,
15231565 .nsa_encoding,
1524 .nsa_max_size_5,
15251566 .packed_tid,
1567 .partial_nsa_encoding,
15261568 .shader_cycles_register,
15271569 .valu_trans_use_hazard,
15281570 .vcmpx_permlane_hazard,
15291571 .wavefrontsize32,
15301572 }),
15311573 };
1574 pub const gfx1150 = CpuModel{
1575 .name = "gfx1150",
1576 .llvm_name = "gfx1150",
1577 .features = featureSet(&[_]Feature{
1578 .architected_flat_scratch,
1579 .atomic_fadd_no_rtn_insts,
1580 .atomic_fadd_rtn_insts,
1581 .dl_insts,
1582 .dot10_insts,
1583 .dot5_insts,
1584 .dot7_insts,
1585 .dot8_insts,
1586 .dot9_insts,
1587 .flat_atomic_fadd_f32_inst,
1588 .gfx11,
1589 .image_insts,
1590 .ldsbankcount32,
1591 .mad_intra_fwd_bug,
1592 .nsa_encoding,
1593 .packed_tid,
1594 .partial_nsa_encoding,
1595 .shader_cycles_register,
1596 .vcmpx_permlane_hazard,
1597 .wavefrontsize32,
1598 }),
1599 };
1600 pub const gfx1151 = CpuModel{
1601 .name = "gfx1151",
1602 .llvm_name = "gfx1151",
1603 .features = featureSet(&[_]Feature{
1604 .architected_flat_scratch,
1605 .atomic_fadd_no_rtn_insts,
1606 .atomic_fadd_rtn_insts,
1607 .dl_insts,
1608 .dot10_insts,
1609 .dot5_insts,
1610 .dot7_insts,
1611 .dot8_insts,
1612 .dot9_insts,
1613 .flat_atomic_fadd_f32_inst,
1614 .gfx11,
1615 .gfx11_full_vgprs,
1616 .image_insts,
1617 .ldsbankcount32,
1618 .mad_intra_fwd_bug,
1619 .nsa_encoding,
1620 .packed_tid,
1621 .partial_nsa_encoding,
1622 .shader_cycles_register,
1623 .vcmpx_permlane_hazard,
1624 .wavefrontsize32,
1625 }),
1626 };
15321627 pub const gfx600 = CpuModel{
15331628 .name = "gfx600",
15341629 .llvm_name = "gfx600",
......@@ -1702,6 +1797,7 @@ pub const cpu = struct {
17021797 .llvm_name = "gfx906",
17031798 .features = featureSet(&[_]Feature{
17041799 .dl_insts,
1800 .dot10_insts,
17051801 .dot1_insts,
17061802 .dot2_insts,
17071803 .dot7_insts,
......@@ -1721,9 +1817,10 @@ pub const cpu = struct {
17211817 .name = "gfx908",
17221818 .llvm_name = "gfx908",
17231819 .features = featureSet(&[_]Feature{
1820 .atomic_buffer_global_pk_add_f16_no_rtn_insts,
17241821 .atomic_fadd_no_rtn_insts,
1725 .atomic_pk_fadd_no_rtn_insts,
17261822 .dl_insts,
1823 .dot10_insts,
17271824 .dot1_insts,
17281825 .dot2_insts,
17291826 .dot3_insts,
......@@ -1764,11 +1861,12 @@ pub const cpu = struct {
17641861 .name = "gfx90a",
17651862 .llvm_name = "gfx90a",
17661863 .features = featureSet(&[_]Feature{
1864 .atomic_buffer_global_pk_add_f16_insts,
17671865 .atomic_fadd_no_rtn_insts,
17681866 .atomic_fadd_rtn_insts,
1769 .atomic_pk_fadd_no_rtn_insts,
17701867 .back_off_barrier,
17711868 .dl_insts,
1869 .dot10_insts,
17721870 .dot1_insts,
17731871 .dot2_insts,
17741872 .dot3_insts,
......@@ -1811,11 +1909,93 @@ pub const cpu = struct {
18111909 .llvm_name = "gfx940",
18121910 .features = featureSet(&[_]Feature{
18131911 .architected_flat_scratch,
1912 .atomic_buffer_global_pk_add_f16_insts,
1913 .atomic_ds_pk_add_16_insts,
1914 .atomic_fadd_no_rtn_insts,
1915 .atomic_fadd_rtn_insts,
1916 .atomic_flat_pk_add_16_insts,
1917 .atomic_global_pk_add_bf16_inst,
1918 .back_off_barrier,
1919 .dl_insts,
1920 .dot10_insts,
1921 .dot1_insts,
1922 .dot2_insts,
1923 .dot3_insts,
1924 .dot4_insts,
1925 .dot5_insts,
1926 .dot6_insts,
1927 .dot7_insts,
1928 .dpp_64bit,
1929 .flat_atomic_fadd_f32_inst,
1930 .fma_mix_insts,
1931 .fmacf64_inst,
1932 .force_store_sc0_sc1,
1933 .fp8_insts,
1934 .full_rate_64_ops,
1935 .gfx9,
1936 .gfx90a_insts,
1937 .gfx940_insts,
1938 .ldsbankcount32,
1939 .mai_insts,
1940 .packed_fp32_ops,
1941 .packed_tid,
1942 .pk_fmac_f16_inst,
1943 .sramecc_support,
1944 }),
1945 };
1946 pub const gfx941 = CpuModel{
1947 .name = "gfx941",
1948 .llvm_name = "gfx941",
1949 .features = featureSet(&[_]Feature{
1950 .architected_flat_scratch,
1951 .atomic_buffer_global_pk_add_f16_insts,
1952 .atomic_ds_pk_add_16_insts,
1953 .atomic_fadd_no_rtn_insts,
1954 .atomic_fadd_rtn_insts,
1955 .atomic_flat_pk_add_16_insts,
1956 .atomic_global_pk_add_bf16_inst,
1957 .back_off_barrier,
1958 .dl_insts,
1959 .dot10_insts,
1960 .dot1_insts,
1961 .dot2_insts,
1962 .dot3_insts,
1963 .dot4_insts,
1964 .dot5_insts,
1965 .dot6_insts,
1966 .dot7_insts,
1967 .dpp_64bit,
1968 .flat_atomic_fadd_f32_inst,
1969 .fma_mix_insts,
1970 .fmacf64_inst,
1971 .force_store_sc0_sc1,
1972 .fp8_insts,
1973 .full_rate_64_ops,
1974 .gfx9,
1975 .gfx90a_insts,
1976 .gfx940_insts,
1977 .ldsbankcount32,
1978 .mai_insts,
1979 .packed_fp32_ops,
1980 .packed_tid,
1981 .pk_fmac_f16_inst,
1982 .sramecc_support,
1983 }),
1984 };
1985 pub const gfx942 = CpuModel{
1986 .name = "gfx942",
1987 .llvm_name = "gfx942",
1988 .features = featureSet(&[_]Feature{
1989 .architected_flat_scratch,
1990 .atomic_buffer_global_pk_add_f16_insts,
1991 .atomic_ds_pk_add_16_insts,
18141992 .atomic_fadd_no_rtn_insts,
18151993 .atomic_fadd_rtn_insts,
1816 .atomic_pk_fadd_no_rtn_insts,
1994 .atomic_flat_pk_add_16_insts,
1995 .atomic_global_pk_add_bf16_inst,
18171996 .back_off_barrier,
18181997 .dl_insts,
1998 .dot10_insts,
18191999 .dot1_insts,
18202000 .dot2_insts,
18212001 .dot3_insts,
lib/std/target/arm.zig+16-4
......@@ -122,7 +122,9 @@ pub const Feature = enum {
122122 r4,
123123 ras,
124124 rclass,
125 read_tp_hard,
125 read_tp_tpidrprw,
126 read_tp_tpidruro,
127 read_tp_tpidrurw,
126128 reserve_r9,
127129 ret_addr_stack,
128130 sb,
......@@ -949,9 +951,19 @@ pub const all_features = blk: {
949951 .description = "Is realtime profile ('R' series)",
950952 .dependencies = featureSet(&[_]Feature{}),
951953 };
952 result[@intFromEnum(Feature.read_tp_hard)] = .{
953 .llvm_name = "read-tp-hard",
954 .description = "Reading thread pointer from register",
954 result[@intFromEnum(Feature.read_tp_tpidrprw)] = .{
955 .llvm_name = "read-tp-tpidrprw",
956 .description = "Reading thread pointer from TPIDRPRW register",
957 .dependencies = featureSet(&[_]Feature{}),
958 };
959 result[@intFromEnum(Feature.read_tp_tpidruro)] = .{
960 .llvm_name = "read-tp-tpidruro",
961 .description = "Reading thread pointer from TPIDRURO register",
962 .dependencies = featureSet(&[_]Feature{}),
963 };
964 result[@intFromEnum(Feature.read_tp_tpidrurw)] = .{
965 .llvm_name = "read-tp-tpidrurw",
966 .description = "Reading thread pointer from TPIDRURW register",
955967 .dependencies = featureSet(&[_]Feature{}),
956968 };
957969 result[@intFromEnum(Feature.reserve_r9)] = .{
lib/std/target/avr.zig+8-9
......@@ -25,12 +25,12 @@ pub const Feature = enum {
2525 elpmx,
2626 ijmpcall,
2727 jmpcall,
28 lowbytefirst,
2829 lpm,
2930 lpmx,
3031 memmappedregs,
3132 movw,
3233 mul,
33 progmem,
3434 rmw,
3535 smallstack,
3636 special,
......@@ -69,7 +69,6 @@ pub const all_features = blk: {
6969 .avr0,
7070 .lpm,
7171 .memmappedregs,
72 .progmem,
7372 }),
7473 };
7574 result[@intFromEnum(Feature.avr2)] = .{
......@@ -207,6 +206,11 @@ pub const all_features = blk: {
207206 .description = "The device supports the `JMP` and `CALL` instructions",
208207 .dependencies = featureSet(&[_]Feature{}),
209208 };
209 result[@intFromEnum(Feature.lowbytefirst)] = .{
210 .llvm_name = "lowbytefirst",
211 .description = "Do the low byte first when writing a 16-bit port or storing a 16-bit word",
212 .dependencies = featureSet(&[_]Feature{}),
213 };
210214 result[@intFromEnum(Feature.lpm)] = .{
211215 .llvm_name = "lpm",
212216 .description = "The device supports the `LPM` instruction",
......@@ -232,11 +236,6 @@ pub const all_features = blk: {
232236 .description = "The device supports the multiplication instructions",
233237 .dependencies = featureSet(&[_]Feature{}),
234238 };
235 result[@intFromEnum(Feature.progmem)] = .{
236 .llvm_name = "progmem",
237 .description = "The device has a separate flash namespace",
238 .dependencies = featureSet(&[_]Feature{}),
239 };
240239 result[@intFromEnum(Feature.rmw)] = .{
241240 .llvm_name = "rmw",
242241 .description = "The device supports the read-write-modify instructions: XCH, LAS, LAC, LAT",
......@@ -303,11 +302,11 @@ pub const all_features = blk: {
303302 .elpmx,
304303 .ijmpcall,
305304 .jmpcall,
305 .lowbytefirst,
306306 .lpm,
307307 .lpmx,
308308 .movw,
309309 .mul,
310 .progmem,
311310 .spm,
312311 .spmx,
313312 .sram,
......@@ -322,11 +321,11 @@ pub const all_features = blk: {
322321 .@"break",
323322 .ijmpcall,
324323 .jmpcall,
324 .lowbytefirst,
325325 .lpm,
326326 .lpmx,
327327 .movw,
328328 .mul,
329 .progmem,
330329 .sram,
331330 }),
332331 };
lib/std/target/bpf.zig+3-1
......@@ -66,6 +66,8 @@ pub const cpu = struct {
6666 pub const v3 = CpuModel{
6767 .name = "v3",
6868 .llvm_name = "v3",
69 .features = featureSet(&[_]Feature{}),
69 .features = featureSet(&[_]Feature{
70 .alu32,
71 }),
7072 };
7173};
lib/std/target/csky.zig+10-10
......@@ -214,7 +214,7 @@ pub const all_features = blk: {
214214 };
215215 result[@intFromEnum(Feature.dsp_silan)] = .{
216216 .llvm_name = "dsp_silan",
217 .description = "Enable DSP Silan instructions",
217 .description = "Enable DSP Silan instrutions",
218218 .dependencies = featureSet(&[_]Feature{}),
219219 };
220220 result[@intFromEnum(Feature.dspe60)] = .{
......@@ -224,7 +224,7 @@ pub const all_features = blk: {
224224 };
225225 result[@intFromEnum(Feature.dspv2)] = .{
226226 .llvm_name = "dspv2",
227 .description = "Enable DSP V2.0 instructions",
227 .description = "Enable DSP V2.0 instrutions",
228228 .dependencies = featureSet(&[_]Feature{}),
229229 };
230230 result[@intFromEnum(Feature.e1)] = .{
......@@ -243,7 +243,7 @@ pub const all_features = blk: {
243243 };
244244 result[@intFromEnum(Feature.edsp)] = .{
245245 .llvm_name = "edsp",
246 .description = "Enable DSP instructions",
246 .description = "Enable DSP instrutions",
247247 .dependencies = featureSet(&[_]Feature{}),
248248 };
249249 result[@intFromEnum(Feature.elrw)] = .{
......@@ -298,12 +298,12 @@ pub const all_features = blk: {
298298 };
299299 result[@intFromEnum(Feature.fpuv3_hf)] = .{
300300 .llvm_name = "fpuv3_hf",
301 .description = "Enable FPUv3 harf precision operate instructions",
301 .description = "Enable FPUv3 half precision operate instructions",
302302 .dependencies = featureSet(&[_]Feature{}),
303303 };
304304 result[@intFromEnum(Feature.fpuv3_hi)] = .{
305305 .llvm_name = "fpuv3_hi",
306 .description = "Enable FPUv3 harf word converting instructions",
306 .description = "Enable FPUv3 half word converting instructions",
307307 .dependencies = featureSet(&[_]Feature{}),
308308 };
309309 result[@intFromEnum(Feature.fpuv3_sf)] = .{
......@@ -333,12 +333,12 @@ pub const all_features = blk: {
333333 };
334334 result[@intFromEnum(Feature.hwdiv)] = .{
335335 .llvm_name = "hwdiv",
336 .description = "Enable divide instructions",
336 .description = "Enable divide instrutions",
337337 .dependencies = featureSet(&[_]Feature{}),
338338 };
339339 result[@intFromEnum(Feature.istack)] = .{
340340 .llvm_name = "istack",
341 .description = "Enable interrupt attribute",
341 .description = "Enable interrput attribute",
342342 .dependencies = featureSet(&[_]Feature{}),
343343 };
344344 result[@intFromEnum(Feature.java)] = .{
......@@ -362,7 +362,7 @@ pub const all_features = blk: {
362362 };
363363 result[@intFromEnum(Feature.multiple_stld)] = .{
364364 .llvm_name = "multiple_stld",
365 .description = "Enable multiple load/store instructions",
365 .description = "Enable multiple load/store instrutions",
366366 .dependencies = featureSet(&[_]Feature{}),
367367 };
368368 result[@intFromEnum(Feature.nvic)] = .{
......@@ -372,7 +372,7 @@ pub const all_features = blk: {
372372 };
373373 result[@intFromEnum(Feature.pushpop)] = .{
374374 .llvm_name = "pushpop",
375 .description = "Enable push/pop instructions",
375 .description = "Enable push/pop instrutions",
376376 .dependencies = featureSet(&[_]Feature{}),
377377 };
378378 result[@intFromEnum(Feature.smart)] = .{
......@@ -3079,7 +3079,7 @@ pub const cpu = struct {
30793079 .btst16,
30803080 }),
30813081 };
3082 pub const @"i805" = CpuModel{
3082 pub const i805 = CpuModel{
30833083 .name = "i805",
30843084 .llvm_name = "i805",
30853085 .features = featureSet(&[_]Feature{
lib/std/target/loongarch.zig+17
......@@ -16,6 +16,7 @@ pub const Feature = enum {
1616 lbt,
1717 lsx,
1818 lvz,
19 ual,
1920};
2021
2122pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet;
......@@ -88,6 +89,11 @@ pub const all_features = blk: {
8889 .description = "'LVZ' (Loongson Virtualization Extension)",
8990 .dependencies = featureSet(&[_]Feature{}),
9091 };
92 result[@intFromEnum(Feature.ual)] = .{
93 .llvm_name = "ual",
94 .description = "Allow memory accesses to be unaligned",
95 .dependencies = featureSet(&[_]Feature{}),
96 };
9197 const ti = @typeInfo(Feature);
9298 for (&result, 0..) |*elem, i| {
9399 elem.index = i;
......@@ -114,6 +120,7 @@ pub const cpu = struct {
114120 .llvm_name = "generic-la64",
115121 .features = featureSet(&[_]Feature{
116122 .@"64bit",
123 .ual,
117124 }),
118125 };
119126 pub const la464 = CpuModel{
......@@ -124,6 +131,16 @@ pub const cpu = struct {
124131 .lasx,
125132 .lbt,
126133 .lvz,
134 .ual,
135 }),
136 };
137 pub const loongarch64 = CpuModel{
138 .name = "loongarch64",
139 .llvm_name = "loongarch64",
140 .features = featureSet(&[_]Feature{
141 .@"64bit",
142 .d,
143 .ual,
127144 }),
128145 };
129146};
lib/std/target/m68k.zig+15
......@@ -11,6 +11,8 @@ pub const Feature = enum {
1111 isa_68030,
1212 isa_68040,
1313 isa_68060,
14 isa_68881,
15 isa_68882,
1416 reserve_a0,
1517 reserve_a1,
1618 reserve_a2,
......@@ -68,6 +70,7 @@ pub const all_features = blk: {
6870 .description = "Is M68040 ISA supported",
6971 .dependencies = featureSet(&[_]Feature{
7072 .isa_68030,
73 .isa_68882,
7174 }),
7275 };
7376 result[@intFromEnum(Feature.isa_68060)] = .{
......@@ -77,6 +80,18 @@ pub const all_features = blk: {
7780 .isa_68040,
7881 }),
7982 };
83 result[@intFromEnum(Feature.isa_68881)] = .{
84 .llvm_name = "isa-68881",
85 .description = "Is M68881 (FPU) ISA supported",
86 .dependencies = featureSet(&[_]Feature{}),
87 };
88 result[@intFromEnum(Feature.isa_68882)] = .{
89 .llvm_name = "isa-68882",
90 .description = "Is M68882 (FPU) ISA supported",
91 .dependencies = featureSet(&[_]Feature{
92 .isa_68881,
93 }),
94 };
8095 result[@intFromEnum(Feature.reserve_a0)] = .{
8196 .llvm_name = "reserve-a0",
8297 .description = "Reserve A0 register",
lib/std/target/nvptx.zig+66-40
......@@ -25,6 +25,8 @@ pub const Feature = enum {
2525 ptx76,
2626 ptx77,
2727 ptx78,
28 ptx80,
29 ptx81,
2830 sm_20,
2931 sm_21,
3032 sm_30,
......@@ -45,6 +47,7 @@ pub const Feature = enum {
4547 sm_87,
4648 sm_89,
4749 sm_90,
50 sm_90,
4851};
4952
5053pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet;
......@@ -58,202 +61,217 @@ pub const all_features = blk: {
5861 var result: [len]CpuFeature = undefined;
5962 result[@intFromEnum(Feature.ptx32)] = .{
6063 .llvm_name = "ptx32",
61 .description = "Use PTX version 3.2",
64 .description = "Use PTX version 32",
6265 .dependencies = featureSet(&[_]Feature{}),
6366 };
6467 result[@intFromEnum(Feature.ptx40)] = .{
6568 .llvm_name = "ptx40",
66 .description = "Use PTX version 4.0",
69 .description = "Use PTX version 40",
6770 .dependencies = featureSet(&[_]Feature{}),
6871 };
6972 result[@intFromEnum(Feature.ptx41)] = .{
7073 .llvm_name = "ptx41",
71 .description = "Use PTX version 4.1",
74 .description = "Use PTX version 41",
7275 .dependencies = featureSet(&[_]Feature{}),
7376 };
7477 result[@intFromEnum(Feature.ptx42)] = .{
7578 .llvm_name = "ptx42",
76 .description = "Use PTX version 4.2",
79 .description = "Use PTX version 42",
7780 .dependencies = featureSet(&[_]Feature{}),
7881 };
7982 result[@intFromEnum(Feature.ptx43)] = .{
8083 .llvm_name = "ptx43",
81 .description = "Use PTX version 4.3",
84 .description = "Use PTX version 43",
8285 .dependencies = featureSet(&[_]Feature{}),
8386 };
8487 result[@intFromEnum(Feature.ptx50)] = .{
8588 .llvm_name = "ptx50",
86 .description = "Use PTX version 5.0",
89 .description = "Use PTX version 50",
8790 .dependencies = featureSet(&[_]Feature{}),
8891 };
8992 result[@intFromEnum(Feature.ptx60)] = .{
9093 .llvm_name = "ptx60",
91 .description = "Use PTX version 6.0",
94 .description = "Use PTX version 60",
9295 .dependencies = featureSet(&[_]Feature{}),
9396 };
9497 result[@intFromEnum(Feature.ptx61)] = .{
9598 .llvm_name = "ptx61",
96 .description = "Use PTX version 6.1",
99 .description = "Use PTX version 61",
97100 .dependencies = featureSet(&[_]Feature{}),
98101 };
99102 result[@intFromEnum(Feature.ptx63)] = .{
100103 .llvm_name = "ptx63",
101 .description = "Use PTX version 6.3",
104 .description = "Use PTX version 63",
102105 .dependencies = featureSet(&[_]Feature{}),
103106 };
104107 result[@intFromEnum(Feature.ptx64)] = .{
105108 .llvm_name = "ptx64",
106 .description = "Use PTX version 6.4",
109 .description = "Use PTX version 64",
107110 .dependencies = featureSet(&[_]Feature{}),
108111 };
109112 result[@intFromEnum(Feature.ptx65)] = .{
110113 .llvm_name = "ptx65",
111 .description = "Use PTX version 6.5",
114 .description = "Use PTX version 65",
112115 .dependencies = featureSet(&[_]Feature{}),
113116 };
114117 result[@intFromEnum(Feature.ptx70)] = .{
115118 .llvm_name = "ptx70",
116 .description = "Use PTX version 7.0",
119 .description = "Use PTX version 70",
117120 .dependencies = featureSet(&[_]Feature{}),
118121 };
119122 result[@intFromEnum(Feature.ptx71)] = .{
120123 .llvm_name = "ptx71",
121 .description = "Use PTX version 7.1",
124 .description = "Use PTX version 71",
122125 .dependencies = featureSet(&[_]Feature{}),
123126 };
124127 result[@intFromEnum(Feature.ptx72)] = .{
125128 .llvm_name = "ptx72",
126 .description = "Use PTX version 7.2",
129 .description = "Use PTX version 72",
127130 .dependencies = featureSet(&[_]Feature{}),
128131 };
129132 result[@intFromEnum(Feature.ptx73)] = .{
130133 .llvm_name = "ptx73",
131 .description = "Use PTX version 7.3",
134 .description = "Use PTX version 73",
132135 .dependencies = featureSet(&[_]Feature{}),
133136 };
134137 result[@intFromEnum(Feature.ptx74)] = .{
135138 .llvm_name = "ptx74",
136 .description = "Use PTX version 7.4",
139 .description = "Use PTX version 74",
137140 .dependencies = featureSet(&[_]Feature{}),
138141 };
139142 result[@intFromEnum(Feature.ptx75)] = .{
140143 .llvm_name = "ptx75",
141 .description = "Use PTX version 7.5",
144 .description = "Use PTX version 75",
142145 .dependencies = featureSet(&[_]Feature{}),
143146 };
144147 result[@intFromEnum(Feature.ptx76)] = .{
145148 .llvm_name = "ptx76",
146 .description = "Use PTX version 7.6",
149 .description = "Use PTX version 76",
147150 .dependencies = featureSet(&[_]Feature{}),
148151 };
149152 result[@intFromEnum(Feature.ptx77)] = .{
150153 .llvm_name = "ptx77",
151 .description = "Use PTX version 7.7",
154 .description = "Use PTX version 77",
152155 .dependencies = featureSet(&[_]Feature{}),
153156 };
154157 result[@intFromEnum(Feature.ptx78)] = .{
155158 .llvm_name = "ptx78",
156 .description = "Use PTX version 7.8",
159 .description = "Use PTX version 78",
160 .dependencies = featureSet(&[_]Feature{}),
161 };
162 result[@intFromEnum(Feature.ptx80)] = .{
163 .llvm_name = "ptx80",
164 .description = "Use PTX version 80",
165 .dependencies = featureSet(&[_]Feature{}),
166 };
167 result[@intFromEnum(Feature.ptx81)] = .{
168 .llvm_name = "ptx81",
169 .description = "Use PTX version 81",
157170 .dependencies = featureSet(&[_]Feature{}),
158171 };
159172 result[@intFromEnum(Feature.sm_20)] = .{
160173 .llvm_name = "sm_20",
161 .description = "Target SM 2.0",
174 .description = "Target SM 20",
162175 .dependencies = featureSet(&[_]Feature{}),
163176 };
164177 result[@intFromEnum(Feature.sm_21)] = .{
165178 .llvm_name = "sm_21",
166 .description = "Target SM 2.1",
179 .description = "Target SM 21",
167180 .dependencies = featureSet(&[_]Feature{}),
168181 };
169182 result[@intFromEnum(Feature.sm_30)] = .{
170183 .llvm_name = "sm_30",
171 .description = "Target SM 3.0",
184 .description = "Target SM 30",
172185 .dependencies = featureSet(&[_]Feature{}),
173186 };
174187 result[@intFromEnum(Feature.sm_32)] = .{
175188 .llvm_name = "sm_32",
176 .description = "Target SM 3.2",
189 .description = "Target SM 32",
177190 .dependencies = featureSet(&[_]Feature{}),
178191 };
179192 result[@intFromEnum(Feature.sm_35)] = .{
180193 .llvm_name = "sm_35",
181 .description = "Target SM 3.5",
194 .description = "Target SM 35",
182195 .dependencies = featureSet(&[_]Feature{}),
183196 };
184197 result[@intFromEnum(Feature.sm_37)] = .{
185198 .llvm_name = "sm_37",
186 .description = "Target SM 3.7",
199 .description = "Target SM 37",
187200 .dependencies = featureSet(&[_]Feature{}),
188201 };
189202 result[@intFromEnum(Feature.sm_50)] = .{
190203 .llvm_name = "sm_50",
191 .description = "Target SM 5.0",
204 .description = "Target SM 50",
192205 .dependencies = featureSet(&[_]Feature{}),
193206 };
194207 result[@intFromEnum(Feature.sm_52)] = .{
195208 .llvm_name = "sm_52",
196 .description = "Target SM 5.2",
209 .description = "Target SM 52",
197210 .dependencies = featureSet(&[_]Feature{}),
198211 };
199212 result[@intFromEnum(Feature.sm_53)] = .{
200213 .llvm_name = "sm_53",
201 .description = "Target SM 5.3",
214 .description = "Target SM 53",
202215 .dependencies = featureSet(&[_]Feature{}),
203216 };
204217 result[@intFromEnum(Feature.sm_60)] = .{
205218 .llvm_name = "sm_60",
206 .description = "Target SM 6.0",
219 .description = "Target SM 60",
207220 .dependencies = featureSet(&[_]Feature{}),
208221 };
209222 result[@intFromEnum(Feature.sm_61)] = .{
210223 .llvm_name = "sm_61",
211 .description = "Target SM 6.1",
224 .description = "Target SM 61",
212225 .dependencies = featureSet(&[_]Feature{}),
213226 };
214227 result[@intFromEnum(Feature.sm_62)] = .{
215228 .llvm_name = "sm_62",
216 .description = "Target SM 6.2",
229 .description = "Target SM 62",
217230 .dependencies = featureSet(&[_]Feature{}),
218231 };
219232 result[@intFromEnum(Feature.sm_70)] = .{
220233 .llvm_name = "sm_70",
221 .description = "Target SM 7.0",
234 .description = "Target SM 70",
222235 .dependencies = featureSet(&[_]Feature{}),
223236 };
224237 result[@intFromEnum(Feature.sm_72)] = .{
225238 .llvm_name = "sm_72",
226 .description = "Target SM 7.2",
239 .description = "Target SM 72",
227240 .dependencies = featureSet(&[_]Feature{}),
228241 };
229242 result[@intFromEnum(Feature.sm_75)] = .{
230243 .llvm_name = "sm_75",
231 .description = "Target SM 7.5",
244 .description = "Target SM 75",
232245 .dependencies = featureSet(&[_]Feature{}),
233246 };
234247 result[@intFromEnum(Feature.sm_80)] = .{
235248 .llvm_name = "sm_80",
236 .description = "Target SM 8.0",
249 .description = "Target SM 80",
237250 .dependencies = featureSet(&[_]Feature{}),
238251 };
239252 result[@intFromEnum(Feature.sm_86)] = .{
240253 .llvm_name = "sm_86",
241 .description = "Target SM 8.6",
254 .description = "Target SM 86",
242255 .dependencies = featureSet(&[_]Feature{}),
243256 };
244257 result[@intFromEnum(Feature.sm_87)] = .{
245258 .llvm_name = "sm_87",
246 .description = "Target SM 8.7",
259 .description = "Target SM 87",
247260 .dependencies = featureSet(&[_]Feature{}),
248261 };
249262 result[@intFromEnum(Feature.sm_89)] = .{
250263 .llvm_name = "sm_89",
251 .description = "Target SM 8.9",
264 .description = "Target SM 89",
252265 .dependencies = featureSet(&[_]Feature{}),
253266 };
254267 result[@intFromEnum(Feature.sm_90)] = .{
255268 .llvm_name = "sm_90",
256 .description = "Target SM 9.0",
269 .description = "Target SM 90",
270 .dependencies = featureSet(&[_]Feature{}),
271 };
272 result[@intFromEnum(Feature.sm_90)] = .{
273 .llvm_name = "sm_90",
274 .description = "Target SM 90",
257275 .dependencies = featureSet(&[_]Feature{}),
258276 };
259277 const ti = @typeInfo(Feature);
......@@ -424,4 +442,12 @@ pub const cpu = struct {
424442 .sm_90,
425443 }),
426444 };
445 pub const sm_90a = CpuModel{
446 .name = "sm_90a",
447 .llvm_name = "sm_90a",
448 .features = featureSet(&[_]Feature{
449 .ptx80,
450 .sm_90,
451 }),
452 };
427453};
lib/std/target/riscv.zig+401-26
......@@ -10,14 +10,33 @@ pub const Feature = enum {
1010 a,
1111 c,
1212 d,
13 dlen_factor_2,
1314 e,
14 experimental_zawrs,
15 experimental_zca,
16 experimental_zcd,
17 experimental_zcf,
15 experimental_smaia,
16 experimental_ssaia,
17 experimental_zacas,
18 experimental_zfa,
19 experimental_zfbfmin,
20 experimental_zicond,
1821 experimental_zihintntl,
1922 experimental_ztso,
20 experimental_zvfh,
23 experimental_zvbb,
24 experimental_zvbc,
25 experimental_zvfbfmin,
26 experimental_zvfbfwma,
27 experimental_zvkg,
28 experimental_zvkn,
29 experimental_zvknc,
30 experimental_zvkned,
31 experimental_zvkng,
32 experimental_zvknha,
33 experimental_zvknhb,
34 experimental_zvks,
35 experimental_zvksc,
36 experimental_zvksed,
37 experimental_zvksg,
38 experimental_zvksh,
39 experimental_zvkt,
2140 f,
2241 forced_atomics,
2342 h,
......@@ -59,15 +78,32 @@ pub const Feature = enum {
5978 reserve_x8,
6079 reserve_x9,
6180 save_restore,
81 seq_cst_trailing_fence,
6282 short_forward_branch_opt,
6383 svinval,
6484 svnapot,
6585 svpbmt,
6686 tagged_globals,
6787 unaligned_scalar_mem,
88 unaligned_vector_mem,
6889 v,
90 xcvbitmanip,
91 xcvmac,
92 xsfcie,
93 xsfvcp,
94 xtheadba,
95 xtheadbb,
96 xtheadbs,
97 xtheadcmo,
98 xtheadcondmov,
99 xtheadfmemidx,
100 xtheadmac,
101 xtheadmemidx,
102 xtheadmempair,
103 xtheadsync,
69104 xtheadvdot,
70105 xventanacondops,
106 zawrs,
71107 zba,
72108 zbb,
73109 zbc,
......@@ -75,6 +111,13 @@ pub const Feature = enum {
75111 zbkc,
76112 zbkx,
77113 zbs,
114 zca,
115 zcb,
116 zcd,
117 zce,
118 zcf,
119 zcmp,
120 zcmt,
78121 zdinx,
79122 zfh,
80123 zfhmin,
......@@ -84,7 +127,11 @@ pub const Feature = enum {
84127 zicbom,
85128 zicbop,
86129 zicboz,
130 zicntr,
131 zicsr,
132 zifencei,
87133 zihintpause,
134 zihpm,
88135 zk,
89136 zkn,
90137 zknd,
......@@ -101,6 +148,7 @@ pub const Feature = enum {
101148 zve64d,
102149 zve64f,
103150 zve64x,
151 zvfh,
104152 zvl1024b,
105153 zvl128b,
106154 zvl16384b,
......@@ -151,34 +199,53 @@ pub const all_features = blk: {
151199 .f,
152200 }),
153201 };
202 result[@intFromEnum(Feature.dlen_factor_2)] = .{
203 .llvm_name = "dlen-factor-2",
204 .description = "Vector unit DLEN(data path width) is half of VLEN",
205 .dependencies = featureSet(&[_]Feature{}),
206 };
154207 result[@intFromEnum(Feature.e)] = .{
155208 .llvm_name = "e",
156 .description = "Implements RV32E (provides 16 rather than 32 GPRs)",
209 .description = "Implements RV{32,64}E (provides 16 rather than 32 GPRs)",
157210 .dependencies = featureSet(&[_]Feature{}),
158211 };
159 result[@intFromEnum(Feature.experimental_zawrs)] = .{
160 .llvm_name = "experimental-zawrs",
161 .description = "'Zawrs' (Wait on Reservation Set)",
212 result[@intFromEnum(Feature.experimental_smaia)] = .{
213 .llvm_name = "experimental-smaia",
214 .description = "'Smaia' (Smaia encompasses all added CSRs and all modifications to interrupt response behavior that the AIA specifies for a hart, over all privilege levels.)",
162215 .dependencies = featureSet(&[_]Feature{}),
163216 };
164 result[@intFromEnum(Feature.experimental_zca)] = .{
165 .llvm_name = "experimental-zca",
166 .description = "'Zca' (part of the C extension, excluding compressed floating point loads/stores)",
217 result[@intFromEnum(Feature.experimental_ssaia)] = .{
218 .llvm_name = "experimental-ssaia",
219 .description = "'Ssaia' (Ssaia is essentially the same as Smaia except excluding the machine-level CSRs and behavior not directly visible to supervisor level.)",
167220 .dependencies = featureSet(&[_]Feature{}),
168221 };
169 result[@intFromEnum(Feature.experimental_zcd)] = .{
170 .llvm_name = "experimental-zcd",
171 .description = "'Zcd' (Compressed Double-Precision Floating-Point Instructions)",
222 result[@intFromEnum(Feature.experimental_zacas)] = .{
223 .llvm_name = "experimental-zacas",
224 .description = "'Zacas' (Atomic Compare-And-Swap Instructions)",
172225 .dependencies = featureSet(&[_]Feature{}),
173226 };
174 result[@intFromEnum(Feature.experimental_zcf)] = .{
175 .llvm_name = "experimental-zcf",
176 .description = "'Zcf' (Compressed Single-Precision Floating-Point Instructions)",
227 result[@intFromEnum(Feature.experimental_zfa)] = .{
228 .llvm_name = "experimental-zfa",
229 .description = "'Zfa' (Additional Floating-Point)",
230 .dependencies = featureSet(&[_]Feature{
231 .f,
232 }),
233 };
234 result[@intFromEnum(Feature.experimental_zfbfmin)] = .{
235 .llvm_name = "experimental-zfbfmin",
236 .description = "'Zfbfmin' (Scalar BF16 Converts)",
237 .dependencies = featureSet(&[_]Feature{
238 .f,
239 }),
240 };
241 result[@intFromEnum(Feature.experimental_zicond)] = .{
242 .llvm_name = "experimental-zicond",
243 .description = "'Zicond' (Integer Conditional Operations)",
177244 .dependencies = featureSet(&[_]Feature{}),
178245 };
179246 result[@intFromEnum(Feature.experimental_zihintntl)] = .{
180247 .llvm_name = "experimental-zihintntl",
181 .description = "'zihintntl' (Non-Temporal Locality Hints)",
248 .description = "'Zihintntl' (Non-Temporal Locality Hints)",
182249 .dependencies = featureSet(&[_]Feature{}),
183250 };
184251 result[@intFromEnum(Feature.experimental_ztso)] = .{
......@@ -186,17 +253,103 @@ pub const all_features = blk: {
186253 .description = "'Ztso' (Memory Model - Total Store Order)",
187254 .dependencies = featureSet(&[_]Feature{}),
188255 };
189 result[@intFromEnum(Feature.experimental_zvfh)] = .{
190 .llvm_name = "experimental-zvfh",
191 .description = "'Zvfh' (Vector Half-Precision Floating-Point)",
256 result[@intFromEnum(Feature.experimental_zvbb)] = .{
257 .llvm_name = "experimental-zvbb",
258 .description = "'Zvbb' (Vector Bit-manipulation used in Cryptography)",
259 .dependencies = featureSet(&[_]Feature{}),
260 };
261 result[@intFromEnum(Feature.experimental_zvbc)] = .{
262 .llvm_name = "experimental-zvbc",
263 .description = "'Zvbc' (Vector Carryless Multiplication)",
264 .dependencies = featureSet(&[_]Feature{}),
265 };
266 result[@intFromEnum(Feature.experimental_zvfbfmin)] = .{
267 .llvm_name = "experimental-zvfbfmin",
268 .description = "'Zvbfmin' (Vector BF16 Converts)",
192269 .dependencies = featureSet(&[_]Feature{
193270 .zve32f,
194271 }),
195272 };
273 result[@intFromEnum(Feature.experimental_zvfbfwma)] = .{
274 .llvm_name = "experimental-zvfbfwma",
275 .description = "'Zvfbfwma' (Vector BF16 widening mul-add)",
276 .dependencies = featureSet(&[_]Feature{
277 .zve32f,
278 }),
279 };
280 result[@intFromEnum(Feature.experimental_zvkg)] = .{
281 .llvm_name = "experimental-zvkg",
282 .description = "'Zvkg' (Vector GCM instructions for Cryptography)",
283 .dependencies = featureSet(&[_]Feature{}),
284 };
285 result[@intFromEnum(Feature.experimental_zvkn)] = .{
286 .llvm_name = "experimental-zvkn",
287 .description = "This extension is shorthand for the following set of other extensions: Zvkned, Zvknhb, Zvbb, Zvbc, and Zvkt.",
288 .dependencies = featureSet(&[_]Feature{}),
289 };
290 result[@intFromEnum(Feature.experimental_zvknc)] = .{
291 .llvm_name = "experimental-zvknc",
292 .description = "This extension is shorthand for the following set of other extensions: Zvkn and Zvbc.",
293 .dependencies = featureSet(&[_]Feature{}),
294 };
295 result[@intFromEnum(Feature.experimental_zvkned)] = .{
296 .llvm_name = "experimental-zvkned",
297 .description = "'Zvkned' (Vector AES Encryption & Decryption (Single Round))",
298 .dependencies = featureSet(&[_]Feature{}),
299 };
300 result[@intFromEnum(Feature.experimental_zvkng)] = .{
301 .llvm_name = "experimental-zvkng",
302 .description = "This extension is shorthand for the following set of other extensions: Zvkn and Zvkg.",
303 .dependencies = featureSet(&[_]Feature{}),
304 };
305 result[@intFromEnum(Feature.experimental_zvknha)] = .{
306 .llvm_name = "experimental-zvknha",
307 .description = "'Zvknha' (Vector SHA-2 (SHA-256 only))",
308 .dependencies = featureSet(&[_]Feature{}),
309 };
310 result[@intFromEnum(Feature.experimental_zvknhb)] = .{
311 .llvm_name = "experimental-zvknhb",
312 .description = "'Zvknhb' (Vector SHA-2 (SHA-256 and SHA-512))",
313 .dependencies = featureSet(&[_]Feature{
314 .experimental_zvknha,
315 }),
316 };
317 result[@intFromEnum(Feature.experimental_zvks)] = .{
318 .llvm_name = "experimental-zvks",
319 .description = "This extension is shorthand for the following set of other extensions: Zvksed, Zvksh, Zvbb, Zvbc, and Zvkt.",
320 .dependencies = featureSet(&[_]Feature{}),
321 };
322 result[@intFromEnum(Feature.experimental_zvksc)] = .{
323 .llvm_name = "experimental-zvksc",
324 .description = "This extension is shorthand for the following set of other extensions: Zvks and Zvbc.",
325 .dependencies = featureSet(&[_]Feature{}),
326 };
327 result[@intFromEnum(Feature.experimental_zvksed)] = .{
328 .llvm_name = "experimental-zvksed",
329 .description = "'Zvksed' (SM4 Block Cipher Instructions)",
330 .dependencies = featureSet(&[_]Feature{}),
331 };
332 result[@intFromEnum(Feature.experimental_zvksg)] = .{
333 .llvm_name = "experimental-zvksg",
334 .description = "This extension is shorthand for the following set of other extensions: Zvks and Zvkg.",
335 .dependencies = featureSet(&[_]Feature{}),
336 };
337 result[@intFromEnum(Feature.experimental_zvksh)] = .{
338 .llvm_name = "experimental-zvksh",
339 .description = "'Zvksh' (SM3 Hash Function Instructions)",
340 .dependencies = featureSet(&[_]Feature{}),
341 };
342 result[@intFromEnum(Feature.experimental_zvkt)] = .{
343 .llvm_name = "experimental-zvkt",
344 .description = "'Zvkt' (Vector Data-Independent Execution Latency)",
345 .dependencies = featureSet(&[_]Feature{}),
346 };
196347 result[@intFromEnum(Feature.f)] = .{
197348 .llvm_name = "f",
198349 .description = "'F' (Single-Precision Floating-Point)",
199 .dependencies = featureSet(&[_]Feature{}),
350 .dependencies = featureSet(&[_]Feature{
351 .zicsr,
352 }),
200353 };
201354 result[@intFromEnum(Feature.forced_atomics)] = .{
202355 .llvm_name = "forced-atomics",
......@@ -398,6 +551,11 @@ pub const all_features = blk: {
398551 .description = "Enable save/restore.",
399552 .dependencies = featureSet(&[_]Feature{}),
400553 };
554 result[@intFromEnum(Feature.seq_cst_trailing_fence)] = .{
555 .llvm_name = "seq-cst-trailing-fence",
556 .description = "Enable trailing fence for seq-cst store.",
557 .dependencies = featureSet(&[_]Feature{}),
558 };
401559 result[@intFromEnum(Feature.short_forward_branch_opt)] = .{
402560 .llvm_name = "short-forward-branch-opt",
403561 .description = "Enable short forward branch optimization",
......@@ -428,15 +586,93 @@ pub const all_features = blk: {
428586 .description = "Has reasonably performant unaligned scalar loads and stores",
429587 .dependencies = featureSet(&[_]Feature{}),
430588 };
589 result[@intFromEnum(Feature.unaligned_vector_mem)] = .{
590 .llvm_name = "unaligned-vector-mem",
591 .description = "Has reasonably performant unaligned vector loads and stores",
592 .dependencies = featureSet(&[_]Feature{}),
593 };
431594 result[@intFromEnum(Feature.v)] = .{
432595 .llvm_name = "v",
433596 .description = "'V' (Vector Extension for Application Processors)",
434597 .dependencies = featureSet(&[_]Feature{
435 .d,
436598 .zve64d,
437599 .zvl128b,
438600 }),
439601 };
602 result[@intFromEnum(Feature.xcvbitmanip)] = .{
603 .llvm_name = "xcvbitmanip",
604 .description = "'XCVbitmanip' (CORE-V Bit Manipulation)",
605 .dependencies = featureSet(&[_]Feature{}),
606 };
607 result[@intFromEnum(Feature.xcvmac)] = .{
608 .llvm_name = "xcvmac",
609 .description = "'XCVmac' (CORE-V Multiply-Accumulate)",
610 .dependencies = featureSet(&[_]Feature{}),
611 };
612 result[@intFromEnum(Feature.xsfcie)] = .{
613 .llvm_name = "xsfcie",
614 .description = "'XSfcie' (SiFive Custom Instruction Extension SCIE.)",
615 .dependencies = featureSet(&[_]Feature{}),
616 };
617 result[@intFromEnum(Feature.xsfvcp)] = .{
618 .llvm_name = "xsfvcp",
619 .description = "'XSfvcp' (SiFive Custom Vector Coprocessor Interface Instructions)",
620 .dependencies = featureSet(&[_]Feature{
621 .zve32x,
622 }),
623 };
624 result[@intFromEnum(Feature.xtheadba)] = .{
625 .llvm_name = "xtheadba",
626 .description = "'xtheadba' (T-Head address calculation instructions)",
627 .dependencies = featureSet(&[_]Feature{}),
628 };
629 result[@intFromEnum(Feature.xtheadbb)] = .{
630 .llvm_name = "xtheadbb",
631 .description = "'xtheadbb' (T-Head basic bit-manipulation instructions)",
632 .dependencies = featureSet(&[_]Feature{}),
633 };
634 result[@intFromEnum(Feature.xtheadbs)] = .{
635 .llvm_name = "xtheadbs",
636 .description = "'xtheadbs' (T-Head single-bit instructions)",
637 .dependencies = featureSet(&[_]Feature{}),
638 };
639 result[@intFromEnum(Feature.xtheadcmo)] = .{
640 .llvm_name = "xtheadcmo",
641 .description = "'xtheadcmo' (T-Head cache management instructions)",
642 .dependencies = featureSet(&[_]Feature{}),
643 };
644 result[@intFromEnum(Feature.xtheadcondmov)] = .{
645 .llvm_name = "xtheadcondmov",
646 .description = "'xtheadcondmov' (T-Head conditional move instructions)",
647 .dependencies = featureSet(&[_]Feature{}),
648 };
649 result[@intFromEnum(Feature.xtheadfmemidx)] = .{
650 .llvm_name = "xtheadfmemidx",
651 .description = "'xtheadfmemidx' (T-Head FP Indexed Memory Operations)",
652 .dependencies = featureSet(&[_]Feature{
653 .f,
654 }),
655 };
656 result[@intFromEnum(Feature.xtheadmac)] = .{
657 .llvm_name = "xtheadmac",
658 .description = "'xtheadmac' (T-Head Multiply-Accumulate Instructions)",
659 .dependencies = featureSet(&[_]Feature{}),
660 };
661 result[@intFromEnum(Feature.xtheadmemidx)] = .{
662 .llvm_name = "xtheadmemidx",
663 .description = "'xtheadmemidx' (T-Head Indexed Memory Operations)",
664 .dependencies = featureSet(&[_]Feature{}),
665 };
666 result[@intFromEnum(Feature.xtheadmempair)] = .{
667 .llvm_name = "xtheadmempair",
668 .description = "'xtheadmempair' (T-Head two-GPR Memory Operations)",
669 .dependencies = featureSet(&[_]Feature{}),
670 };
671 result[@intFromEnum(Feature.xtheadsync)] = .{
672 .llvm_name = "xtheadsync",
673 .description = "'xtheadsync' (T-Head multicore synchronization instructions)",
674 .dependencies = featureSet(&[_]Feature{}),
675 };
440676 result[@intFromEnum(Feature.xtheadvdot)] = .{
441677 .llvm_name = "xtheadvdot",
442678 .description = "'xtheadvdot' (T-Head Vector Extensions for Dot)",
......@@ -449,6 +685,11 @@ pub const all_features = blk: {
449685 .description = "'XVentanaCondOps' (Ventana Conditional Ops)",
450686 .dependencies = featureSet(&[_]Feature{}),
451687 };
688 result[@intFromEnum(Feature.zawrs)] = .{
689 .llvm_name = "zawrs",
690 .description = "'Zawrs' (Wait on Reservation Set)",
691 .dependencies = featureSet(&[_]Feature{}),
692 };
452693 result[@intFromEnum(Feature.zba)] = .{
453694 .llvm_name = "zba",
454695 .description = "'Zba' (Address Generation Instructions)",
......@@ -484,6 +725,56 @@ pub const all_features = blk: {
484725 .description = "'Zbs' (Single-Bit Instructions)",
485726 .dependencies = featureSet(&[_]Feature{}),
486727 };
728 result[@intFromEnum(Feature.zca)] = .{
729 .llvm_name = "zca",
730 .description = "'Zca' (part of the C extension, excluding compressed floating point loads/stores)",
731 .dependencies = featureSet(&[_]Feature{}),
732 };
733 result[@intFromEnum(Feature.zcb)] = .{
734 .llvm_name = "zcb",
735 .description = "'Zcb' (Compressed basic bit manipulation instructions)",
736 .dependencies = featureSet(&[_]Feature{
737 .zca,
738 }),
739 };
740 result[@intFromEnum(Feature.zcd)] = .{
741 .llvm_name = "zcd",
742 .description = "'Zcd' (Compressed Double-Precision Floating-Point Instructions)",
743 .dependencies = featureSet(&[_]Feature{
744 .zca,
745 }),
746 };
747 result[@intFromEnum(Feature.zce)] = .{
748 .llvm_name = "zce",
749 .description = "'Zce' (Compressed extensions for microcontrollers)",
750 .dependencies = featureSet(&[_]Feature{
751 .zcb,
752 .zcmp,
753 .zcmt,
754 }),
755 };
756 result[@intFromEnum(Feature.zcf)] = .{
757 .llvm_name = "zcf",
758 .description = "'Zcf' (Compressed Single-Precision Floating-Point Instructions)",
759 .dependencies = featureSet(&[_]Feature{
760 .zca,
761 }),
762 };
763 result[@intFromEnum(Feature.zcmp)] = .{
764 .llvm_name = "zcmp",
765 .description = "'Zcmp' (sequenced instuctions for code-size reduction)",
766 .dependencies = featureSet(&[_]Feature{
767 .zca,
768 }),
769 };
770 result[@intFromEnum(Feature.zcmt)] = .{
771 .llvm_name = "zcmt",
772 .description = "'Zcmt' (table jump instuctions for code-size reduction)",
773 .dependencies = featureSet(&[_]Feature{
774 .zca,
775 .zicsr,
776 }),
777 };
487778 result[@intFromEnum(Feature.zdinx)] = .{
488779 .llvm_name = "zdinx",
489780 .description = "'Zdinx' (Double in Integer)",
......@@ -508,7 +799,9 @@ pub const all_features = blk: {
508799 result[@intFromEnum(Feature.zfinx)] = .{
509800 .llvm_name = "zfinx",
510801 .description = "'Zfinx' (Float in Integer)",
511 .dependencies = featureSet(&[_]Feature{}),
802 .dependencies = featureSet(&[_]Feature{
803 .zicsr,
804 }),
512805 };
513806 result[@intFromEnum(Feature.zhinx)] = .{
514807 .llvm_name = "zhinx",
......@@ -539,11 +832,35 @@ pub const all_features = blk: {
539832 .description = "'Zicboz' (Cache-Block Zero Instructions)",
540833 .dependencies = featureSet(&[_]Feature{}),
541834 };
835 result[@intFromEnum(Feature.zicntr)] = .{
836 .llvm_name = "zicntr",
837 .description = "'Zicntr' (Base Counters and Timers)",
838 .dependencies = featureSet(&[_]Feature{
839 .zicsr,
840 }),
841 };
842 result[@intFromEnum(Feature.zicsr)] = .{
843 .llvm_name = "zicsr",
844 .description = "'zicsr' (CSRs)",
845 .dependencies = featureSet(&[_]Feature{}),
846 };
847 result[@intFromEnum(Feature.zifencei)] = .{
848 .llvm_name = "zifencei",
849 .description = "'Zifencei' (fence.i)",
850 .dependencies = featureSet(&[_]Feature{}),
851 };
542852 result[@intFromEnum(Feature.zihintpause)] = .{
543853 .llvm_name = "zihintpause",
544 .description = "'zihintpause' (Pause Hint)",
854 .description = "'Zihintpause' (Pause Hint)",
545855 .dependencies = featureSet(&[_]Feature{}),
546856 };
857 result[@intFromEnum(Feature.zihpm)] = .{
858 .llvm_name = "zihpm",
859 .description = "'Zihpm' (Hardware Performance Counters)",
860 .dependencies = featureSet(&[_]Feature{
861 .zicsr,
862 }),
863 };
547864 result[@intFromEnum(Feature.zk)] = .{
548865 .llvm_name = "zk",
549866 .description = "'Zk' (Standard scalar cryptography extension)",
......@@ -620,6 +937,7 @@ pub const all_features = blk: {
620937 .llvm_name = "zve32f",
621938 .description = "'Zve32f' (Vector Extensions for Embedded Processors with maximal 32 EEW and F extension)",
622939 .dependencies = featureSet(&[_]Feature{
940 .f,
623941 .zve32x,
624942 }),
625943 };
......@@ -627,6 +945,7 @@ pub const all_features = blk: {
627945 .llvm_name = "zve32x",
628946 .description = "'Zve32x' (Vector Extensions for Embedded Processors with maximal 32 EEW)",
629947 .dependencies = featureSet(&[_]Feature{
948 .zicsr,
630949 .zvl32b,
631950 }),
632951 };
......@@ -634,6 +953,7 @@ pub const all_features = blk: {
634953 .llvm_name = "zve64d",
635954 .description = "'Zve64d' (Vector Extensions for Embedded Processors with maximal 64 EEW, F and D extension)",
636955 .dependencies = featureSet(&[_]Feature{
956 .d,
637957 .zve64f,
638958 }),
639959 };
......@@ -653,6 +973,14 @@ pub const all_features = blk: {
653973 .zvl64b,
654974 }),
655975 };
976 result[@intFromEnum(Feature.zvfh)] = .{
977 .llvm_name = "zvfh",
978 .description = "'Zvfh' (Vector Half-Precision Floating-Point)",
979 .dependencies = featureSet(&[_]Feature{
980 .zfhmin,
981 .zve32f,
982 }),
983 };
656984 result[@intFromEnum(Feature.zvl1024b)] = .{
657985 .llvm_name = "zvl1024b",
658986 .description = "'Zvl' (Minimum Vector Length) 1024",
......@@ -795,6 +1123,8 @@ pub const cpu = struct {
7951123 .llvm_name = "rocket-rv32",
7961124 .features = featureSet(&[_]Feature{
7971125 .@"32bit",
1126 .zicsr,
1127 .zifencei,
7981128 }),
7991129 };
8001130 pub const rocket_rv64 = CpuModel{
......@@ -802,6 +1132,8 @@ pub const cpu = struct {
8021132 .llvm_name = "rocket-rv64",
8031133 .features = featureSet(&[_]Feature{
8041134 .@"64bit",
1135 .zicsr,
1136 .zifencei,
8051137 }),
8061138 };
8071139 pub const sifive_7_series = CpuModel{
......@@ -819,6 +1151,8 @@ pub const cpu = struct {
8191151 .@"32bit",
8201152 .c,
8211153 .m,
1154 .zicsr,
1155 .zifencei,
8221156 }),
8231157 };
8241158 pub const sifive_e21 = CpuModel{
......@@ -829,6 +1163,8 @@ pub const cpu = struct {
8291163 .a,
8301164 .c,
8311165 .m,
1166 .zicsr,
1167 .zifencei,
8321168 }),
8331169 };
8341170 pub const sifive_e24 = CpuModel{
......@@ -840,6 +1176,7 @@ pub const cpu = struct {
8401176 .c,
8411177 .f,
8421178 .m,
1179 .zifencei,
8431180 }),
8441181 };
8451182 pub const sifive_e31 = CpuModel{
......@@ -850,6 +1187,8 @@ pub const cpu = struct {
8501187 .a,
8511188 .c,
8521189 .m,
1190 .zicsr,
1191 .zifencei,
8531192 }),
8541193 };
8551194 pub const sifive_e34 = CpuModel{
......@@ -861,6 +1200,7 @@ pub const cpu = struct {
8611200 .c,
8621201 .f,
8631202 .m,
1203 .zifencei,
8641204 }),
8651205 };
8661206 pub const sifive_e76 = CpuModel{
......@@ -874,6 +1214,7 @@ pub const cpu = struct {
8741214 .m,
8751215 .no_default_unroll,
8761216 .short_forward_branch_opt,
1217 .zifencei,
8771218 }),
8781219 };
8791220 pub const sifive_s21 = CpuModel{
......@@ -884,6 +1225,8 @@ pub const cpu = struct {
8841225 .a,
8851226 .c,
8861227 .m,
1228 .zicsr,
1229 .zifencei,
8871230 }),
8881231 };
8891232 pub const sifive_s51 = CpuModel{
......@@ -894,6 +1237,8 @@ pub const cpu = struct {
8941237 .a,
8951238 .c,
8961239 .m,
1240 .zicsr,
1241 .zifencei,
8971242 }),
8981243 };
8991244 pub const sifive_s54 = CpuModel{
......@@ -905,6 +1250,7 @@ pub const cpu = struct {
9051250 .c,
9061251 .d,
9071252 .m,
1253 .zifencei,
9081254 }),
9091255 };
9101256 pub const sifive_s76 = CpuModel{
......@@ -918,6 +1264,9 @@ pub const cpu = struct {
9181264 .m,
9191265 .no_default_unroll,
9201266 .short_forward_branch_opt,
1267 .xsfcie,
1268 .zifencei,
1269 .zihintpause,
9211270 }),
9221271 };
9231272 pub const sifive_u54 = CpuModel{
......@@ -929,6 +1278,7 @@ pub const cpu = struct {
9291278 .c,
9301279 .d,
9311280 .m,
1281 .zifencei,
9321282 }),
9331283 };
9341284 pub const sifive_u74 = CpuModel{
......@@ -942,6 +1292,27 @@ pub const cpu = struct {
9421292 .m,
9431293 .no_default_unroll,
9441294 .short_forward_branch_opt,
1295 .zifencei,
1296 }),
1297 };
1298 pub const sifive_x280 = CpuModel{
1299 .name = "sifive_x280",
1300 .llvm_name = "sifive-x280",
1301 .features = featureSet(&[_]Feature{
1302 .@"64bit",
1303 .a,
1304 .c,
1305 .dlen_factor_2,
1306 .m,
1307 .no_default_unroll,
1308 .short_forward_branch_opt,
1309 .v,
1310 .zba,
1311 .zbb,
1312 .zfh,
1313 .zifencei,
1314 .zvfh,
1315 .zvl512b,
9451316 }),
9461317 };
9471318 pub const syntacore_scr1_base = CpuModel{
......@@ -951,6 +1322,8 @@ pub const cpu = struct {
9511322 .@"32bit",
9521323 .c,
9531324 .no_default_unroll,
1325 .zicsr,
1326 .zifencei,
9541327 }),
9551328 };
9561329 pub const syntacore_scr1_max = CpuModel{
......@@ -961,6 +1334,8 @@ pub const cpu = struct {
9611334 .c,
9621335 .m,
9631336 .no_default_unroll,
1337 .zicsr,
1338 .zifencei,
9641339 }),
9651340 };
9661341};
lib/std/target/x86.zig+299-170
......@@ -14,6 +14,7 @@ pub const Feature = enum {
1414 aes,
1515 allow_light_256_bit,
1616 amx_bf16,
17 amx_complex,
1718 amx_fp16,
1819 amx_int8,
1920 amx_tile,
......@@ -38,6 +39,7 @@ pub const Feature = enum {
3839 avxifma,
3940 avxneconvert,
4041 avxvnni,
42 avxvnniint16,
4143 avxvnniint8,
4244 bmi,
4345 bmi2,
......@@ -76,6 +78,7 @@ pub const Feature = enum {
7678 fast_variable_perlane_shuffle,
7779 fast_vector_fsqrt,
7880 fast_vector_shift_masks,
81 faster_shift_than_shuffle,
7982 fma,
8083 fma4,
8184 fsgsbase,
......@@ -101,6 +104,10 @@ pub const Feature = enum {
101104 movdir64b,
102105 movdiri,
103106 mwaitx,
107 no_bypass_delay,
108 no_bypass_delay_blend,
109 no_bypass_delay_mov,
110 no_bypass_delay_shuffle,
104111 nopl,
105112 pad_short_functions,
106113 pclmul,
......@@ -110,6 +117,7 @@ pub const Feature = enum {
110117 prefer_128_bit,
111118 prefer_256_bit,
112119 prefer_mask_registers,
120 prefer_movmsk_over_vtest,
113121 prefetchi,
114122 prefetchwt1,
115123 prfchw,
......@@ -130,6 +138,7 @@ pub const Feature = enum {
130138 seses,
131139 sgx,
132140 sha,
141 sha512,
133142 shstk,
134143 slow_3ops_lea,
135144 slow_incdec,
......@@ -140,6 +149,8 @@ pub const Feature = enum {
140149 slow_two_mem_ops,
141150 slow_unaligned_mem_16,
142151 slow_unaligned_mem_32,
152 sm3,
153 sm4,
143154 soft_float,
144155 sse,
145156 sse2,
......@@ -152,6 +163,7 @@ pub const Feature = enum {
152163 tagged_globals,
153164 tbm,
154165 tsxldtrk,
166 tuning_fast_imm_vector_shift,
155167 uintr,
156168 use_glm_div_sqrt_costs,
157169 use_slm_arith_costs,
......@@ -231,6 +243,13 @@ pub const all_features = blk: {
231243 .amx_tile,
232244 }),
233245 };
246 result[@intFromEnum(Feature.amx_complex)] = .{
247 .llvm_name = "amx-complex",
248 .description = "Support AMX-COMPLEX instructions",
249 .dependencies = featureSet(&[_]Feature{
250 .amx_tile,
251 }),
252 };
234253 result[@intFromEnum(Feature.amx_fp16)] = .{
235254 .llvm_name = "amx-fp16",
236255 .description = "Support AMX amx-fp16 instructions",
......@@ -326,7 +345,7 @@ pub const all_features = blk: {
326345 };
327346 result[@intFromEnum(Feature.avx512ifma)] = .{
328347 .llvm_name = "avx512ifma",
329 .description = "Enable AVX-512 Integer Fused Multiply-Add",
348 .description = "Enable AVX-512 Integer Fused Multiple-Add",
330349 .dependencies = featureSet(&[_]Feature{
331350 .avx512f,
332351 }),
......@@ -401,6 +420,13 @@ pub const all_features = blk: {
401420 .avx2,
402421 }),
403422 };
423 result[@intFromEnum(Feature.avxvnniint16)] = .{
424 .llvm_name = "avxvnniint16",
425 .description = "Enable AVX-VNNI-INT16",
426 .dependencies = featureSet(&[_]Feature{
427 .avx2,
428 }),
429 };
404430 result[@intFromEnum(Feature.avxvnniint8)] = .{
405431 .llvm_name = "avxvnniint8",
406432 .description = "Enable AVX-VNNI-INT8",
......@@ -597,16 +623,21 @@ pub const all_features = blk: {
597623 .description = "Prefer a left/right vector logical shift pair over a shift+and pair",
598624 .dependencies = featureSet(&[_]Feature{}),
599625 };
626 result[@intFromEnum(Feature.faster_shift_than_shuffle)] = .{
627 .llvm_name = "faster-shift-than-shuffle",
628 .description = "Shifts are faster (or as fast) as shuffle",
629 .dependencies = featureSet(&[_]Feature{}),
630 };
600631 result[@intFromEnum(Feature.fma)] = .{
601632 .llvm_name = "fma",
602 .description = "Enable three-operand fused multiply-add",
633 .description = "Enable three-operand fused multiple-add",
603634 .dependencies = featureSet(&[_]Feature{
604635 .avx,
605636 }),
606637 };
607638 result[@intFromEnum(Feature.fma4)] = .{
608639 .llvm_name = "fma4",
609 .description = "Enable four-operand fused multiply-add",
640 .description = "Enable four-operand fused multiple-add",
610641 .dependencies = featureSet(&[_]Feature{
611642 .avx,
612643 .sse4a,
......@@ -731,6 +762,26 @@ pub const all_features = blk: {
731762 .description = "Enable MONITORX/MWAITX timer functionality",
732763 .dependencies = featureSet(&[_]Feature{}),
733764 };
765 result[@intFromEnum(Feature.no_bypass_delay)] = .{
766 .llvm_name = "no-bypass-delay",
767 .description = "Has no bypass delay when using the 'wrong' domain",
768 .dependencies = featureSet(&[_]Feature{}),
769 };
770 result[@intFromEnum(Feature.no_bypass_delay_blend)] = .{
771 .llvm_name = "no-bypass-delay-blend",
772 .description = "Has no bypass delay when using the 'wrong' blend type",
773 .dependencies = featureSet(&[_]Feature{}),
774 };
775 result[@intFromEnum(Feature.no_bypass_delay_mov)] = .{
776 .llvm_name = "no-bypass-delay-mov",
777 .description = "Has no bypass delay when using the 'wrong' mov type",
778 .dependencies = featureSet(&[_]Feature{}),
779 };
780 result[@intFromEnum(Feature.no_bypass_delay_shuffle)] = .{
781 .llvm_name = "no-bypass-delay-shuffle",
782 .description = "Has no bypass delay when using the 'wrong' shuffle type",
783 .dependencies = featureSet(&[_]Feature{}),
784 };
734785 result[@intFromEnum(Feature.nopl)] = .{
735786 .llvm_name = "nopl",
736787 .description = "Enable NOPL instruction (generally pentium pro+)",
......@@ -778,6 +829,11 @@ pub const all_features = blk: {
778829 .description = "Prefer AVX512 mask registers over PTEST/MOVMSK",
779830 .dependencies = featureSet(&[_]Feature{}),
780831 };
832 result[@intFromEnum(Feature.prefer_movmsk_over_vtest)] = .{
833 .llvm_name = "prefer-movmsk-over-vtest",
834 .description = "Prefer movmsk over vtest instruction",
835 .dependencies = featureSet(&[_]Feature{}),
836 };
781837 result[@intFromEnum(Feature.prefetchi)] = .{
782838 .llvm_name = "prefetchi",
783839 .description = "Prefetch instruction with T0 or T1 Hint",
......@@ -887,6 +943,13 @@ pub const all_features = blk: {
887943 .sse2,
888944 }),
889945 };
946 result[@intFromEnum(Feature.sha512)] = .{
947 .llvm_name = "sha512",
948 .description = "Support SHA512 instructions",
949 .dependencies = featureSet(&[_]Feature{
950 .avx,
951 }),
952 };
890953 result[@intFromEnum(Feature.shstk)] = .{
891954 .llvm_name = "shstk",
892955 .description = "Support CET Shadow-Stack instructions",
......@@ -937,6 +1000,20 @@ pub const all_features = blk: {
9371000 .description = "Slow unaligned 32-byte memory access",
9381001 .dependencies = featureSet(&[_]Feature{}),
9391002 };
1003 result[@intFromEnum(Feature.sm3)] = .{
1004 .llvm_name = "sm3",
1005 .description = "Support SM3 instructions",
1006 .dependencies = featureSet(&[_]Feature{
1007 .avx,
1008 }),
1009 };
1010 result[@intFromEnum(Feature.sm4)] = .{
1011 .llvm_name = "sm4",
1012 .description = "Support SM4 instructions",
1013 .dependencies = featureSet(&[_]Feature{
1014 .avx,
1015 }),
1016 };
9401017 result[@intFromEnum(Feature.soft_float)] = .{
9411018 .llvm_name = "soft-float",
9421019 .description = "Use software floating point features",
......@@ -1009,6 +1086,11 @@ pub const all_features = blk: {
10091086 .description = "Support TSXLDTRK instructions",
10101087 .dependencies = featureSet(&[_]Feature{}),
10111088 };
1089 result[@intFromEnum(Feature.tuning_fast_imm_vector_shift)] = .{
1090 .llvm_name = "tuning-fast-imm-vector-shift",
1091 .description = "Vector shifts are fast (2/cycle) as opposed to slow (1/cycle)",
1092 .dependencies = featureSet(&[_]Feature{}),
1093 };
10121094 result[@intFromEnum(Feature.uintr)] = .{
10131095 .llvm_name = "uintr",
10141096 .description = "Has UINTR Instructions",
......@@ -1148,10 +1230,14 @@ pub const cpu = struct {
11481230 .movbe,
11491231 .movdir64b,
11501232 .movdiri,
1233 .no_bypass_delay_blend,
1234 .no_bypass_delay_mov,
1235 .no_bypass_delay_shuffle,
11511236 .nopl,
11521237 .pconfig,
11531238 .pku,
11541239 .popcnt,
1240 .prefer_movmsk_over_vtest,
11551241 .prfchw,
11561242 .ptwrite,
11571243 .rdpid,
......@@ -1162,6 +1248,7 @@ pub const cpu = struct {
11621248 .sha,
11631249 .shstk,
11641250 .slow_3ops_lea,
1251 .tuning_fast_imm_vector_shift,
11651252 .vaes,
11661253 .vpclmulqdq,
11671254 .vzeroupper,
......@@ -1342,6 +1429,7 @@ pub const cpu = struct {
13421429 .lea_uses_ag,
13431430 .mmx,
13441431 .movbe,
1432 .no_bypass_delay,
13451433 .nopl,
13461434 .pad_short_functions,
13471435 .sahf,
......@@ -1352,6 +1440,46 @@ pub const cpu = struct {
13521440 .x87,
13531441 }),
13541442 };
1443 pub const atom_sse4_2_movbe = CpuModel{
1444 .name = "atom_sse4_2_movbe",
1445 .llvm_name = "atom_sse4_2_movbe",
1446 .features = featureSet(&[_]Feature{
1447 .@"64bit",
1448 .aes,
1449 .clflushopt,
1450 .cmov,
1451 .crc32,
1452 .cx16,
1453 .false_deps_popcnt,
1454 .fast_7bytenop,
1455 .fast_movbe,
1456 .fsgsbase,
1457 .fxsr,
1458 .idivq_to_divl,
1459 .mmx,
1460 .movbe,
1461 .no_bypass_delay,
1462 .nopl,
1463 .pclmul,
1464 .popcnt,
1465 .prfchw,
1466 .rdrnd,
1467 .rdseed,
1468 .sahf,
1469 .sha,
1470 .slow_incdec,
1471 .slow_lea,
1472 .slow_pmulld,
1473 .slow_two_mem_ops,
1474 .sse4_2,
1475 .use_slm_arith_costs,
1476 .vzeroupper,
1477 .x87,
1478 .xsavec,
1479 .xsaveopt,
1480 .xsaves,
1481 }),
1482 };
13551483 pub const barcelona = CpuModel{
13561484 .name = "barcelona",
13571485 .llvm_name = "barcelona",
......@@ -1529,6 +1657,7 @@ pub const cpu = struct {
15291657 .lea_uses_ag,
15301658 .mmx,
15311659 .movbe,
1660 .no_bypass_delay,
15321661 .nopl,
15331662 .pad_short_functions,
15341663 .sahf,
......@@ -1570,6 +1699,8 @@ pub const cpu = struct {
15701699 .macrofusion,
15711700 .mmx,
15721701 .movbe,
1702 .no_bypass_delay_mov,
1703 .no_bypass_delay_shuffle,
15731704 .nopl,
15741705 .pclmul,
15751706 .popcnt,
......@@ -1701,6 +1832,9 @@ pub const cpu = struct {
17011832 .macrofusion,
17021833 .mmx,
17031834 .movbe,
1835 .no_bypass_delay_blend,
1836 .no_bypass_delay_mov,
1837 .no_bypass_delay_shuffle,
17041838 .nopl,
17051839 .pclmul,
17061840 .pku,
......@@ -1712,6 +1846,7 @@ pub const cpu = struct {
17121846 .sahf,
17131847 .sha,
17141848 .slow_3ops_lea,
1849 .tuning_fast_imm_vector_shift,
17151850 .vzeroupper,
17161851 .x87,
17171852 .xsavec,
......@@ -1748,6 +1883,7 @@ pub const cpu = struct {
17481883 .fast_variable_crosslane_shuffle,
17491884 .fast_variable_perlane_shuffle,
17501885 .fast_vector_fsqrt,
1886 .faster_shift_than_shuffle,
17511887 .fsgsbase,
17521888 .fxsr,
17531889 .idivq_to_divl,
......@@ -1756,6 +1892,9 @@ pub const cpu = struct {
17561892 .macrofusion,
17571893 .mmx,
17581894 .movbe,
1895 .no_bypass_delay_blend,
1896 .no_bypass_delay_mov,
1897 .no_bypass_delay_shuffle,
17591898 .nopl,
17601899 .pclmul,
17611900 .pku,
......@@ -1766,6 +1905,7 @@ pub const cpu = struct {
17661905 .rdseed,
17671906 .sahf,
17681907 .slow_3ops_lea,
1908 .tuning_fast_imm_vector_shift,
17691909 .vzeroupper,
17701910 .x87,
17711911 .xsavec,
......@@ -1802,6 +1942,7 @@ pub const cpu = struct {
18021942 .fast_variable_crosslane_shuffle,
18031943 .fast_variable_perlane_shuffle,
18041944 .fast_vector_fsqrt,
1945 .faster_shift_than_shuffle,
18051946 .fsgsbase,
18061947 .fxsr,
18071948 .idivq_to_divl,
......@@ -1810,6 +1951,9 @@ pub const cpu = struct {
18101951 .macrofusion,
18111952 .mmx,
18121953 .movbe,
1954 .no_bypass_delay_blend,
1955 .no_bypass_delay_mov,
1956 .no_bypass_delay_shuffle,
18131957 .nopl,
18141958 .pclmul,
18151959 .pku,
......@@ -1820,6 +1964,7 @@ pub const cpu = struct {
18201964 .rdseed,
18211965 .sahf,
18221966 .slow_3ops_lea,
1967 .tuning_fast_imm_vector_shift,
18231968 .vzeroupper,
18241969 .x87,
18251970 .xsavec,
......@@ -1845,77 +1990,6 @@ pub const cpu = struct {
18451990 .x87,
18461991 }),
18471992 };
1848 pub const core_avx2 = CpuModel{
1849 .name = "core_avx2",
1850 .llvm_name = "core-avx2",
1851 .features = featureSet(&[_]Feature{
1852 .@"64bit",
1853 .allow_light_256_bit,
1854 .avx2,
1855 .bmi,
1856 .bmi2,
1857 .cmov,
1858 .crc32,
1859 .cx16,
1860 .ermsb,
1861 .f16c,
1862 .false_deps_lzcnt_tzcnt,
1863 .false_deps_popcnt,
1864 .fast_15bytenop,
1865 .fast_scalar_fsqrt,
1866 .fast_shld_rotate,
1867 .fast_variable_crosslane_shuffle,
1868 .fast_variable_perlane_shuffle,
1869 .fma,
1870 .fsgsbase,
1871 .fxsr,
1872 .idivq_to_divl,
1873 .invpcid,
1874 .lzcnt,
1875 .macrofusion,
1876 .mmx,
1877 .movbe,
1878 .nopl,
1879 .pclmul,
1880 .popcnt,
1881 .rdrnd,
1882 .sahf,
1883 .slow_3ops_lea,
1884 .vzeroupper,
1885 .x87,
1886 .xsaveopt,
1887 }),
1888 };
1889 pub const core_avx_i = CpuModel{
1890 .name = "core_avx_i",
1891 .llvm_name = "core-avx-i",
1892 .features = featureSet(&[_]Feature{
1893 .@"64bit",
1894 .cmov,
1895 .crc32,
1896 .cx16,
1897 .f16c,
1898 .false_deps_popcnt,
1899 .fast_15bytenop,
1900 .fast_scalar_fsqrt,
1901 .fast_shld_rotate,
1902 .fsgsbase,
1903 .fxsr,
1904 .idivq_to_divl,
1905 .macrofusion,
1906 .mmx,
1907 .nopl,
1908 .pclmul,
1909 .popcnt,
1910 .rdrnd,
1911 .sahf,
1912 .slow_3ops_lea,
1913 .slow_unaligned_mem_32,
1914 .vzeroupper,
1915 .x87,
1916 .xsaveopt,
1917 }),
1918 };
19191993 pub const corei7 = CpuModel{
19201994 .name = "corei7",
19211995 .llvm_name = "corei7",
......@@ -1927,6 +2001,7 @@ pub const cpu = struct {
19272001 .fxsr,
19282002 .macrofusion,
19292003 .mmx,
2004 .no_bypass_delay_mov,
19302005 .nopl,
19312006 .popcnt,
19322007 .sahf,
......@@ -1935,34 +2010,6 @@ pub const cpu = struct {
19352010 .x87,
19362011 }),
19372012 };
1938 pub const corei7_avx = CpuModel{
1939 .name = "corei7_avx",
1940 .llvm_name = "corei7-avx",
1941 .features = featureSet(&[_]Feature{
1942 .@"64bit",
1943 .avx,
1944 .cmov,
1945 .crc32,
1946 .cx16,
1947 .false_deps_popcnt,
1948 .fast_15bytenop,
1949 .fast_scalar_fsqrt,
1950 .fast_shld_rotate,
1951 .fxsr,
1952 .idivq_to_divl,
1953 .macrofusion,
1954 .mmx,
1955 .nopl,
1956 .pclmul,
1957 .popcnt,
1958 .sahf,
1959 .slow_3ops_lea,
1960 .slow_unaligned_mem_32,
1961 .vzeroupper,
1962 .x87,
1963 .xsaveopt,
1964 }),
1965 };
19662013 pub const emeraldrapids = CpuModel{
19672014 .name = "emeraldrapids",
19682015 .llvm_name = "emeraldrapids",
......@@ -2016,6 +2063,9 @@ pub const cpu = struct {
20162063 .movbe,
20172064 .movdir64b,
20182065 .movdiri,
2066 .no_bypass_delay_blend,
2067 .no_bypass_delay_mov,
2068 .no_bypass_delay_shuffle,
20192069 .nopl,
20202070 .pconfig,
20212071 .pku,
......@@ -2031,6 +2081,7 @@ pub const cpu = struct {
20312081 .sha,
20322082 .shstk,
20332083 .tsxldtrk,
2084 .tuning_fast_imm_vector_shift,
20342085 .uintr,
20352086 .vaes,
20362087 .vpclmulqdq,
......@@ -2085,6 +2136,7 @@ pub const cpu = struct {
20852136 .fxsr,
20862137 .mmx,
20872138 .movbe,
2139 .no_bypass_delay,
20882140 .nopl,
20892141 .pclmul,
20902142 .popcnt,
......@@ -2120,6 +2172,7 @@ pub const cpu = struct {
21202172 .fxsr,
21212173 .mmx,
21222174 .movbe,
2175 .no_bypass_delay,
21232176 .nopl,
21242177 .pclmul,
21252178 .popcnt,
......@@ -2161,6 +2214,7 @@ pub const cpu = struct {
21612214 .cmpccxadd,
21622215 .crc32,
21632216 .cx16,
2217 .enqcmd,
21642218 .f16c,
21652219 .fast_movbe,
21662220 .fma,
......@@ -2174,6 +2228,7 @@ pub const cpu = struct {
21742228 .movbe,
21752229 .movdir64b,
21762230 .movdiri,
2231 .no_bypass_delay,
21772232 .nopl,
21782233 .pconfig,
21792234 .pku,
......@@ -2191,6 +2246,7 @@ pub const cpu = struct {
21912246 .slow_incdec,
21922247 .slow_lea,
21932248 .slow_two_mem_ops,
2249 .uintr,
21942250 .use_glm_div_sqrt_costs,
21952251 .vaes,
21962252 .vpclmulqdq,
......@@ -2257,6 +2313,96 @@ pub const cpu = struct {
22572313 .movbe,
22582314 .movdir64b,
22592315 .movdiri,
2316 .no_bypass_delay_blend,
2317 .no_bypass_delay_mov,
2318 .no_bypass_delay_shuffle,
2319 .nopl,
2320 .pconfig,
2321 .pku,
2322 .popcnt,
2323 .prefer_256_bit,
2324 .prefetchi,
2325 .prfchw,
2326 .ptwrite,
2327 .rdpid,
2328 .rdrnd,
2329 .rdseed,
2330 .sahf,
2331 .serialize,
2332 .sha,
2333 .shstk,
2334 .tsxldtrk,
2335 .tuning_fast_imm_vector_shift,
2336 .uintr,
2337 .vaes,
2338 .vpclmulqdq,
2339 .vzeroupper,
2340 .waitpkg,
2341 .wbnoinvd,
2342 .x87,
2343 .xsavec,
2344 .xsaveopt,
2345 .xsaves,
2346 }),
2347 };
2348 pub const graniterapids_d = CpuModel{
2349 .name = "graniterapids_d",
2350 .llvm_name = "graniterapids-d",
2351 .features = featureSet(&[_]Feature{
2352 .@"64bit",
2353 .adx,
2354 .allow_light_256_bit,
2355 .amx_bf16,
2356 .amx_complex,
2357 .amx_fp16,
2358 .amx_int8,
2359 .avx512bf16,
2360 .avx512bitalg,
2361 .avx512cd,
2362 .avx512fp16,
2363 .avx512ifma,
2364 .avx512vbmi,
2365 .avx512vbmi2,
2366 .avx512vnni,
2367 .avx512vpopcntdq,
2368 .avxvnni,
2369 .bmi,
2370 .bmi2,
2371 .cldemote,
2372 .clflushopt,
2373 .clwb,
2374 .cmov,
2375 .crc32,
2376 .cx16,
2377 .enqcmd,
2378 .ermsb,
2379 .false_deps_getmant,
2380 .false_deps_mulc,
2381 .false_deps_mullq,
2382 .false_deps_perm,
2383 .false_deps_range,
2384 .fast_15bytenop,
2385 .fast_gather,
2386 .fast_scalar_fsqrt,
2387 .fast_shld_rotate,
2388 .fast_variable_crosslane_shuffle,
2389 .fast_variable_perlane_shuffle,
2390 .fast_vector_fsqrt,
2391 .fsgsbase,
2392 .fsrm,
2393 .fxsr,
2394 .gfni,
2395 .idivq_to_divl,
2396 .invpcid,
2397 .lzcnt,
2398 .macrofusion,
2399 .mmx,
2400 .movbe,
2401 .movdir64b,
2402 .movdiri,
2403 .no_bypass_delay_blend,
2404 .no_bypass_delay_mov,
2405 .no_bypass_delay_shuffle,
22602406 .nopl,
22612407 .pconfig,
22622408 .pku,
......@@ -2273,6 +2419,7 @@ pub const cpu = struct {
22732419 .sha,
22742420 .shstk,
22752421 .tsxldtrk,
2422 .tuning_fast_imm_vector_shift,
22762423 .uintr,
22772424 .vaes,
22782425 .vpclmulqdq,
......@@ -2315,6 +2462,8 @@ pub const cpu = struct {
23152462 .macrofusion,
23162463 .mmx,
23172464 .movbe,
2465 .no_bypass_delay_mov,
2466 .no_bypass_delay_shuffle,
23182467 .nopl,
23192468 .pclmul,
23202469 .popcnt,
......@@ -2405,6 +2554,9 @@ pub const cpu = struct {
24052554 .macrofusion,
24062555 .mmx,
24072556 .movbe,
2557 .no_bypass_delay_blend,
2558 .no_bypass_delay_mov,
2559 .no_bypass_delay_shuffle,
24082560 .nopl,
24092561 .pku,
24102562 .popcnt,
......@@ -2415,6 +2567,7 @@ pub const cpu = struct {
24152567 .rdseed,
24162568 .sahf,
24172569 .sha,
2570 .tuning_fast_imm_vector_shift,
24182571 .vaes,
24192572 .vpclmulqdq,
24202573 .vzeroupper,
......@@ -2465,6 +2618,9 @@ pub const cpu = struct {
24652618 .macrofusion,
24662619 .mmx,
24672620 .movbe,
2621 .no_bypass_delay_blend,
2622 .no_bypass_delay_mov,
2623 .no_bypass_delay_shuffle,
24682624 .nopl,
24692625 .pconfig,
24702626 .pku,
......@@ -2476,6 +2632,7 @@ pub const cpu = struct {
24762632 .rdseed,
24772633 .sahf,
24782634 .sha,
2635 .tuning_fast_imm_vector_shift,
24792636 .vaes,
24802637 .vpclmulqdq,
24812638 .vzeroupper,
......@@ -2504,6 +2661,7 @@ pub const cpu = struct {
25042661 .idivq_to_divl,
25052662 .macrofusion,
25062663 .mmx,
2664 .no_bypass_delay_mov,
25072665 .nopl,
25082666 .pclmul,
25092667 .popcnt,
......@@ -2717,10 +2875,14 @@ pub const cpu = struct {
27172875 .movbe,
27182876 .movdir64b,
27192877 .movdiri,
2878 .no_bypass_delay_blend,
2879 .no_bypass_delay_mov,
2880 .no_bypass_delay_shuffle,
27202881 .nopl,
27212882 .pconfig,
27222883 .pku,
27232884 .popcnt,
2885 .prefer_movmsk_over_vtest,
27242886 .prfchw,
27252887 .ptwrite,
27262888 .rdpid,
......@@ -2731,6 +2893,7 @@ pub const cpu = struct {
27312893 .sha,
27322894 .shstk,
27332895 .slow_3ops_lea,
2896 .tuning_fast_imm_vector_shift,
27342897 .vaes,
27352898 .vpclmulqdq,
27362899 .vzeroupper,
......@@ -2753,6 +2916,7 @@ pub const cpu = struct {
27532916 .fxsr,
27542917 .macrofusion,
27552918 .mmx,
2919 .no_bypass_delay_mov,
27562920 .nopl,
27572921 .popcnt,
27582922 .sahf,
......@@ -2902,21 +3066,6 @@ pub const cpu = struct {
29023066 .x87,
29033067 }),
29043068 };
2905 pub const pentium4m = CpuModel{
2906 .name = "pentium4m",
2907 .llvm_name = "pentium4m",
2908 .features = featureSet(&[_]Feature{
2909 .cmov,
2910 .cx8,
2911 .fxsr,
2912 .mmx,
2913 .nopl,
2914 .slow_unaligned_mem_16,
2915 .sse2,
2916 .vzeroupper,
2917 .x87,
2918 }),
2919 };
29203069 pub const pentium_m = CpuModel{
29213070 .name = "pentium_m",
29223071 .llvm_name = "pentium-m",
......@@ -3009,10 +3158,14 @@ pub const cpu = struct {
30093158 .movbe,
30103159 .movdir64b,
30113160 .movdiri,
3161 .no_bypass_delay_blend,
3162 .no_bypass_delay_mov,
3163 .no_bypass_delay_shuffle,
30123164 .nopl,
30133165 .pconfig,
30143166 .pku,
30153167 .popcnt,
3168 .prefer_movmsk_over_vtest,
30163169 .prfchw,
30173170 .ptwrite,
30183171 .rdpid,
......@@ -3023,6 +3176,7 @@ pub const cpu = struct {
30233176 .sha,
30243177 .shstk,
30253178 .slow_3ops_lea,
3179 .tuning_fast_imm_vector_shift,
30263180 .vaes,
30273181 .vpclmulqdq,
30283182 .vzeroupper,
......@@ -3074,6 +3228,9 @@ pub const cpu = struct {
30743228 .macrofusion,
30753229 .mmx,
30763230 .movbe,
3231 .no_bypass_delay_blend,
3232 .no_bypass_delay_mov,
3233 .no_bypass_delay_shuffle,
30773234 .nopl,
30783235 .pku,
30793236 .popcnt,
......@@ -3084,6 +3241,7 @@ pub const cpu = struct {
30843241 .rdseed,
30853242 .sahf,
30863243 .sha,
3244 .tuning_fast_imm_vector_shift,
30873245 .vaes,
30883246 .vpclmulqdq,
30893247 .vzeroupper,
......@@ -3110,6 +3268,7 @@ pub const cpu = struct {
31103268 .idivq_to_divl,
31113269 .macrofusion,
31123270 .mmx,
3271 .no_bypass_delay_mov,
31133272 .nopl,
31143273 .pclmul,
31153274 .popcnt,
......@@ -3174,6 +3333,9 @@ pub const cpu = struct {
31743333 .movbe,
31753334 .movdir64b,
31763335 .movdiri,
3336 .no_bypass_delay_blend,
3337 .no_bypass_delay_mov,
3338 .no_bypass_delay_shuffle,
31773339 .nopl,
31783340 .pconfig,
31793341 .pku,
......@@ -3189,6 +3351,7 @@ pub const cpu = struct {
31893351 .sha,
31903352 .shstk,
31913353 .tsxldtrk,
3354 .tuning_fast_imm_vector_shift,
31923355 .uintr,
31933356 .vaes,
31943357 .vpclmulqdq,
......@@ -3220,6 +3383,7 @@ pub const cpu = struct {
32203383 .cmpccxadd,
32213384 .crc32,
32223385 .cx16,
3386 .enqcmd,
32233387 .f16c,
32243388 .fast_movbe,
32253389 .fma,
......@@ -3233,6 +3397,7 @@ pub const cpu = struct {
32333397 .movbe,
32343398 .movdir64b,
32353399 .movdiri,
3400 .no_bypass_delay,
32363401 .nopl,
32373402 .pconfig,
32383403 .pku,
......@@ -3249,6 +3414,7 @@ pub const cpu = struct {
32493414 .slow_incdec,
32503415 .slow_lea,
32513416 .slow_two_mem_ops,
3417 .uintr,
32523418 .use_glm_div_sqrt_costs,
32533419 .vaes,
32543420 .vpclmulqdq,
......@@ -3276,6 +3442,7 @@ pub const cpu = struct {
32763442 .idivq_to_divl,
32773443 .mmx,
32783444 .movbe,
3445 .no_bypass_delay,
32793446 .nopl,
32803447 .pclmul,
32813448 .popcnt,
......@@ -3320,6 +3487,7 @@ pub const cpu = struct {
33203487 .fast_variable_crosslane_shuffle,
33213488 .fast_variable_perlane_shuffle,
33223489 .fast_vector_fsqrt,
3490 .faster_shift_than_shuffle,
33233491 .fsgsbase,
33243492 .fxsr,
33253493 .idivq_to_divl,
......@@ -3328,6 +3496,9 @@ pub const cpu = struct {
33283496 .macrofusion,
33293497 .mmx,
33303498 .movbe,
3499 .no_bypass_delay_blend,
3500 .no_bypass_delay_mov,
3501 .no_bypass_delay_shuffle,
33313502 .nopl,
33323503 .pclmul,
33333504 .pku,
......@@ -3338,6 +3509,7 @@ pub const cpu = struct {
33383509 .rdseed,
33393510 .sahf,
33403511 .slow_3ops_lea,
3512 .tuning_fast_imm_vector_shift,
33413513 .vzeroupper,
33423514 .x87,
33433515 .xsavec,
......@@ -3379,6 +3551,9 @@ pub const cpu = struct {
33793551 .macrofusion,
33803552 .mmx,
33813553 .movbe,
3554 .no_bypass_delay_blend,
3555 .no_bypass_delay_mov,
3556 .no_bypass_delay_shuffle,
33823557 .nopl,
33833558 .pclmul,
33843559 .popcnt,
......@@ -3394,59 +3569,6 @@ pub const cpu = struct {
33943569 .xsaves,
33953570 }),
33963571 };
3397 pub const skylake_avx512 = CpuModel{
3398 .name = "skylake_avx512",
3399 .llvm_name = "skylake-avx512",
3400 .features = featureSet(&[_]Feature{
3401 .@"64bit",
3402 .adx,
3403 .aes,
3404 .allow_light_256_bit,
3405 .avx512bw,
3406 .avx512cd,
3407 .avx512dq,
3408 .avx512vl,
3409 .bmi,
3410 .bmi2,
3411 .clflushopt,
3412 .clwb,
3413 .cmov,
3414 .crc32,
3415 .cx16,
3416 .ermsb,
3417 .false_deps_popcnt,
3418 .fast_15bytenop,
3419 .fast_gather,
3420 .fast_scalar_fsqrt,
3421 .fast_shld_rotate,
3422 .fast_variable_crosslane_shuffle,
3423 .fast_variable_perlane_shuffle,
3424 .fast_vector_fsqrt,
3425 .fsgsbase,
3426 .fxsr,
3427 .idivq_to_divl,
3428 .invpcid,
3429 .lzcnt,
3430 .macrofusion,
3431 .mmx,
3432 .movbe,
3433 .nopl,
3434 .pclmul,
3435 .pku,
3436 .popcnt,
3437 .prefer_256_bit,
3438 .prfchw,
3439 .rdrnd,
3440 .rdseed,
3441 .sahf,
3442 .slow_3ops_lea,
3443 .vzeroupper,
3444 .x87,
3445 .xsavec,
3446 .xsaveopt,
3447 .xsaves,
3448 }),
3449 };
34503572 pub const slm = CpuModel{
34513573 .name = "slm",
34523574 .llvm_name = "slm",
......@@ -3462,6 +3584,7 @@ pub const cpu = struct {
34623584 .idivq_to_divl,
34633585 .mmx,
34643586 .movbe,
3587 .no_bypass_delay,
34653588 .nopl,
34663589 .pclmul,
34673590 .popcnt,
......@@ -3522,6 +3645,9 @@ pub const cpu = struct {
35223645 .movbe,
35233646 .movdir64b,
35243647 .movdiri,
3648 .no_bypass_delay_blend,
3649 .no_bypass_delay_mov,
3650 .no_bypass_delay_shuffle,
35253651 .nopl,
35263652 .pku,
35273653 .popcnt,
......@@ -3533,6 +3659,7 @@ pub const cpu = struct {
35333659 .sahf,
35343660 .sha,
35353661 .shstk,
3662 .tuning_fast_imm_vector_shift,
35363663 .vaes,
35373664 .vpclmulqdq,
35383665 .vzeroupper,
......@@ -3559,6 +3686,7 @@ pub const cpu = struct {
35593686 .gfni,
35603687 .mmx,
35613688 .movbe,
3689 .no_bypass_delay,
35623690 .nopl,
35633691 .pclmul,
35643692 .popcnt,
......@@ -3592,6 +3720,7 @@ pub const cpu = struct {
35923720 .fxsr,
35933721 .macrofusion,
35943722 .mmx,
3723 .no_bypass_delay_mov,
35953724 .nopl,
35963725 .pclmul,
35973726 .popcnt,
tools/update_cpu_features.zig+39
......@@ -40,6 +40,7 @@ const LlvmTarget = struct {
4040 feature_overrides: []const FeatureOverride = &.{},
4141 extra_cpus: []const Cpu = &.{},
4242 extra_features: []const Feature = &.{},
43 omit_cpus: []const []const u8 = &.{},
4344 branch_quota: ?usize = null,
4445};
4546
......@@ -915,6 +916,40 @@ const llvm_targets = [_]LlvmTarget{
915916 .extra_deps = &.{"soft_float"},
916917 },
917918 },
919 .omit_cpus = &.{
920 // LLVM defines a bunch of dumb aliases with foreach loops in X86.td.
921 "pentium_mmx",
922 "pentium_pro",
923 "pentium_ii",
924 "pentium_3m",
925 "pentium_iii_no_xmm_regs",
926 "pentium_iii",
927 "pentium_m",
928 "pentium4m",
929 "pentium_4",
930 "pentium_4_sse3",
931 "core_2_duo_ssse3",
932 "core_2_duo_sse4_1",
933 "atom_sse4_2",
934 "goldmont_plus",
935 "core_i7_sse4_2",
936 "core_aes_pclmulqdq",
937 "corei7-avx",
938 "core_2nd_gen_avx",
939 "core-avx-i",
940 "core_3rd_gen_avx",
941 "core-avx2",
942 "core_4th_gen_avx",
943 "core_4th_gen_avx_tsx",
944 "core_5th_gen_avx",
945 "core_5th_gen_avx_tsx",
946 "mic_avx512",
947 "skylake_avx512",
948 "skylake-avx512",
949 "icelake_client",
950 "icelake_server",
951 "graniterapids_d",
952 },
918953 },
919954 .{
920955 .zig_name = "xcore",
......@@ -1129,6 +1164,10 @@ fn processOneTarget(job: Job) anyerror!void {
11291164 if (hasSuperclass(&kv.value_ptr.object, "Processor")) {
11301165 const llvm_name = kv.value_ptr.object.get("Name").?.string;
11311166 if (llvm_name.len == 0) continue;
1167 const omitted = for (llvm_target.omit_cpus) |omit_cpu_name| {
1168 if (mem.eql(u8, omit_cpu_name, llvm_name)) break true;
1169 } else false;
1170 if (omitted) continue;
11321171
11331172 var zig_name = try llvmNameToZigName(arena, llvm_name);
11341173 var deps = std.ArrayList([]const u8).init(arena);