| author | |
| committer | |
| log | 70ee818d21c44ec0031b997916694327eb9fc37f |
| tree | 6078350717e2a11e25a38208274ff20d66b317f7 |
| parent | c75f65d38c2c0f5f8f443685a4d694a7ab9c1da3 |
| signature | Commit is signed but in an unrecognized format. |
based on zig-llvm-target-details-generator
commit 3aef1b9b4415ed3acfaea4ce8bc233e213548f719 files changed, 894 insertions(+), 86 deletions(-)
lib/std/target.zig+1-1| ... | ... | @@ -566,7 +566,7 @@ pub const Target = union(enum) { |
| 566 | 566 | pub const Set = struct { |
| 567 | 567 | ints: [usize_count]usize, |
| 568 | 568 | |
| 569 | pub const needed_bit_count = 174; | |
| 569 | pub const needed_bit_count = 175; | |
| 570 | 570 | pub const byte_count = (needed_bit_count + 7) / 8; |
| 571 | 571 | pub const usize_count = (byte_count + (@sizeOf(usize) - 1)) / @sizeOf(usize); |
| 572 | 572 | pub const Index = std.math.Log2Int(@IntType(false, usize_count * @bitSizeOf(usize))); |
lib/std/target/aarch64.zig+298-24| ... | ... | @@ -6,6 +6,7 @@ pub const Feature = enum { |
| 6 | 6 | a53, |
| 7 | 7 | a55, |
| 8 | 8 | a57, |
| 9 | a65, | |
| 9 | 10 | a72, |
| 10 | 11 | a73, |
| 11 | 12 | a75, |
| ... | ... | @@ -15,6 +16,11 @@ pub const Feature = enum { |
| 15 | 16 | alternate_sextload_cvt_f32_pattern, |
| 16 | 17 | altnzcv, |
| 17 | 18 | am, |
| 19 | apple_a10, | |
| 20 | apple_a11, | |
| 21 | apple_a12, | |
| 22 | apple_a13, | |
| 23 | apple_a7, | |
| 18 | 24 | arith_bcc_fusion, |
| 19 | 25 | arith_cbz_fusion, |
| 20 | 26 | balance_fp_ops, |
| ... | ... | @@ -35,10 +41,10 @@ pub const Feature = enum { |
| 35 | 41 | crc, |
| 36 | 42 | crypto, |
| 37 | 43 | custom_cheap_as_move, |
| 38 | cyclone, | |
| 39 | 44 | disable_latency_sched_heuristic, |
| 40 | 45 | dit, |
| 41 | 46 | dotprod, |
| 47 | ete, | |
| 42 | 48 | exynos_cheap_as_move, |
| 43 | 49 | exynosm1, |
| 44 | 50 | exynosm2, |
| ... | ... | @@ -65,12 +71,15 @@ pub const Feature = enum { |
| 65 | 71 | mpam, |
| 66 | 72 | mte, |
| 67 | 73 | neon, |
| 74 | neoversee1, | |
| 75 | neoversen1, | |
| 68 | 76 | no_neg_immediates, |
| 69 | 77 | nv, |
| 70 | 78 | pa, |
| 71 | 79 | pan, |
| 72 | 80 | pan_rwv, |
| 73 | 81 | perfmon, |
| 82 | pmu, | |
| 74 | 83 | predictable_select_expensive, |
| 75 | 84 | predres, |
| 76 | 85 | rand, |
| ... | ... | @@ -122,16 +131,19 @@ pub const Feature = enum { |
| 122 | 131 | sve2_bitperm, |
| 123 | 132 | sve2_sha3, |
| 124 | 133 | sve2_sm4, |
| 134 | tagged_globals, | |
| 125 | 135 | thunderx, |
| 126 | 136 | thunderx2t99, |
| 127 | 137 | thunderxt81, |
| 128 | 138 | thunderxt83, |
| 129 | 139 | thunderxt88, |
| 130 | 140 | tlb_rmi, |
| 141 | tme, | |
| 131 | 142 | tpidr_el1, |
| 132 | 143 | tpidr_el2, |
| 133 | 144 | tpidr_el3, |
| 134 | 145 | tracev8_4, |
| 146 | trbe, | |
| 135 | 147 | tsv110, |
| 136 | 148 | uaops, |
| 137 | 149 | use_aa, |
| ... | ... | @@ -217,6 +229,21 @@ pub const all_features = blk: { |
| 217 | 229 | .use_postra_scheduler, |
| 218 | 230 | }), |
| 219 | 231 | }; |
| 232 | result[@enumToInt(Feature.a65)] = .{ | |
| 233 | .llvm_name = "a65", | |
| 234 | .description = "Cortex-A65 ARM processors", | |
| 235 | .dependencies = featureSet(&[_]Feature{ | |
| 236 | .crypto, | |
| 237 | .dotprod, | |
| 238 | .fp_armv8, | |
| 239 | .fullfp16, | |
| 240 | .neon, | |
| 241 | .ras, | |
| 242 | .rcpc, | |
| 243 | .ssbs, | |
| 244 | .v8_2a, | |
| 245 | }), | |
| 246 | }; | |
| 220 | 247 | result[@enumToInt(Feature.a72)] = .{ |
| 221 | 248 | .llvm_name = "a72", |
| 222 | 249 | .description = "Cortex-A72 ARM processors", |
| ... | ... | @@ -297,6 +324,110 @@ pub const all_features = blk: { |
| 297 | 324 | .description = "Enable v8.4-A Activity Monitors extension", |
| 298 | 325 | .dependencies = featureSet(&[_]Feature{}), |
| 299 | 326 | }; |
| 327 | result[@enumToInt(Feature.apple_a10)] = .{ | |
| 328 | .llvm_name = "apple-a10", | |
| 329 | .description = "Apple A10", | |
| 330 | .dependencies = featureSet(&[_]Feature{ | |
| 331 | .alternate_sextload_cvt_f32_pattern, | |
| 332 | .arith_bcc_fusion, | |
| 333 | .arith_cbz_fusion, | |
| 334 | .crc, | |
| 335 | .crypto, | |
| 336 | .disable_latency_sched_heuristic, | |
| 337 | .fp_armv8, | |
| 338 | .fuse_aes, | |
| 339 | .fuse_crypto_eor, | |
| 340 | .lor, | |
| 341 | .neon, | |
| 342 | .pan, | |
| 343 | .perfmon, | |
| 344 | .rdm, | |
| 345 | .vh, | |
| 346 | .zcm, | |
| 347 | .zcz, | |
| 348 | }), | |
| 349 | }; | |
| 350 | result[@enumToInt(Feature.apple_a11)] = .{ | |
| 351 | .llvm_name = "apple-a11", | |
| 352 | .description = "Apple A11", | |
| 353 | .dependencies = featureSet(&[_]Feature{ | |
| 354 | .alternate_sextload_cvt_f32_pattern, | |
| 355 | .arith_bcc_fusion, | |
| 356 | .arith_cbz_fusion, | |
| 357 | .crypto, | |
| 358 | .disable_latency_sched_heuristic, | |
| 359 | .fp_armv8, | |
| 360 | .fullfp16, | |
| 361 | .fuse_aes, | |
| 362 | .fuse_crypto_eor, | |
| 363 | .neon, | |
| 364 | .perfmon, | |
| 365 | .v8_2a, | |
| 366 | .zcm, | |
| 367 | .zcz, | |
| 368 | }), | |
| 369 | }; | |
| 370 | result[@enumToInt(Feature.apple_a12)] = .{ | |
| 371 | .llvm_name = "apple-a12", | |
| 372 | .description = "Apple A12", | |
| 373 | .dependencies = featureSet(&[_]Feature{ | |
| 374 | .alternate_sextload_cvt_f32_pattern, | |
| 375 | .arith_bcc_fusion, | |
| 376 | .arith_cbz_fusion, | |
| 377 | .crypto, | |
| 378 | .disable_latency_sched_heuristic, | |
| 379 | .fp_armv8, | |
| 380 | .fullfp16, | |
| 381 | .fuse_aes, | |
| 382 | .fuse_crypto_eor, | |
| 383 | .neon, | |
| 384 | .perfmon, | |
| 385 | .v8_3a, | |
| 386 | .zcm, | |
| 387 | .zcz, | |
| 388 | }), | |
| 389 | }; | |
| 390 | result[@enumToInt(Feature.apple_a13)] = .{ | |
| 391 | .llvm_name = "apple-a13", | |
| 392 | .description = "Apple A13", | |
| 393 | .dependencies = featureSet(&[_]Feature{ | |
| 394 | .alternate_sextload_cvt_f32_pattern, | |
| 395 | .arith_bcc_fusion, | |
| 396 | .arith_cbz_fusion, | |
| 397 | .crypto, | |
| 398 | .disable_latency_sched_heuristic, | |
| 399 | .fp_armv8, | |
| 400 | .fp16fml, | |
| 401 | .fullfp16, | |
| 402 | .fuse_aes, | |
| 403 | .fuse_crypto_eor, | |
| 404 | .neon, | |
| 405 | .perfmon, | |
| 406 | .sha3, | |
| 407 | .v8_4a, | |
| 408 | .zcm, | |
| 409 | .zcz, | |
| 410 | }), | |
| 411 | }; | |
| 412 | result[@enumToInt(Feature.apple_a7)] = .{ | |
| 413 | .llvm_name = "apple-a7", | |
| 414 | .description = "Apple A7 (the CPU formerly known as Cyclone)", | |
| 415 | .dependencies = featureSet(&[_]Feature{ | |
| 416 | .alternate_sextload_cvt_f32_pattern, | |
| 417 | .arith_bcc_fusion, | |
| 418 | .arith_cbz_fusion, | |
| 419 | .crypto, | |
| 420 | .disable_latency_sched_heuristic, | |
| 421 | .fp_armv8, | |
| 422 | .fuse_aes, | |
| 423 | .fuse_crypto_eor, | |
| 424 | .neon, | |
| 425 | .perfmon, | |
| 426 | .zcm, | |
| 427 | .zcz, | |
| 428 | .zcz_fp_workaround, | |
| 429 | }), | |
| 430 | }; | |
| 300 | 431 | result[@enumToInt(Feature.arith_bcc_fusion)] = .{ |
| 301 | 432 | .llvm_name = "arith-bcc-fusion", |
| 302 | 433 | .description = "CPU fuses arithmetic+bcc operations", |
| ... | ... | @@ -403,25 +534,6 @@ pub const all_features = blk: { |
| 403 | 534 | .description = "Use custom handling of cheap instructions", |
| 404 | 535 | .dependencies = featureSet(&[_]Feature{}), |
| 405 | 536 | }; |
| 406 | result[@enumToInt(Feature.cyclone)] = .{ | |
| 407 | .llvm_name = "cyclone", | |
| 408 | .description = "Cyclone", | |
| 409 | .dependencies = featureSet(&[_]Feature{ | |
| 410 | .alternate_sextload_cvt_f32_pattern, | |
| 411 | .arith_bcc_fusion, | |
| 412 | .arith_cbz_fusion, | |
| 413 | .crypto, | |
| 414 | .disable_latency_sched_heuristic, | |
| 415 | .fp_armv8, | |
| 416 | .fuse_aes, | |
| 417 | .fuse_crypto_eor, | |
| 418 | .neon, | |
| 419 | .perfmon, | |
| 420 | .zcm, | |
| 421 | .zcz, | |
| 422 | .zcz_fp_workaround, | |
| 423 | }), | |
| 424 | }; | |
| 425 | 537 | result[@enumToInt(Feature.disable_latency_sched_heuristic)] = .{ |
| 426 | 538 | .llvm_name = "disable-latency-sched-heuristic", |
| 427 | 539 | .description = "Disable latency scheduling heuristic", |
| ... | ... | @@ -437,6 +549,13 @@ pub const all_features = blk: { |
| 437 | 549 | .description = "Enable dot product support", |
| 438 | 550 | .dependencies = featureSet(&[_]Feature{}), |
| 439 | 551 | }; |
| 552 | result[@enumToInt(Feature.ete)] = .{ | |
| 553 | .llvm_name = "ete", | |
| 554 | .description = "Enable Embedded Trace Extension", | |
| 555 | .dependencies = featureSet(&[_]Feature{ | |
| 556 | .trbe, | |
| 557 | }), | |
| 558 | }; | |
| 440 | 559 | result[@enumToInt(Feature.exynos_cheap_as_move)] = .{ |
| 441 | 560 | .llvm_name = "exynos-cheap-as-move", |
| 442 | 561 | .description = "Use Exynos specific handling of cheap instructions", |
| ... | ... | @@ -656,6 +775,35 @@ pub const all_features = blk: { |
| 656 | 775 | .fp_armv8, |
| 657 | 776 | }), |
| 658 | 777 | }; |
| 778 | result[@enumToInt(Feature.neoversee1)] = .{ | |
| 779 | .llvm_name = "neoversee1", | |
| 780 | .description = "Neoverse E1 ARM processors", | |
| 781 | .dependencies = featureSet(&[_]Feature{ | |
| 782 | .crypto, | |
| 783 | .dotprod, | |
| 784 | .fp_armv8, | |
| 785 | .fullfp16, | |
| 786 | .neon, | |
| 787 | .rcpc, | |
| 788 | .ssbs, | |
| 789 | .v8_2a, | |
| 790 | }), | |
| 791 | }; | |
| 792 | result[@enumToInt(Feature.neoversen1)] = .{ | |
| 793 | .llvm_name = "neoversen1", | |
| 794 | .description = "Neoverse N1 ARM processors", | |
| 795 | .dependencies = featureSet(&[_]Feature{ | |
| 796 | .crypto, | |
| 797 | .dotprod, | |
| 798 | .fp_armv8, | |
| 799 | .fullfp16, | |
| 800 | .neon, | |
| 801 | .rcpc, | |
| 802 | .spe, | |
| 803 | .ssbs, | |
| 804 | .v8_2a, | |
| 805 | }), | |
| 806 | }; | |
| 659 | 807 | result[@enumToInt(Feature.no_neg_immediates)] = .{ |
| 660 | 808 | .llvm_name = "no-neg-immediates", |
| 661 | 809 | .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.", |
| ... | ... | @@ -688,6 +836,11 @@ pub const all_features = blk: { |
| 688 | 836 | .description = "Enable ARMv8 PMUv3 Performance Monitors extension", |
| 689 | 837 | .dependencies = featureSet(&[_]Feature{}), |
| 690 | 838 | }; |
| 839 | result[@enumToInt(Feature.pmu)] = .{ | |
| 840 | .llvm_name = "pmu", | |
| 841 | .description = "Enable v8.4-A PMU extension", | |
| 842 | .dependencies = featureSet(&[_]Feature{}), | |
| 843 | }; | |
| 691 | 844 | result[@enumToInt(Feature.predictable_select_expensive)] = .{ |
| 692 | 845 | .llvm_name = "predictable-select-expensive", |
| 693 | 846 | .description = "Prefer likely predicted branches over selects", |
| ... | ... | @@ -979,6 +1132,11 @@ pub const all_features = blk: { |
| 979 | 1132 | .sve2, |
| 980 | 1133 | }), |
| 981 | 1134 | }; |
| 1135 | result[@enumToInt(Feature.tagged_globals)] = .{ | |
| 1136 | .llvm_name = "tagged-globals", | |
| 1137 | .description = "Use an instruction sequence for taking the address of a global that allows a memory tag in the upper address bits", | |
| 1138 | .dependencies = featureSet(&[_]Feature{}), | |
| 1139 | }; | |
| 982 | 1140 | result[@enumToInt(Feature.thunderx)] = .{ |
| 983 | 1141 | .llvm_name = "thunderx", |
| 984 | 1142 | .description = "Cavium ThunderX processors", |
| ... | ... | @@ -1052,6 +1210,11 @@ pub const all_features = blk: { |
| 1052 | 1210 | .description = "Enable v8.4-A TLB Range and Maintenance Instructions", |
| 1053 | 1211 | .dependencies = featureSet(&[_]Feature{}), |
| 1054 | 1212 | }; |
| 1213 | result[@enumToInt(Feature.tme)] = .{ | |
| 1214 | .llvm_name = "tme", | |
| 1215 | .description = "Enable Transactional Memory Extension", | |
| 1216 | .dependencies = featureSet(&[_]Feature{}), | |
| 1217 | }; | |
| 1055 | 1218 | result[@enumToInt(Feature.tpidr_el1)] = .{ |
| 1056 | 1219 | .llvm_name = "tpidr-el1", |
| 1057 | 1220 | .description = "Permit use of TPIDR_EL1 for the TLS base", |
| ... | ... | @@ -1072,6 +1235,11 @@ pub const all_features = blk: { |
| 1072 | 1235 | .description = "Enable v8.4-A Trace extension", |
| 1073 | 1236 | .dependencies = featureSet(&[_]Feature{}), |
| 1074 | 1237 | }; |
| 1238 | result[@enumToInt(Feature.trbe)] = .{ | |
| 1239 | .llvm_name = "trbe", | |
| 1240 | .description = "Enable Trace Buffer Extension", | |
| 1241 | .dependencies = featureSet(&[_]Feature{}), | |
| 1242 | }; | |
| 1075 | 1243 | result[@enumToInt(Feature.tsv110)] = .{ |
| 1076 | 1244 | .llvm_name = "tsv110", |
| 1077 | 1245 | .description = "HiSilicon TS-V110 processors", |
| ... | ... | @@ -1164,6 +1332,7 @@ pub const all_features = blk: { |
| 1164 | 1332 | .fmi, |
| 1165 | 1333 | .mpam, |
| 1166 | 1334 | .nv, |
| 1335 | .pmu, | |
| 1167 | 1336 | .rasv8_4, |
| 1168 | 1337 | .rcpc_immo, |
| 1169 | 1338 | .sel2, |
| ... | ... | @@ -1229,11 +1398,74 @@ pub const all_features = blk: { |
| 1229 | 1398 | }; |
| 1230 | 1399 | |
| 1231 | 1400 | pub const cpu = struct { |
| 1401 | pub const apple_a10 = Cpu{ | |
| 1402 | .name = "apple_a10", | |
| 1403 | .llvm_name = "apple-a10", | |
| 1404 | .features = featureSet(&[_]Feature{ | |
| 1405 | .apple_a10, | |
| 1406 | }), | |
| 1407 | }; | |
| 1408 | pub const apple_a11 = Cpu{ | |
| 1409 | .name = "apple_a11", | |
| 1410 | .llvm_name = "apple-a11", | |
| 1411 | .features = featureSet(&[_]Feature{ | |
| 1412 | .apple_a11, | |
| 1413 | }), | |
| 1414 | }; | |
| 1415 | pub const apple_a12 = Cpu{ | |
| 1416 | .name = "apple_a12", | |
| 1417 | .llvm_name = "apple-a12", | |
| 1418 | .features = featureSet(&[_]Feature{ | |
| 1419 | .apple_a12, | |
| 1420 | }), | |
| 1421 | }; | |
| 1422 | pub const apple_a13 = Cpu{ | |
| 1423 | .name = "apple_a13", | |
| 1424 | .llvm_name = "apple-a13", | |
| 1425 | .features = featureSet(&[_]Feature{ | |
| 1426 | .apple_a13, | |
| 1427 | }), | |
| 1428 | }; | |
| 1429 | pub const apple_a7 = Cpu{ | |
| 1430 | .name = "apple_a7", | |
| 1431 | .llvm_name = "apple-a7", | |
| 1432 | .features = featureSet(&[_]Feature{ | |
| 1433 | .apple_a7, | |
| 1434 | }), | |
| 1435 | }; | |
| 1436 | pub const apple_a8 = Cpu{ | |
| 1437 | .name = "apple_a8", | |
| 1438 | .llvm_name = "apple-a8", | |
| 1439 | .features = featureSet(&[_]Feature{ | |
| 1440 | .apple_a7, | |
| 1441 | }), | |
| 1442 | }; | |
| 1443 | pub const apple_a9 = Cpu{ | |
| 1444 | .name = "apple_a9", | |
| 1445 | .llvm_name = "apple-a9", | |
| 1446 | .features = featureSet(&[_]Feature{ | |
| 1447 | .apple_a7, | |
| 1448 | }), | |
| 1449 | }; | |
| 1232 | 1450 | pub const apple_latest = Cpu{ |
| 1233 | 1451 | .name = "apple_latest", |
| 1234 | 1452 | .llvm_name = "apple-latest", |
| 1235 | 1453 | .features = featureSet(&[_]Feature{ |
| 1236 | .cyclone, | |
| 1454 | .apple_a13, | |
| 1455 | }), | |
| 1456 | }; | |
| 1457 | pub const apple_s4 = Cpu{ | |
| 1458 | .name = "apple_s4", | |
| 1459 | .llvm_name = "apple-s4", | |
| 1460 | .features = featureSet(&[_]Feature{ | |
| 1461 | .apple_a12, | |
| 1462 | }), | |
| 1463 | }; | |
| 1464 | pub const apple_s5 = Cpu{ | |
| 1465 | .name = "apple_s5", | |
| 1466 | .llvm_name = "apple-s5", | |
| 1467 | .features = featureSet(&[_]Feature{ | |
| 1468 | .apple_a12, | |
| 1237 | 1469 | }), |
| 1238 | 1470 | }; |
| 1239 | 1471 | pub const cortex_a35 = Cpu{ |
| ... | ... | @@ -1264,6 +1496,20 @@ pub const cpu = struct { |
| 1264 | 1496 | .a57, |
| 1265 | 1497 | }), |
| 1266 | 1498 | }; |
| 1499 | pub const cortex_a65 = Cpu{ | |
| 1500 | .name = "cortex_a65", | |
| 1501 | .llvm_name = "cortex-a65", | |
| 1502 | .features = featureSet(&[_]Feature{ | |
| 1503 | .a65, | |
| 1504 | }), | |
| 1505 | }; | |
| 1506 | pub const cortex_a65ae = Cpu{ | |
| 1507 | .name = "cortex_a65ae", | |
| 1508 | .llvm_name = "cortex-a65ae", | |
| 1509 | .features = featureSet(&[_]Feature{ | |
| 1510 | .a65, | |
| 1511 | }), | |
| 1512 | }; | |
| 1267 | 1513 | pub const cortex_a72 = Cpu{ |
| 1268 | 1514 | .name = "cortex_a72", |
| 1269 | 1515 | .llvm_name = "cortex-a72", |
| ... | ... | @@ -1303,19 +1549,19 @@ pub const cpu = struct { |
| 1303 | 1549 | .name = "cyclone", |
| 1304 | 1550 | .llvm_name = "cyclone", |
| 1305 | 1551 | .features = featureSet(&[_]Feature{ |
| 1306 | .cyclone, | |
| 1552 | .apple_a7, | |
| 1307 | 1553 | }), |
| 1308 | 1554 | }; |
| 1309 | 1555 | pub const exynos_m1 = Cpu{ |
| 1310 | 1556 | .name = "exynos_m1", |
| 1311 | .llvm_name = "exynos-m1", | |
| 1557 | .llvm_name = null, | |
| 1312 | 1558 | .features = featureSet(&[_]Feature{ |
| 1313 | 1559 | .exynosm1, |
| 1314 | 1560 | }), |
| 1315 | 1561 | }; |
| 1316 | 1562 | pub const exynos_m2 = Cpu{ |
| 1317 | 1563 | .name = "exynos_m2", |
| 1318 | .llvm_name = "exynos-m2", | |
| 1564 | .llvm_name = null, | |
| 1319 | 1565 | .features = featureSet(&[_]Feature{ |
| 1320 | 1566 | .exynosm2, |
| 1321 | 1567 | }), |
| ... | ... | @@ -1352,6 +1598,7 @@ pub const cpu = struct { |
| 1352 | 1598 | .name = "generic", |
| 1353 | 1599 | .llvm_name = "generic", |
| 1354 | 1600 | .features = featureSet(&[_]Feature{ |
| 1601 | .ete, | |
| 1355 | 1602 | .fp_armv8, |
| 1356 | 1603 | .fuse_aes, |
| 1357 | 1604 | .neon, |
| ... | ... | @@ -1366,6 +1613,20 @@ pub const cpu = struct { |
| 1366 | 1613 | .kryo, |
| 1367 | 1614 | }), |
| 1368 | 1615 | }; |
| 1616 | pub const neoverse_e1 = Cpu{ | |
| 1617 | .name = "neoverse_e1", | |
| 1618 | .llvm_name = "neoverse-e1", | |
| 1619 | .features = featureSet(&[_]Feature{ | |
| 1620 | .neoversee1, | |
| 1621 | }), | |
| 1622 | }; | |
| 1623 | pub const neoverse_n1 = Cpu{ | |
| 1624 | .name = "neoverse_n1", | |
| 1625 | .llvm_name = "neoverse-n1", | |
| 1626 | .features = featureSet(&[_]Feature{ | |
| 1627 | .neoversen1, | |
| 1628 | }), | |
| 1629 | }; | |
| 1369 | 1630 | pub const saphira = Cpu{ |
| 1370 | 1631 | .name = "saphira", |
| 1371 | 1632 | .llvm_name = "saphira", |
| ... | ... | @@ -1421,11 +1682,22 @@ pub const cpu = struct { |
| 1421 | 1682 | /// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1 |
| 1422 | 1683 | /// compiler has inefficient memory and CPU usage, affecting build times. |
| 1423 | 1684 | pub const all_cpus = &[_]*const Cpu{ |
| 1685 | &cpu.apple_a10, | |
| 1686 | &cpu.apple_a11, | |
| 1687 | &cpu.apple_a12, | |
| 1688 | &cpu.apple_a13, | |
| 1689 | &cpu.apple_a7, | |
| 1690 | &cpu.apple_a8, | |
| 1691 | &cpu.apple_a9, | |
| 1424 | 1692 | &cpu.apple_latest, |
| 1693 | &cpu.apple_s4, | |
| 1694 | &cpu.apple_s5, | |
| 1425 | 1695 | &cpu.cortex_a35, |
| 1426 | 1696 | &cpu.cortex_a53, |
| 1427 | 1697 | &cpu.cortex_a55, |
| 1428 | 1698 | &cpu.cortex_a57, |
| 1699 | &cpu.cortex_a65, | |
| 1700 | &cpu.cortex_a65ae, | |
| 1429 | 1701 | &cpu.cortex_a72, |
| 1430 | 1702 | &cpu.cortex_a73, |
| 1431 | 1703 | &cpu.cortex_a75, |
| ... | ... | @@ -1440,6 +1712,8 @@ pub const all_cpus = &[_]*const Cpu{ |
| 1440 | 1712 | &cpu.falkor, |
| 1441 | 1713 | &cpu.generic, |
| 1442 | 1714 | &cpu.kryo, |
| 1715 | &cpu.neoverse_e1, | |
| 1716 | &cpu.neoverse_n1, | |
| 1443 | 1717 | &cpu.saphira, |
| 1444 | 1718 | &cpu.thunderx, |
| 1445 | 1719 | &cpu.thunderx2t99, |
lib/std/target/amdgpu.zig+7| ... | ... | @@ -62,6 +62,7 @@ pub const Feature = enum { |
| 62 | 62 | max_private_element_size_16, |
| 63 | 63 | max_private_element_size_4, |
| 64 | 64 | max_private_element_size_8, |
| 65 | mfma_inline_literal_bug, | |
| 65 | 66 | mimg_r128, |
| 66 | 67 | movrel, |
| 67 | 68 | no_data_dep_hazard, |
| ... | ... | @@ -490,6 +491,11 @@ pub const all_features = blk: { |
| 490 | 491 | .description = "Maximum private access size may be 8", |
| 491 | 492 | .dependencies = featureSet(&[_]Feature{}), |
| 492 | 493 | }; |
| 494 | result[@enumToInt(Feature.mfma_inline_literal_bug)] = .{ | |
| 495 | .llvm_name = "mfma-inline-literal-bug", | |
| 496 | .description = "MFMA cannot use inline literal as SrcC", | |
| 497 | .dependencies = featureSet(&[_]Feature{}), | |
| 498 | }; | |
| 493 | 499 | result[@enumToInt(Feature.mimg_r128)] = .{ |
| 494 | 500 | .llvm_name = "mimg-r128", |
| 495 | 501 | .description = "Support 128-bit texture resources", |
| ... | ... | @@ -1102,6 +1108,7 @@ pub const cpu = struct { |
| 1102 | 1108 | .half_rate_64_ops, |
| 1103 | 1109 | .ldsbankcount32, |
| 1104 | 1110 | .mai_insts, |
| 1111 | .mfma_inline_literal_bug, | |
| 1105 | 1112 | .pk_fmac_f16_inst, |
| 1106 | 1113 | .sram_ecc, |
| 1107 | 1114 | }), |
lib/std/target/arm.zig+54-34| ... | ... | @@ -100,6 +100,9 @@ pub const Feature = enum { |
| 100 | 100 | muxed_units, |
| 101 | 101 | mve, |
| 102 | 102 | mve_fp, |
| 103 | mve1beat, | |
| 104 | mve2beat, | |
| 105 | mve4beat, | |
| 103 | 106 | nacl_trap, |
| 104 | 107 | neon, |
| 105 | 108 | neon_fpmovs, |
| ... | ... | @@ -129,6 +132,7 @@ pub const Feature = enum { |
| 129 | 132 | slow_odd_reg, |
| 130 | 133 | slow_vdup32, |
| 131 | 134 | slow_vgetlni32, |
| 135 | slowfpvfmx, | |
| 132 | 136 | slowfpvmlx, |
| 133 | 137 | soft_float, |
| 134 | 138 | splat_vfp_neon, |
| ... | ... | @@ -137,7 +141,6 @@ pub const Feature = enum { |
| 137 | 141 | thumb_mode, |
| 138 | 142 | thumb2, |
| 139 | 143 | trustzone, |
| 140 | use_aa, | |
| 141 | 144 | use_misched, |
| 142 | 145 | v4t, |
| 143 | 146 | v5t, |
| ... | ... | @@ -158,8 +161,6 @@ pub const Feature = enum { |
| 158 | 161 | v8m, |
| 159 | 162 | v8m_main, |
| 160 | 163 | vfp2, |
| 161 | vfp2d16, | |
| 162 | vfp2d16sp, | |
| 163 | 164 | vfp2sp, |
| 164 | 165 | vfp3, |
| 165 | 166 | vfp3d16, |
| ... | ... | @@ -746,9 +747,9 @@ pub const all_features = blk: { |
| 746 | 747 | .slow_fp_brcc, |
| 747 | 748 | .slow_vdup32, |
| 748 | 749 | .slow_vgetlni32, |
| 750 | .slowfpvfmx, | |
| 749 | 751 | .slowfpvmlx, |
| 750 | 752 | .splat_vfp_neon, |
| 751 | .use_aa, | |
| 752 | 753 | .wide_stride_vfp, |
| 753 | 754 | .zcz, |
| 754 | 755 | }), |
| ... | ... | @@ -936,6 +937,21 @@ pub const all_features = blk: { |
| 936 | 937 | .mve, |
| 937 | 938 | }), |
| 938 | 939 | }; |
| 940 | result[@enumToInt(Feature.mve1beat)] = .{ | |
| 941 | .llvm_name = "mve1beat", | |
| 942 | .description = "Model MVE instructions as a 1 beat per tick architecture", | |
| 943 | .dependencies = featureSet(&[_]Feature{}), | |
| 944 | }; | |
| 945 | result[@enumToInt(Feature.mve2beat)] = .{ | |
| 946 | .llvm_name = "mve2beat", | |
| 947 | .description = "Model MVE instructions as a 2 beats per tick architecture", | |
| 948 | .dependencies = featureSet(&[_]Feature{}), | |
| 949 | }; | |
| 950 | result[@enumToInt(Feature.mve4beat)] = .{ | |
| 951 | .llvm_name = "mve4beat", | |
| 952 | .description = "Model MVE instructions as a 4 beats per tick architecture", | |
| 953 | .dependencies = featureSet(&[_]Feature{}), | |
| 954 | }; | |
| 939 | 955 | result[@enumToInt(Feature.nacl_trap)] = .{ |
| 940 | 956 | .llvm_name = "nacl-trap", |
| 941 | 957 | .description = "NaCl trap", |
| ... | ... | @@ -1085,6 +1101,11 @@ pub const all_features = blk: { |
| 1085 | 1101 | .description = "Has slow VGETLNi32 - prefer VMOV", |
| 1086 | 1102 | .dependencies = featureSet(&[_]Feature{}), |
| 1087 | 1103 | }; |
| 1104 | result[@enumToInt(Feature.slowfpvfmx)] = .{ | |
| 1105 | .llvm_name = "slowfpvfmx", | |
| 1106 | .description = "Disable VFP / NEON FMA instructions", | |
| 1107 | .dependencies = featureSet(&[_]Feature{}), | |
| 1108 | }; | |
| 1088 | 1109 | result[@enumToInt(Feature.slowfpvmlx)] = .{ |
| 1089 | 1110 | .llvm_name = "slowfpvmlx", |
| 1090 | 1111 | .description = "Disable VFP / NEON MAC instructions", |
| ... | ... | @@ -1127,11 +1148,6 @@ pub const all_features = blk: { |
| 1127 | 1148 | .description = "Enable support for TrustZone security extensions", |
| 1128 | 1149 | .dependencies = featureSet(&[_]Feature{}), |
| 1129 | 1150 | }; |
| 1130 | result[@enumToInt(Feature.use_aa)] = .{ | |
| 1131 | .llvm_name = "use-aa", | |
| 1132 | .description = "Use alias analysis during codegen", | |
| 1133 | .dependencies = featureSet(&[_]Feature{}), | |
| 1134 | }; | |
| 1135 | 1151 | result[@enumToInt(Feature.use_misched)] = .{ |
| 1136 | 1152 | .llvm_name = "use-misched", |
| 1137 | 1153 | .description = "Use the MachineScheduler", |
| ... | ... | @@ -1269,31 +1285,16 @@ pub const all_features = blk: { |
| 1269 | 1285 | result[@enumToInt(Feature.vfp2)] = .{ |
| 1270 | 1286 | .llvm_name = "vfp2", |
| 1271 | 1287 | .description = "Enable VFP2 instructions", |
| 1272 | .dependencies = featureSet(&[_]Feature{ | |
| 1273 | .vfp2d16, | |
| 1274 | .vfp2sp, | |
| 1275 | }), | |
| 1276 | }; | |
| 1277 | result[@enumToInt(Feature.vfp2d16)] = .{ | |
| 1278 | .llvm_name = "vfp2d16", | |
| 1279 | .description = "Enable VFP2 instructions", | |
| 1280 | 1288 | .dependencies = featureSet(&[_]Feature{ |
| 1281 | 1289 | .fp64, |
| 1282 | .vfp2d16sp, | |
| 1283 | }), | |
| 1284 | }; | |
| 1285 | result[@enumToInt(Feature.vfp2d16sp)] = .{ | |
| 1286 | .llvm_name = "vfp2d16sp", | |
| 1287 | .description = "Enable VFP2 instructions with no double precision", | |
| 1288 | .dependencies = featureSet(&[_]Feature{ | |
| 1289 | .fpregs, | |
| 1290 | .vfp2sp, | |
| 1290 | 1291 | }), |
| 1291 | 1292 | }; |
| 1292 | 1293 | result[@enumToInt(Feature.vfp2sp)] = .{ |
| 1293 | 1294 | .llvm_name = "vfp2sp", |
| 1294 | 1295 | .description = "Enable VFP2 instructions with no double precision", |
| 1295 | 1296 | .dependencies = featureSet(&[_]Feature{ |
| 1296 | .vfp2d16sp, | |
| 1297 | .fpregs, | |
| 1297 | 1298 | }), |
| 1298 | 1299 | }; |
| 1299 | 1300 | result[@enumToInt(Feature.vfp3)] = .{ |
| ... | ... | @@ -1704,6 +1705,7 @@ pub const cpu = struct { |
| 1704 | 1705 | .mp, |
| 1705 | 1706 | .ret_addr_stack, |
| 1706 | 1707 | .slow_fp_brcc, |
| 1708 | .slowfpvfmx, | |
| 1707 | 1709 | .slowfpvmlx, |
| 1708 | 1710 | .trustzone, |
| 1709 | 1711 | .vfp4, |
| ... | ... | @@ -1758,6 +1760,7 @@ pub const cpu = struct { |
| 1758 | 1760 | .mp, |
| 1759 | 1761 | .ret_addr_stack, |
| 1760 | 1762 | .slow_fp_brcc, |
| 1763 | .slowfpvfmx, | |
| 1761 | 1764 | .slowfpvmlx, |
| 1762 | 1765 | .trustzone, |
| 1763 | 1766 | .vfp4, |
| ... | ... | @@ -1838,6 +1841,7 @@ pub const cpu = struct { |
| 1838 | 1841 | .nonpipelined_vfp, |
| 1839 | 1842 | .ret_addr_stack, |
| 1840 | 1843 | .slow_fp_brcc, |
| 1844 | .slowfpvfmx, | |
| 1841 | 1845 | .slowfpvmlx, |
| 1842 | 1846 | .trustzone, |
| 1843 | 1847 | .vmlx_forwarding, |
| ... | ... | @@ -1901,7 +1905,6 @@ pub const cpu = struct { |
| 1901 | 1905 | .loop_align, |
| 1902 | 1906 | .m3, |
| 1903 | 1907 | .no_branch_predictor, |
| 1904 | .use_aa, | |
| 1905 | 1908 | .use_misched, |
| 1906 | 1909 | }), |
| 1907 | 1910 | }; |
| ... | ... | @@ -1914,8 +1917,8 @@ pub const cpu = struct { |
| 1914 | 1917 | .fp_armv8d16sp, |
| 1915 | 1918 | .loop_align, |
| 1916 | 1919 | .no_branch_predictor, |
| 1920 | .slowfpvfmx, | |
| 1917 | 1921 | .slowfpvmlx, |
| 1918 | .use_aa, | |
| 1919 | 1922 | .use_misched, |
| 1920 | 1923 | }), |
| 1921 | 1924 | }; |
| ... | ... | @@ -1928,8 +1931,8 @@ pub const cpu = struct { |
| 1928 | 1931 | .fp_armv8d16sp, |
| 1929 | 1932 | .loop_align, |
| 1930 | 1933 | .no_branch_predictor, |
| 1934 | .slowfpvfmx, | |
| 1931 | 1935 | .slowfpvmlx, |
| 1932 | .use_aa, | |
| 1933 | 1936 | .use_misched, |
| 1934 | 1937 | }), |
| 1935 | 1938 | }; |
| ... | ... | @@ -1940,8 +1943,8 @@ pub const cpu = struct { |
| 1940 | 1943 | .armv7e_m, |
| 1941 | 1944 | .loop_align, |
| 1942 | 1945 | .no_branch_predictor, |
| 1946 | .slowfpvfmx, | |
| 1943 | 1947 | .slowfpvmlx, |
| 1944 | .use_aa, | |
| 1945 | 1948 | .use_misched, |
| 1946 | 1949 | .vfp4d16sp, |
| 1947 | 1950 | }), |
| ... | ... | @@ -1973,6 +1976,7 @@ pub const cpu = struct { |
| 1973 | 1976 | .r4, |
| 1974 | 1977 | .ret_addr_stack, |
| 1975 | 1978 | .slow_fp_brcc, |
| 1979 | .slowfpvfmx, | |
| 1976 | 1980 | .slowfpvmlx, |
| 1977 | 1981 | .vfp3d16, |
| 1978 | 1982 | }), |
| ... | ... | @@ -1987,6 +1991,7 @@ pub const cpu = struct { |
| 1987 | 1991 | .r5, |
| 1988 | 1992 | .ret_addr_stack, |
| 1989 | 1993 | .slow_fp_brcc, |
| 1994 | .slowfpvfmx, | |
| 1990 | 1995 | .slowfpvmlx, |
| 1991 | 1996 | .vfp3d16, |
| 1992 | 1997 | }), |
| ... | ... | @@ -1998,7 +2003,6 @@ pub const cpu = struct { |
| 1998 | 2003 | .armv8_r, |
| 1999 | 2004 | .fpao, |
| 2000 | 2005 | .r52, |
| 2001 | .use_aa, | |
| 2002 | 2006 | .use_misched, |
| 2003 | 2007 | }), |
| 2004 | 2008 | }; |
| ... | ... | @@ -2014,6 +2018,7 @@ pub const cpu = struct { |
| 2014 | 2018 | .r7, |
| 2015 | 2019 | .ret_addr_stack, |
| 2016 | 2020 | .slow_fp_brcc, |
| 2021 | .slowfpvfmx, | |
| 2017 | 2022 | .slowfpvmlx, |
| 2018 | 2023 | .vfp3d16, |
| 2019 | 2024 | }), |
| ... | ... | @@ -2029,6 +2034,7 @@ pub const cpu = struct { |
| 2029 | 2034 | .mp, |
| 2030 | 2035 | .ret_addr_stack, |
| 2031 | 2036 | .slow_fp_brcc, |
| 2037 | .slowfpvfmx, | |
| 2032 | 2038 | .slowfpvmlx, |
| 2033 | 2039 | .vfp3d16, |
| 2034 | 2040 | }), |
| ... | ... | @@ -2047,6 +2053,7 @@ pub const cpu = struct { |
| 2047 | 2053 | .mp, |
| 2048 | 2054 | .neonfp, |
| 2049 | 2055 | .ret_addr_stack, |
| 2056 | .slowfpvfmx, | |
| 2050 | 2057 | .slowfpvmlx, |
| 2051 | 2058 | .swift, |
| 2052 | 2059 | .use_misched, |
| ... | ... | @@ -2063,7 +2070,7 @@ pub const cpu = struct { |
| 2063 | 2070 | }; |
| 2064 | 2071 | pub const exynos_m1 = Cpu{ |
| 2065 | 2072 | .name = "exynos_m1", |
| 2066 | .llvm_name = "exynos-m1", | |
| 2073 | .llvm_name = null, | |
| 2067 | 2074 | .features = featureSet(&[_]Feature{ |
| 2068 | 2075 | .armv8_a, |
| 2069 | 2076 | .exynos, |
| ... | ... | @@ -2071,7 +2078,7 @@ pub const cpu = struct { |
| 2071 | 2078 | }; |
| 2072 | 2079 | pub const exynos_m2 = Cpu{ |
| 2073 | 2080 | .name = "exynos_m2", |
| 2074 | .llvm_name = "exynos-m2", | |
| 2081 | .llvm_name = null, | |
| 2075 | 2082 | .features = featureSet(&[_]Feature{ |
| 2076 | 2083 | .armv8_a, |
| 2077 | 2084 | .exynos, |
| ... | ... | @@ -2162,6 +2169,18 @@ pub const cpu = struct { |
| 2162 | 2169 | .armv6k, |
| 2163 | 2170 | }), |
| 2164 | 2171 | }; |
| 2172 | pub const neoverse_n1 = Cpu{ | |
| 2173 | .name = "neoverse_n1", | |
| 2174 | .llvm_name = "neoverse-n1", | |
| 2175 | .features = featureSet(&[_]Feature{ | |
| 2176 | .armv8_2_a, | |
| 2177 | .crc, | |
| 2178 | .crypto, | |
| 2179 | .dotprod, | |
| 2180 | .hwdiv, | |
| 2181 | .hwdiv_arm, | |
| 2182 | }), | |
| 2183 | }; | |
| 2165 | 2184 | pub const sc000 = Cpu{ |
| 2166 | 2185 | .name = "sc000", |
| 2167 | 2186 | .llvm_name = "sc000", |
| ... | ... | @@ -2176,7 +2195,6 @@ pub const cpu = struct { |
| 2176 | 2195 | .armv7_m, |
| 2177 | 2196 | .m3, |
| 2178 | 2197 | .no_branch_predictor, |
| 2179 | .use_aa, | |
| 2180 | 2198 | .use_misched, |
| 2181 | 2199 | }), |
| 2182 | 2200 | }; |
| ... | ... | @@ -2227,6 +2245,7 @@ pub const cpu = struct { |
| 2227 | 2245 | .slow_odd_reg, |
| 2228 | 2246 | .slow_vdup32, |
| 2229 | 2247 | .slow_vgetlni32, |
| 2248 | .slowfpvfmx, | |
| 2230 | 2249 | .slowfpvmlx, |
| 2231 | 2250 | .swift, |
| 2232 | 2251 | .use_misched, |
| ... | ... | @@ -2322,6 +2341,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 2322 | 2341 | &cpu.kryo, |
| 2323 | 2342 | &cpu.mpcore, |
| 2324 | 2343 | &cpu.mpcorenovfp, |
| 2344 | &cpu.neoverse_n1, | |
| 2325 | 2345 | &cpu.sc000, |
| 2326 | 2346 | &cpu.sc300, |
| 2327 | 2347 | &cpu.strongarm, |
lib/std/target/mips.zig+32| ... | ... | @@ -4,6 +4,7 @@ const Cpu = std.Target.Cpu; |
| 4 | 4 | pub const Feature = enum { |
| 5 | 5 | abs2008, |
| 6 | 6 | cnmips, |
| 7 | cnmipsp, | |
| 7 | 8 | crc, |
| 8 | 9 | dsp, |
| 9 | 10 | dspr2, |
| ... | ... | @@ -51,6 +52,7 @@ pub const Feature = enum { |
| 51 | 52 | use_tcc_in_div, |
| 52 | 53 | vfpu, |
| 53 | 54 | virt, |
| 55 | xgot, | |
| 54 | 56 | }; |
| 55 | 57 | |
| 56 | 58 | pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| ... | ... | @@ -71,6 +73,13 @@ pub const all_features = blk: { |
| 71 | 73 | .mips64r2, |
| 72 | 74 | }), |
| 73 | 75 | }; |
| 76 | result[@enumToInt(Feature.cnmipsp)] = .{ | |
| 77 | .llvm_name = "cnmipsp", | |
| 78 | .description = "Octeon+ cnMIPS Support", | |
| 79 | .dependencies = featureSet(&[_]Feature{ | |
| 80 | .cnmips, | |
| 81 | }), | |
| 82 | }; | |
| 74 | 83 | result[@enumToInt(Feature.crc)] = .{ |
| 75 | 84 | .llvm_name = "crc", |
| 76 | 85 | .description = "Mips R6 CRC ASE", |
| ... | ... | @@ -363,6 +372,11 @@ pub const all_features = blk: { |
| 363 | 372 | .description = "Mips Virtualization ASE", |
| 364 | 373 | .dependencies = featureSet(&[_]Feature{}), |
| 365 | 374 | }; |
| 375 | result[@enumToInt(Feature.xgot)] = .{ | |
| 376 | .llvm_name = "xgot", | |
| 377 | .description = "Assume 32-bit GOT", | |
| 378 | .dependencies = featureSet(&[_]Feature{}), | |
| 379 | }; | |
| 366 | 380 | const ti = @typeInfo(Feature); |
| 367 | 381 | for (result) |*elem, i| { |
| 368 | 382 | elem.index = i; |
| ... | ... | @@ -372,6 +386,13 @@ pub const all_features = blk: { |
| 372 | 386 | }; |
| 373 | 387 | |
| 374 | 388 | pub const cpu = struct { |
| 389 | pub const generic = Cpu{ | |
| 390 | .name = "generic", | |
| 391 | .llvm_name = "generic", | |
| 392 | .features = featureSet(&[_]Feature{ | |
| 393 | .mips32, | |
| 394 | }), | |
| 395 | }; | |
| 375 | 396 | pub const mips1 = Cpu{ |
| 376 | 397 | .name = "mips1", |
| 377 | 398 | .llvm_name = "mips1", |
| ... | ... | @@ -485,6 +506,15 @@ pub const cpu = struct { |
| 485 | 506 | .mips64r2, |
| 486 | 507 | }), |
| 487 | 508 | }; |
| 509 | pub const @"octeon+" = Cpu{ | |
| 510 | .name = "octeon+", | |
| 511 | .llvm_name = "octeon+", | |
| 512 | .features = featureSet(&[_]Feature{ | |
| 513 | .cnmips, | |
| 514 | .cnmipsp, | |
| 515 | .mips64r2, | |
| 516 | }), | |
| 517 | }; | |
| 488 | 518 | pub const p5600 = Cpu{ |
| 489 | 519 | .name = "p5600", |
| 490 | 520 | .llvm_name = "p5600", |
| ... | ... | @@ -498,6 +528,7 @@ pub const cpu = struct { |
| 498 | 528 | /// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1 |
| 499 | 529 | /// compiler has inefficient memory and CPU usage, affecting build times. |
| 500 | 530 | pub const all_cpus = &[_]*const Cpu{ |
| 531 | &cpu.generic, | |
| 501 | 532 | &cpu.mips1, |
| 502 | 533 | &cpu.mips2, |
| 503 | 534 | &cpu.mips3, |
| ... | ... | @@ -514,5 +545,6 @@ pub const all_cpus = &[_]*const Cpu{ |
| 514 | 545 | &cpu.mips64r5, |
| 515 | 546 | &cpu.mips64r6, |
| 516 | 547 | &cpu.octeon, |
| 548 | &cpu.@"octeon+", | |
| 517 | 549 | &cpu.p5600, |
| 518 | 550 | }; |
lib/std/target/powerpc.zig+51| ... | ... | @@ -4,6 +4,7 @@ const Cpu = std.Target.Cpu; |
| 4 | 4 | pub const Feature = enum { |
| 5 | 5 | @"64bit", |
| 6 | 6 | @"64bitregs", |
| 7 | allow_unaligned_fp_access, | |
| 7 | 8 | altivec, |
| 8 | 9 | booke, |
| 9 | 10 | bpermd, |
| ... | ... | @@ -71,6 +72,11 @@ pub const all_features = blk: { |
| 71 | 72 | .description = "Enable 64-bit registers usage for ppc32 [beta]", |
| 72 | 73 | .dependencies = featureSet(&[_]Feature{}), |
| 73 | 74 | }; |
| 75 | result[@enumToInt(Feature.allow_unaligned_fp_access)] = .{ | |
| 76 | .llvm_name = "allow-unaligned-fp-access", | |
| 77 | .description = "CPU does not trap on unaligned FP access", | |
| 78 | .dependencies = featureSet(&[_]Feature{}), | |
| 79 | }; | |
| 74 | 80 | result[@enumToInt(Feature.altivec)] = .{ |
| 75 | 81 | .llvm_name = "altivec", |
| 76 | 82 | .description = "Enable Altivec instructions", |
| ... | ... | @@ -560,6 +566,7 @@ pub const cpu = struct { |
| 560 | 566 | .booke, |
| 561 | 567 | .icbt, |
| 562 | 568 | .isel, |
| 569 | .spe, | |
| 563 | 570 | }), |
| 564 | 571 | }; |
| 565 | 572 | pub const e500mc = Cpu{ |
| ... | ... | @@ -584,6 +591,45 @@ pub const cpu = struct { |
| 584 | 591 | .stfiwx, |
| 585 | 592 | }), |
| 586 | 593 | }; |
| 594 | pub const future = Cpu{ | |
| 595 | .name = "future", | |
| 596 | .llvm_name = "future", | |
| 597 | .features = featureSet(&[_]Feature{ | |
| 598 | .@"64bit", | |
| 599 | .allow_unaligned_fp_access, | |
| 600 | .altivec, | |
| 601 | .bpermd, | |
| 602 | .cmpb, | |
| 603 | .crypto, | |
| 604 | .direct_move, | |
| 605 | .extdiv, | |
| 606 | .fcpsgn, | |
| 607 | .fpcvt, | |
| 608 | .fprnd, | |
| 609 | .fre, | |
| 610 | .fres, | |
| 611 | .frsqrte, | |
| 612 | .frsqrtes, | |
| 613 | .fsqrt, | |
| 614 | .htm, | |
| 615 | .icbt, | |
| 616 | .isa_v30_instructions, | |
| 617 | .isel, | |
| 618 | .ldbrx, | |
| 619 | .lfiwax, | |
| 620 | .mfocrf, | |
| 621 | .partword_atomics, | |
| 622 | .popcntd, | |
| 623 | .power8_altivec, | |
| 624 | .power8_vector, | |
| 625 | .power9_altivec, | |
| 626 | .power9_vector, | |
| 627 | .recipprec, | |
| 628 | .stfiwx, | |
| 629 | .two_const_nr, | |
| 630 | .vsx, | |
| 631 | }), | |
| 632 | }; | |
| 587 | 633 | pub const g3 = Cpu{ |
| 588 | 634 | .name = "g3", |
| 589 | 635 | .llvm_name = "g3", |
| ... | ... | @@ -662,6 +708,7 @@ pub const cpu = struct { |
| 662 | 708 | .llvm_name = "ppc64le", |
| 663 | 709 | .features = featureSet(&[_]Feature{ |
| 664 | 710 | .@"64bit", |
| 711 | .allow_unaligned_fp_access, | |
| 665 | 712 | .altivec, |
| 666 | 713 | .bpermd, |
| 667 | 714 | .cmpb, |
| ... | ... | @@ -793,6 +840,7 @@ pub const cpu = struct { |
| 793 | 840 | .llvm_name = "pwr7", |
| 794 | 841 | .features = featureSet(&[_]Feature{ |
| 795 | 842 | .@"64bit", |
| 843 | .allow_unaligned_fp_access, | |
| 796 | 844 | .altivec, |
| 797 | 845 | .bpermd, |
| 798 | 846 | .cmpb, |
| ... | ... | @@ -821,6 +869,7 @@ pub const cpu = struct { |
| 821 | 869 | .llvm_name = "pwr8", |
| 822 | 870 | .features = featureSet(&[_]Feature{ |
| 823 | 871 | .@"64bit", |
| 872 | .allow_unaligned_fp_access, | |
| 824 | 873 | .altivec, |
| 825 | 874 | .bpermd, |
| 826 | 875 | .cmpb, |
| ... | ... | @@ -856,6 +905,7 @@ pub const cpu = struct { |
| 856 | 905 | .llvm_name = "pwr9", |
| 857 | 906 | .features = featureSet(&[_]Feature{ |
| 858 | 907 | .@"64bit", |
| 908 | .allow_unaligned_fp_access, | |
| 859 | 909 | .altivec, |
| 860 | 910 | .bpermd, |
| 861 | 911 | .cmpb, |
| ... | ... | @@ -917,6 +967,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 917 | 967 | &cpu.e500, |
| 918 | 968 | &cpu.e500mc, |
| 919 | 969 | &cpu.e5500, |
| 970 | &cpu.future, | |
| 920 | 971 | &cpu.g3, |
| 921 | 972 | &cpu.g4, |
| 922 | 973 | &cpu.@"g4+", |
lib/std/target/riscv.zig+196-2| ... | ... | @@ -10,6 +10,38 @@ pub const Feature = enum { |
| 10 | 10 | f, |
| 11 | 11 | m, |
| 12 | 12 | relax, |
| 13 | reserve_x1, | |
| 14 | reserve_x10, | |
| 15 | reserve_x11, | |
| 16 | reserve_x12, | |
| 17 | reserve_x13, | |
| 18 | reserve_x14, | |
| 19 | reserve_x15, | |
| 20 | reserve_x16, | |
| 21 | reserve_x17, | |
| 22 | reserve_x18, | |
| 23 | reserve_x19, | |
| 24 | reserve_x2, | |
| 25 | reserve_x20, | |
| 26 | reserve_x21, | |
| 27 | reserve_x22, | |
| 28 | reserve_x23, | |
| 29 | reserve_x24, | |
| 30 | reserve_x25, | |
| 31 | reserve_x26, | |
| 32 | reserve_x27, | |
| 33 | reserve_x28, | |
| 34 | reserve_x29, | |
| 35 | reserve_x3, | |
| 36 | reserve_x30, | |
| 37 | reserve_x31, | |
| 38 | reserve_x4, | |
| 39 | reserve_x5, | |
| 40 | reserve_x6, | |
| 41 | reserve_x7, | |
| 42 | reserve_x8, | |
| 43 | reserve_x9, | |
| 44 | rvc_hints, | |
| 13 | 45 | }; |
| 14 | 46 | |
| 15 | 47 | pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| ... | ... | @@ -60,6 +92,166 @@ pub const all_features = blk: { |
| 60 | 92 | .description = "Enable Linker relaxation.", |
| 61 | 93 | .dependencies = featureSet(&[_]Feature{}), |
| 62 | 94 | }; |
| 95 | result[@enumToInt(Feature.reserve_x1)] = .{ | |
| 96 | .llvm_name = "reserve-x1", | |
| 97 | .description = "Reserve X1", | |
| 98 | .dependencies = featureSet(&[_]Feature{}), | |
| 99 | }; | |
| 100 | result[@enumToInt(Feature.reserve_x10)] = .{ | |
| 101 | .llvm_name = "reserve-x10", | |
| 102 | .description = "Reserve X10", | |
| 103 | .dependencies = featureSet(&[_]Feature{}), | |
| 104 | }; | |
| 105 | result[@enumToInt(Feature.reserve_x11)] = .{ | |
| 106 | .llvm_name = "reserve-x11", | |
| 107 | .description = "Reserve X11", | |
| 108 | .dependencies = featureSet(&[_]Feature{}), | |
| 109 | }; | |
| 110 | result[@enumToInt(Feature.reserve_x12)] = .{ | |
| 111 | .llvm_name = "reserve-x12", | |
| 112 | .description = "Reserve X12", | |
| 113 | .dependencies = featureSet(&[_]Feature{}), | |
| 114 | }; | |
| 115 | result[@enumToInt(Feature.reserve_x13)] = .{ | |
| 116 | .llvm_name = "reserve-x13", | |
| 117 | .description = "Reserve X13", | |
| 118 | .dependencies = featureSet(&[_]Feature{}), | |
| 119 | }; | |
| 120 | result[@enumToInt(Feature.reserve_x14)] = .{ | |
| 121 | .llvm_name = "reserve-x14", | |
| 122 | .description = "Reserve X14", | |
| 123 | .dependencies = featureSet(&[_]Feature{}), | |
| 124 | }; | |
| 125 | result[@enumToInt(Feature.reserve_x15)] = .{ | |
| 126 | .llvm_name = "reserve-x15", | |
| 127 | .description = "Reserve X15", | |
| 128 | .dependencies = featureSet(&[_]Feature{}), | |
| 129 | }; | |
| 130 | result[@enumToInt(Feature.reserve_x16)] = .{ | |
| 131 | .llvm_name = "reserve-x16", | |
| 132 | .description = "Reserve X16", | |
| 133 | .dependencies = featureSet(&[_]Feature{}), | |
| 134 | }; | |
| 135 | result[@enumToInt(Feature.reserve_x17)] = .{ | |
| 136 | .llvm_name = "reserve-x17", | |
| 137 | .description = "Reserve X17", | |
| 138 | .dependencies = featureSet(&[_]Feature{}), | |
| 139 | }; | |
| 140 | result[@enumToInt(Feature.reserve_x18)] = .{ | |
| 141 | .llvm_name = "reserve-x18", | |
| 142 | .description = "Reserve X18", | |
| 143 | .dependencies = featureSet(&[_]Feature{}), | |
| 144 | }; | |
| 145 | result[@enumToInt(Feature.reserve_x19)] = .{ | |
| 146 | .llvm_name = "reserve-x19", | |
| 147 | .description = "Reserve X19", | |
| 148 | .dependencies = featureSet(&[_]Feature{}), | |
| 149 | }; | |
| 150 | result[@enumToInt(Feature.reserve_x2)] = .{ | |
| 151 | .llvm_name = "reserve-x2", | |
| 152 | .description = "Reserve X2", | |
| 153 | .dependencies = featureSet(&[_]Feature{}), | |
| 154 | }; | |
| 155 | result[@enumToInt(Feature.reserve_x20)] = .{ | |
| 156 | .llvm_name = "reserve-x20", | |
| 157 | .description = "Reserve X20", | |
| 158 | .dependencies = featureSet(&[_]Feature{}), | |
| 159 | }; | |
| 160 | result[@enumToInt(Feature.reserve_x21)] = .{ | |
| 161 | .llvm_name = "reserve-x21", | |
| 162 | .description = "Reserve X21", | |
| 163 | .dependencies = featureSet(&[_]Feature{}), | |
| 164 | }; | |
| 165 | result[@enumToInt(Feature.reserve_x22)] = .{ | |
| 166 | .llvm_name = "reserve-x22", | |
| 167 | .description = "Reserve X22", | |
| 168 | .dependencies = featureSet(&[_]Feature{}), | |
| 169 | }; | |
| 170 | result[@enumToInt(Feature.reserve_x23)] = .{ | |
| 171 | .llvm_name = "reserve-x23", | |
| 172 | .description = "Reserve X23", | |
| 173 | .dependencies = featureSet(&[_]Feature{}), | |
| 174 | }; | |
| 175 | result[@enumToInt(Feature.reserve_x24)] = .{ | |
| 176 | .llvm_name = "reserve-x24", | |
| 177 | .description = "Reserve X24", | |
| 178 | .dependencies = featureSet(&[_]Feature{}), | |
| 179 | }; | |
| 180 | result[@enumToInt(Feature.reserve_x25)] = .{ | |
| 181 | .llvm_name = "reserve-x25", | |
| 182 | .description = "Reserve X25", | |
| 183 | .dependencies = featureSet(&[_]Feature{}), | |
| 184 | }; | |
| 185 | result[@enumToInt(Feature.reserve_x26)] = .{ | |
| 186 | .llvm_name = "reserve-x26", | |
| 187 | .description = "Reserve X26", | |
| 188 | .dependencies = featureSet(&[_]Feature{}), | |
| 189 | }; | |
| 190 | result[@enumToInt(Feature.reserve_x27)] = .{ | |
| 191 | .llvm_name = "reserve-x27", | |
| 192 | .description = "Reserve X27", | |
| 193 | .dependencies = featureSet(&[_]Feature{}), | |
| 194 | }; | |
| 195 | result[@enumToInt(Feature.reserve_x28)] = .{ | |
| 196 | .llvm_name = "reserve-x28", | |
| 197 | .description = "Reserve X28", | |
| 198 | .dependencies = featureSet(&[_]Feature{}), | |
| 199 | }; | |
| 200 | result[@enumToInt(Feature.reserve_x29)] = .{ | |
| 201 | .llvm_name = "reserve-x29", | |
| 202 | .description = "Reserve X29", | |
| 203 | .dependencies = featureSet(&[_]Feature{}), | |
| 204 | }; | |
| 205 | result[@enumToInt(Feature.reserve_x3)] = .{ | |
| 206 | .llvm_name = "reserve-x3", | |
| 207 | .description = "Reserve X3", | |
| 208 | .dependencies = featureSet(&[_]Feature{}), | |
| 209 | }; | |
| 210 | result[@enumToInt(Feature.reserve_x30)] = .{ | |
| 211 | .llvm_name = "reserve-x30", | |
| 212 | .description = "Reserve X30", | |
| 213 | .dependencies = featureSet(&[_]Feature{}), | |
| 214 | }; | |
| 215 | result[@enumToInt(Feature.reserve_x31)] = .{ | |
| 216 | .llvm_name = "reserve-x31", | |
| 217 | .description = "Reserve X31", | |
| 218 | .dependencies = featureSet(&[_]Feature{}), | |
| 219 | }; | |
| 220 | result[@enumToInt(Feature.reserve_x4)] = .{ | |
| 221 | .llvm_name = "reserve-x4", | |
| 222 | .description = "Reserve X4", | |
| 223 | .dependencies = featureSet(&[_]Feature{}), | |
| 224 | }; | |
| 225 | result[@enumToInt(Feature.reserve_x5)] = .{ | |
| 226 | .llvm_name = "reserve-x5", | |
| 227 | .description = "Reserve X5", | |
| 228 | .dependencies = featureSet(&[_]Feature{}), | |
| 229 | }; | |
| 230 | result[@enumToInt(Feature.reserve_x6)] = .{ | |
| 231 | .llvm_name = "reserve-x6", | |
| 232 | .description = "Reserve X6", | |
| 233 | .dependencies = featureSet(&[_]Feature{}), | |
| 234 | }; | |
| 235 | result[@enumToInt(Feature.reserve_x7)] = .{ | |
| 236 | .llvm_name = "reserve-x7", | |
| 237 | .description = "Reserve X7", | |
| 238 | .dependencies = featureSet(&[_]Feature{}), | |
| 239 | }; | |
| 240 | result[@enumToInt(Feature.reserve_x8)] = .{ | |
| 241 | .llvm_name = "reserve-x8", | |
| 242 | .description = "Reserve X8", | |
| 243 | .dependencies = featureSet(&[_]Feature{}), | |
| 244 | }; | |
| 245 | result[@enumToInt(Feature.reserve_x9)] = .{ | |
| 246 | .llvm_name = "reserve-x9", | |
| 247 | .description = "Reserve X9", | |
| 248 | .dependencies = featureSet(&[_]Feature{}), | |
| 249 | }; | |
| 250 | result[@enumToInt(Feature.rvc_hints)] = .{ | |
| 251 | .llvm_name = "rvc-hints", | |
| 252 | .description = "Enable RVC Hint Instructions.", | |
| 253 | .dependencies = featureSet(&[_]Feature{}), | |
| 254 | }; | |
| 63 | 255 | const ti = @typeInfo(Feature); |
| 64 | 256 | for (result) |*elem, i| { |
| 65 | 257 | elem.index = i; |
| ... | ... | @@ -99,14 +291,16 @@ pub const cpu = struct { |
| 99 | 291 | pub const generic_rv32 = Cpu{ |
| 100 | 292 | .name = "generic_rv32", |
| 101 | 293 | .llvm_name = "generic-rv32", |
| 102 | .features = featureSet(&[_]Feature{}), | |
| 294 | .features = featureSet(&[_]Feature{ | |
| 295 | .rvc_hints, | |
| 296 | }), | |
| 103 | 297 | }; |
| 104 | ||
| 105 | 298 | pub const generic_rv64 = Cpu{ |
| 106 | 299 | .name = "generic_rv64", |
| 107 | 300 | .llvm_name = "generic-rv64", |
| 108 | 301 | .features = featureSet(&[_]Feature{ |
| 109 | 302 | .@"64bit", |
| 303 | .rvc_hints, | |
| 110 | 304 | }), |
| 111 | 305 | }; |
| 112 | 306 | }; |
lib/std/target/systemz.zig+42| ... | ... | @@ -450,6 +450,47 @@ pub const cpu = struct { |
| 450 | 450 | .vector_packed_decimal, |
| 451 | 451 | }), |
| 452 | 452 | }; |
| 453 | pub const z15 = Cpu{ | |
| 454 | .name = "z15", | |
| 455 | .llvm_name = "z15", | |
| 456 | .features = featureSet(&[_]Feature{ | |
| 457 | .deflate_conversion, | |
| 458 | .dfp_packed_conversion, | |
| 459 | .dfp_zoned_conversion, | |
| 460 | .distinct_ops, | |
| 461 | .enhanced_dat_2, | |
| 462 | .enhanced_sort, | |
| 463 | .execution_hint, | |
| 464 | .fast_serialization, | |
| 465 | .fp_extension, | |
| 466 | .guarded_storage, | |
| 467 | .high_word, | |
| 468 | .insert_reference_bits_multiple, | |
| 469 | .interlocked_access1, | |
| 470 | .load_and_trap, | |
| 471 | .load_and_zero_rightmost_byte, | |
| 472 | .load_store_on_cond, | |
| 473 | .load_store_on_cond_2, | |
| 474 | .message_security_assist_extension3, | |
| 475 | .message_security_assist_extension4, | |
| 476 | .message_security_assist_extension5, | |
| 477 | .message_security_assist_extension7, | |
| 478 | .message_security_assist_extension8, | |
| 479 | .message_security_assist_extension9, | |
| 480 | .miscellaneous_extensions, | |
| 481 | .miscellaneous_extensions_2, | |
| 482 | .miscellaneous_extensions_3, | |
| 483 | .population_count, | |
| 484 | .processor_assist, | |
| 485 | .reset_reference_bits_multiple, | |
| 486 | .transactional_execution, | |
| 487 | .vector, | |
| 488 | .vector_enhancements_1, | |
| 489 | .vector_enhancements_2, | |
| 490 | .vector_packed_decimal, | |
| 491 | .vector_packed_decimal_enhancement, | |
| 492 | }), | |
| 493 | }; | |
| 453 | 494 | pub const z196 = Cpu{ |
| 454 | 495 | .name = "z196", |
| 455 | 496 | .llvm_name = "z196", |
| ... | ... | @@ -505,6 +546,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 505 | 546 | &cpu.z10, |
| 506 | 547 | &cpu.z13, |
| 507 | 548 | &cpu.z14, |
| 549 | &cpu.z15, | |
| 508 | 550 | &cpu.z196, |
| 509 | 551 | &cpu.zEC12, |
| 510 | 552 | }; |
lib/std/target/x86.zig+213-25| ... | ... | @@ -2,9 +2,12 @@ const std = @import("../std.zig"); |
| 2 | 2 | const Cpu = std.Target.Cpu; |
| 3 | 3 | |
| 4 | 4 | pub const Feature = enum { |
| 5 | @"16bit_mode", | |
| 6 | @"32bit_mode", | |
| 5 | 7 | @"3dnow", |
| 6 | 8 | @"3dnowa", |
| 7 | 9 | @"64bit", |
| 10 | @"64bit_mode", | |
| 8 | 11 | adx, |
| 9 | 12 | aes, |
| 10 | 13 | avx, |
| ... | ... | @@ -45,7 +48,6 @@ pub const Feature = enum { |
| 45 | 48 | fast_gather, |
| 46 | 49 | fast_hops, |
| 47 | 50 | fast_lzcnt, |
| 48 | fast_partial_ymm_or_zmm_write, | |
| 49 | 51 | fast_scalar_fsqrt, |
| 50 | 52 | fast_scalar_shift_masks, |
| 51 | 53 | fast_shld_rotate, |
| ... | ... | @@ -78,7 +80,9 @@ pub const Feature = enum { |
| 78 | 80 | pconfig, |
| 79 | 81 | pku, |
| 80 | 82 | popcnt, |
| 83 | prefer_128_bit, | |
| 81 | 84 | prefer_256_bit, |
| 85 | prefer_mask_registers, | |
| 82 | 86 | prefetchwt1, |
| 83 | 87 | prfchw, |
| 84 | 88 | ptwrite, |
| ... | ... | @@ -113,8 +117,11 @@ pub const Feature = enum { |
| 113 | 117 | sse4a, |
| 114 | 118 | ssse3, |
| 115 | 119 | tbm, |
| 120 | use_aa, | |
| 121 | use_glm_div_sqrt_costs, | |
| 116 | 122 | vaes, |
| 117 | 123 | vpclmulqdq, |
| 124 | vzeroupper, | |
| 118 | 125 | waitpkg, |
| 119 | 126 | wbnoinvd, |
| 120 | 127 | x87, |
| ... | ... | @@ -131,6 +138,16 @@ pub const all_features = blk: { |
| 131 | 138 | const len = @typeInfo(Feature).Enum.fields.len; |
| 132 | 139 | std.debug.assert(len <= Cpu.Feature.Set.needed_bit_count); |
| 133 | 140 | var result: [len]Cpu.Feature = undefined; |
| 141 | result[@enumToInt(Feature.@"16bit_mode")] = .{ | |
| 142 | .llvm_name = "16bit-mode", | |
| 143 | .description = "16-bit mode (i8086)", | |
| 144 | .dependencies = featureSet(&[_]Feature{}), | |
| 145 | }; | |
| 146 | result[@enumToInt(Feature.@"32bit_mode")] = .{ | |
| 147 | .llvm_name = "32bit-mode", | |
| 148 | .description = "32-bit mode (80386)", | |
| 149 | .dependencies = featureSet(&[_]Feature{}), | |
| 150 | }; | |
| 134 | 151 | result[@enumToInt(Feature.@"3dnow")] = .{ |
| 135 | 152 | .llvm_name = "3dnow", |
| 136 | 153 | .description = "Enable 3DNow! instructions", |
| ... | ... | @@ -150,6 +167,11 @@ pub const all_features = blk: { |
| 150 | 167 | .description = "Support 64-bit instructions", |
| 151 | 168 | .dependencies = featureSet(&[_]Feature{}), |
| 152 | 169 | }; |
| 170 | result[@enumToInt(Feature.@"64bit_mode")] = .{ | |
| 171 | .llvm_name = "64bit-mode", | |
| 172 | .description = "64-bit mode (x86_64)", | |
| 173 | .dependencies = featureSet(&[_]Feature{}), | |
| 174 | }; | |
| 153 | 175 | result[@enumToInt(Feature.adx)] = .{ |
| 154 | 176 | .llvm_name = "adx", |
| 155 | 177 | .description = "Support ADX instructions", |
| ... | ... | @@ -385,20 +407,13 @@ pub const all_features = blk: { |
| 385 | 407 | result[@enumToInt(Feature.fast_hops)] = .{ |
| 386 | 408 | .llvm_name = "fast-hops", |
| 387 | 409 | .description = "Prefer horizontal vector math instructions (haddp, phsub, etc.) over normal vector instructions with shuffles", |
| 388 | .dependencies = featureSet(&[_]Feature{ | |
| 389 | .sse3, | |
| 390 | }), | |
| 410 | .dependencies = featureSet(&[_]Feature{}), | |
| 391 | 411 | }; |
| 392 | 412 | result[@enumToInt(Feature.fast_lzcnt)] = .{ |
| 393 | 413 | .llvm_name = "fast-lzcnt", |
| 394 | 414 | .description = "LZCNT instructions are as fast as most simple integer ops", |
| 395 | 415 | .dependencies = featureSet(&[_]Feature{}), |
| 396 | 416 | }; |
| 397 | result[@enumToInt(Feature.fast_partial_ymm_or_zmm_write)] = .{ | |
| 398 | .llvm_name = "fast-partial-ymm-or-zmm-write", | |
| 399 | .description = "Partial writes to YMM/ZMM registers are fast", | |
| 400 | .dependencies = featureSet(&[_]Feature{}), | |
| 401 | }; | |
| 402 | 417 | result[@enumToInt(Feature.fast_scalar_fsqrt)] = .{ |
| 403 | 418 | .llvm_name = "fast-scalar-fsqrt", |
| 404 | 419 | .description = "Scalar SQRT is fast (disable Newton-Raphson)", |
| ... | ... | @@ -528,7 +543,7 @@ pub const all_features = blk: { |
| 528 | 543 | }; |
| 529 | 544 | result[@enumToInt(Feature.mpx)] = .{ |
| 530 | 545 | .llvm_name = "mpx", |
| 531 | .description = "Support MPX instructions", | |
| 546 | .description = "Deprecated. Support MPX instructions", | |
| 532 | 547 | .dependencies = featureSet(&[_]Feature{}), |
| 533 | 548 | }; |
| 534 | 549 | result[@enumToInt(Feature.mwaitx)] = .{ |
| ... | ... | @@ -568,11 +583,21 @@ pub const all_features = blk: { |
| 568 | 583 | .description = "Support POPCNT instruction", |
| 569 | 584 | .dependencies = featureSet(&[_]Feature{}), |
| 570 | 585 | }; |
| 586 | result[@enumToInt(Feature.prefer_128_bit)] = .{ | |
| 587 | .llvm_name = "prefer-128-bit", | |
| 588 | .description = "Prefer 128-bit AVX instructions", | |
| 589 | .dependencies = featureSet(&[_]Feature{}), | |
| 590 | }; | |
| 571 | 591 | result[@enumToInt(Feature.prefer_256_bit)] = .{ |
| 572 | 592 | .llvm_name = "prefer-256-bit", |
| 573 | 593 | .description = "Prefer 256-bit AVX instructions", |
| 574 | 594 | .dependencies = featureSet(&[_]Feature{}), |
| 575 | 595 | }; |
| 596 | result[@enumToInt(Feature.prefer_mask_registers)] = .{ | |
| 597 | .llvm_name = "prefer-mask-registers", | |
| 598 | .description = "Prefer AVX512 mask registers over PTEST/MOVMSK", | |
| 599 | .dependencies = featureSet(&[_]Feature{}), | |
| 600 | }; | |
| 576 | 601 | result[@enumToInt(Feature.prefetchwt1)] = .{ |
| 577 | 602 | .llvm_name = "prefetchwt1", |
| 578 | 603 | .description = "Prefetch with Intent to Write and T1 Hint", |
| ... | ... | @@ -762,6 +787,16 @@ pub const all_features = blk: { |
| 762 | 787 | .description = "Enable TBM instructions", |
| 763 | 788 | .dependencies = featureSet(&[_]Feature{}), |
| 764 | 789 | }; |
| 790 | result[@enumToInt(Feature.use_aa)] = .{ | |
| 791 | .llvm_name = "use-aa", | |
| 792 | .description = "Use alias analysis during codegen", | |
| 793 | .dependencies = featureSet(&[_]Feature{}), | |
| 794 | }; | |
| 795 | result[@enumToInt(Feature.use_glm_div_sqrt_costs)] = .{ | |
| 796 | .llvm_name = "use-glm-div-sqrt-costs", | |
| 797 | .description = "Use Goldmont specific floating point div/sqrt costs", | |
| 798 | .dependencies = featureSet(&[_]Feature{}), | |
| 799 | }; | |
| 765 | 800 | result[@enumToInt(Feature.vaes)] = .{ |
| 766 | 801 | .llvm_name = "vaes", |
| 767 | 802 | .description = "Promote selected AES instructions to AVX512/AVX registers", |
| ... | ... | @@ -778,6 +813,11 @@ pub const all_features = blk: { |
| 778 | 813 | .pclmul, |
| 779 | 814 | }), |
| 780 | 815 | }; |
| 816 | result[@enumToInt(Feature.vzeroupper)] = .{ | |
| 817 | .llvm_name = "vzeroupper", | |
| 818 | .description = "Should insert vzeroupper instructions", | |
| 819 | .dependencies = featureSet(&[_]Feature{}), | |
| 820 | }; | |
| 781 | 821 | result[@enumToInt(Feature.waitpkg)] = .{ |
| 782 | 822 | .llvm_name = "waitpkg", |
| 783 | 823 | .description = "Wait and pause enhancements", |
| ... | ... | @@ -846,6 +886,7 @@ pub const cpu = struct { |
| 846 | 886 | .sahf, |
| 847 | 887 | .slow_shld, |
| 848 | 888 | .sse4a, |
| 889 | .vzeroupper, | |
| 849 | 890 | .x87, |
| 850 | 891 | }), |
| 851 | 892 | }; |
| ... | ... | @@ -859,6 +900,7 @@ pub const cpu = struct { |
| 859 | 900 | .nopl, |
| 860 | 901 | .slow_shld, |
| 861 | 902 | .slow_unaligned_mem_16, |
| 903 | .vzeroupper, | |
| 862 | 904 | .x87, |
| 863 | 905 | }), |
| 864 | 906 | }; |
| ... | ... | @@ -874,6 +916,7 @@ pub const cpu = struct { |
| 874 | 916 | .slow_shld, |
| 875 | 917 | .slow_unaligned_mem_16, |
| 876 | 918 | .sse, |
| 919 | .vzeroupper, | |
| 877 | 920 | .x87, |
| 878 | 921 | }), |
| 879 | 922 | }; |
| ... | ... | @@ -891,6 +934,7 @@ pub const cpu = struct { |
| 891 | 934 | .slow_shld, |
| 892 | 935 | .slow_unaligned_mem_16, |
| 893 | 936 | .sse2, |
| 937 | .vzeroupper, | |
| 894 | 938 | .x87, |
| 895 | 939 | }), |
| 896 | 940 | }; |
| ... | ... | @@ -906,6 +950,7 @@ pub const cpu = struct { |
| 906 | 950 | .slow_shld, |
| 907 | 951 | .slow_unaligned_mem_16, |
| 908 | 952 | .sse, |
| 953 | .vzeroupper, | |
| 909 | 954 | .x87, |
| 910 | 955 | }), |
| 911 | 956 | }; |
| ... | ... | @@ -919,6 +964,7 @@ pub const cpu = struct { |
| 919 | 964 | .nopl, |
| 920 | 965 | .slow_shld, |
| 921 | 966 | .slow_unaligned_mem_16, |
| 967 | .vzeroupper, | |
| 922 | 968 | .x87, |
| 923 | 969 | }), |
| 924 | 970 | }; |
| ... | ... | @@ -934,6 +980,7 @@ pub const cpu = struct { |
| 934 | 980 | .slow_shld, |
| 935 | 981 | .slow_unaligned_mem_16, |
| 936 | 982 | .sse, |
| 983 | .vzeroupper, | |
| 937 | 984 | .x87, |
| 938 | 985 | }), |
| 939 | 986 | }; |
| ... | ... | @@ -951,6 +998,7 @@ pub const cpu = struct { |
| 951 | 998 | .slow_shld, |
| 952 | 999 | .slow_unaligned_mem_16, |
| 953 | 1000 | .sse2, |
| 1001 | .vzeroupper, | |
| 954 | 1002 | .x87, |
| 955 | 1003 | }), |
| 956 | 1004 | }; |
| ... | ... | @@ -969,6 +1017,7 @@ pub const cpu = struct { |
| 969 | 1017 | .slow_shld, |
| 970 | 1018 | .slow_unaligned_mem_16, |
| 971 | 1019 | .sse3, |
| 1020 | .vzeroupper, | |
| 972 | 1021 | .x87, |
| 973 | 1022 | }), |
| 974 | 1023 | }; |
| ... | ... | @@ -993,6 +1042,7 @@ pub const cpu = struct { |
| 993 | 1042 | .slow_two_mem_ops, |
| 994 | 1043 | .slow_unaligned_mem_16, |
| 995 | 1044 | .ssse3, |
| 1045 | .vzeroupper, | |
| 996 | 1046 | .x87, |
| 997 | 1047 | }), |
| 998 | 1048 | }; |
| ... | ... | @@ -1013,6 +1063,7 @@ pub const cpu = struct { |
| 1013 | 1063 | .sahf, |
| 1014 | 1064 | .slow_shld, |
| 1015 | 1065 | .sse4a, |
| 1066 | .vzeroupper, | |
| 1016 | 1067 | .x87, |
| 1017 | 1068 | }), |
| 1018 | 1069 | }; |
| ... | ... | @@ -1038,6 +1089,7 @@ pub const cpu = struct { |
| 1038 | 1089 | .prfchw, |
| 1039 | 1090 | .sahf, |
| 1040 | 1091 | .slow_shld, |
| 1092 | .vzeroupper, | |
| 1041 | 1093 | .x87, |
| 1042 | 1094 | .xop, |
| 1043 | 1095 | .xsave, |
| ... | ... | @@ -1070,6 +1122,7 @@ pub const cpu = struct { |
| 1070 | 1122 | .sahf, |
| 1071 | 1123 | .slow_shld, |
| 1072 | 1124 | .tbm, |
| 1125 | .vzeroupper, | |
| 1073 | 1126 | .x87, |
| 1074 | 1127 | .xop, |
| 1075 | 1128 | .xsave, |
| ... | ... | @@ -1103,6 +1156,7 @@ pub const cpu = struct { |
| 1103 | 1156 | .sahf, |
| 1104 | 1157 | .slow_shld, |
| 1105 | 1158 | .tbm, |
| 1159 | .vzeroupper, | |
| 1106 | 1160 | .x87, |
| 1107 | 1161 | .xop, |
| 1108 | 1162 | .xsave, |
| ... | ... | @@ -1140,6 +1194,7 @@ pub const cpu = struct { |
| 1140 | 1194 | .sahf, |
| 1141 | 1195 | .slow_shld, |
| 1142 | 1196 | .tbm, |
| 1197 | .vzeroupper, | |
| 1143 | 1198 | .x87, |
| 1144 | 1199 | .xop, |
| 1145 | 1200 | .xsave, |
| ... | ... | @@ -1167,6 +1222,7 @@ pub const cpu = struct { |
| 1167 | 1222 | .slow_two_mem_ops, |
| 1168 | 1223 | .slow_unaligned_mem_16, |
| 1169 | 1224 | .ssse3, |
| 1225 | .vzeroupper, | |
| 1170 | 1226 | .x87, |
| 1171 | 1227 | }), |
| 1172 | 1228 | }; |
| ... | ... | @@ -1209,6 +1265,7 @@ pub const cpu = struct { |
| 1209 | 1265 | .sahf, |
| 1210 | 1266 | .slow_3ops_lea, |
| 1211 | 1267 | .sse4_2, |
| 1268 | .vzeroupper, | |
| 1212 | 1269 | .x87, |
| 1213 | 1270 | .xsave, |
| 1214 | 1271 | .xsaveopt, |
| ... | ... | @@ -1235,6 +1292,7 @@ pub const cpu = struct { |
| 1235 | 1292 | .slow_shld, |
| 1236 | 1293 | .sse4a, |
| 1237 | 1294 | .ssse3, |
| 1295 | .vzeroupper, | |
| 1238 | 1296 | .x87, |
| 1239 | 1297 | }), |
| 1240 | 1298 | }; |
| ... | ... | @@ -1254,7 +1312,6 @@ pub const cpu = struct { |
| 1254 | 1312 | .fast_bextr, |
| 1255 | 1313 | .fast_hops, |
| 1256 | 1314 | .fast_lzcnt, |
| 1257 | .fast_partial_ymm_or_zmm_write, | |
| 1258 | 1315 | .fast_scalar_shift_masks, |
| 1259 | 1316 | .fast_vector_shift_masks, |
| 1260 | 1317 | .fxsr, |
| ... | ... | @@ -1280,6 +1337,7 @@ pub const cpu = struct { |
| 1280 | 1337 | .features = featureSet(&[_]Feature{ |
| 1281 | 1338 | .@"3dnow", |
| 1282 | 1339 | .slow_unaligned_mem_16, |
| 1340 | .vzeroupper, | |
| 1283 | 1341 | .x87, |
| 1284 | 1342 | }), |
| 1285 | 1343 | }; |
| ... | ... | @@ -1293,6 +1351,7 @@ pub const cpu = struct { |
| 1293 | 1351 | .mmx, |
| 1294 | 1352 | .slow_unaligned_mem_16, |
| 1295 | 1353 | .sse, |
| 1354 | .vzeroupper, | |
| 1296 | 1355 | .x87, |
| 1297 | 1356 | }), |
| 1298 | 1357 | }; |
| ... | ... | @@ -1335,11 +1394,11 @@ pub const cpu = struct { |
| 1335 | 1394 | .merge_to_threeway_branch, |
| 1336 | 1395 | .mmx, |
| 1337 | 1396 | .movbe, |
| 1338 | .mpx, | |
| 1339 | 1397 | .nopl, |
| 1340 | 1398 | .pclmul, |
| 1341 | 1399 | .pku, |
| 1342 | 1400 | .popcnt, |
| 1401 | .prefer_256_bit, | |
| 1343 | 1402 | .prfchw, |
| 1344 | 1403 | .rdrnd, |
| 1345 | 1404 | .rdseed, |
| ... | ... | @@ -1348,6 +1407,7 @@ pub const cpu = struct { |
| 1348 | 1407 | .sha, |
| 1349 | 1408 | .slow_3ops_lea, |
| 1350 | 1409 | .sse4_2, |
| 1410 | .vzeroupper, | |
| 1351 | 1411 | .x87, |
| 1352 | 1412 | .xsave, |
| 1353 | 1413 | .xsavec, |
| ... | ... | @@ -1395,17 +1455,18 @@ pub const cpu = struct { |
| 1395 | 1455 | .merge_to_threeway_branch, |
| 1396 | 1456 | .mmx, |
| 1397 | 1457 | .movbe, |
| 1398 | .mpx, | |
| 1399 | 1458 | .nopl, |
| 1400 | 1459 | .pclmul, |
| 1401 | 1460 | .pku, |
| 1402 | 1461 | .popcnt, |
| 1462 | .prefer_256_bit, | |
| 1403 | 1463 | .prfchw, |
| 1404 | 1464 | .rdrnd, |
| 1405 | 1465 | .rdseed, |
| 1406 | 1466 | .sahf, |
| 1407 | 1467 | .slow_3ops_lea, |
| 1408 | 1468 | .sse4_2, |
| 1469 | .vzeroupper, | |
| 1409 | 1470 | .x87, |
| 1410 | 1471 | .xsave, |
| 1411 | 1472 | .xsavec, |
| ... | ... | @@ -1454,17 +1515,18 @@ pub const cpu = struct { |
| 1454 | 1515 | .merge_to_threeway_branch, |
| 1455 | 1516 | .mmx, |
| 1456 | 1517 | .movbe, |
| 1457 | .mpx, | |
| 1458 | 1518 | .nopl, |
| 1459 | 1519 | .pclmul, |
| 1460 | 1520 | .pku, |
| 1461 | 1521 | .popcnt, |
| 1522 | .prefer_256_bit, | |
| 1462 | 1523 | .prfchw, |
| 1463 | 1524 | .rdrnd, |
| 1464 | 1525 | .rdseed, |
| 1465 | 1526 | .sahf, |
| 1466 | 1527 | .slow_3ops_lea, |
| 1467 | 1528 | .sse4_2, |
| 1529 | .vzeroupper, | |
| 1468 | 1530 | .x87, |
| 1469 | 1531 | .xsave, |
| 1470 | 1532 | .xsavec, |
| ... | ... | @@ -1499,6 +1561,7 @@ pub const cpu = struct { |
| 1499 | 1561 | .slow_3ops_lea, |
| 1500 | 1562 | .slow_unaligned_mem_32, |
| 1501 | 1563 | .sse4_2, |
| 1564 | .vzeroupper, | |
| 1502 | 1565 | .x87, |
| 1503 | 1566 | .xsave, |
| 1504 | 1567 | .xsaveopt, |
| ... | ... | @@ -1540,6 +1603,7 @@ pub const cpu = struct { |
| 1540 | 1603 | .sahf, |
| 1541 | 1604 | .slow_3ops_lea, |
| 1542 | 1605 | .sse4_2, |
| 1606 | .vzeroupper, | |
| 1543 | 1607 | .x87, |
| 1544 | 1608 | .xsave, |
| 1545 | 1609 | .xsaveopt, |
| ... | ... | @@ -1560,6 +1624,7 @@ pub const cpu = struct { |
| 1560 | 1624 | .sahf, |
| 1561 | 1625 | .slow_unaligned_mem_16, |
| 1562 | 1626 | .ssse3, |
| 1627 | .vzeroupper, | |
| 1563 | 1628 | .x87, |
| 1564 | 1629 | }), |
| 1565 | 1630 | }; |
| ... | ... | @@ -1578,6 +1643,7 @@ pub const cpu = struct { |
| 1578 | 1643 | .popcnt, |
| 1579 | 1644 | .sahf, |
| 1580 | 1645 | .sse4_2, |
| 1646 | .vzeroupper, | |
| 1581 | 1647 | .x87, |
| 1582 | 1648 | }), |
| 1583 | 1649 | }; |
| ... | ... | @@ -1605,6 +1671,7 @@ pub const cpu = struct { |
| 1605 | 1671 | .slow_3ops_lea, |
| 1606 | 1672 | .slow_unaligned_mem_32, |
| 1607 | 1673 | .sse4_2, |
| 1674 | .vzeroupper, | |
| 1608 | 1675 | .x87, |
| 1609 | 1676 | .xsave, |
| 1610 | 1677 | .xsaveopt, |
| ... | ... | @@ -1616,6 +1683,7 @@ pub const cpu = struct { |
| 1616 | 1683 | .features = featureSet(&[_]Feature{ |
| 1617 | 1684 | .cx8, |
| 1618 | 1685 | .slow_unaligned_mem_16, |
| 1686 | .vzeroupper, | |
| 1619 | 1687 | .x87, |
| 1620 | 1688 | }), |
| 1621 | 1689 | }; |
| ... | ... | @@ -1626,6 +1694,7 @@ pub const cpu = struct { |
| 1626 | 1694 | .@"3dnowa", |
| 1627 | 1695 | .cx8, |
| 1628 | 1696 | .slow_unaligned_mem_16, |
| 1697 | .vzeroupper, | |
| 1629 | 1698 | .x87, |
| 1630 | 1699 | }), |
| 1631 | 1700 | }; |
| ... | ... | @@ -1644,7 +1713,6 @@ pub const cpu = struct { |
| 1644 | 1713 | .fxsr, |
| 1645 | 1714 | .mmx, |
| 1646 | 1715 | .movbe, |
| 1647 | .mpx, | |
| 1648 | 1716 | .nopl, |
| 1649 | 1717 | .pclmul, |
| 1650 | 1718 | .popcnt, |
| ... | ... | @@ -1658,6 +1726,8 @@ pub const cpu = struct { |
| 1658 | 1726 | .slow_two_mem_ops, |
| 1659 | 1727 | .sse4_2, |
| 1660 | 1728 | .ssse3, |
| 1729 | .use_glm_div_sqrt_costs, | |
| 1730 | .vzeroupper, | |
| 1661 | 1731 | .x87, |
| 1662 | 1732 | .xsave, |
| 1663 | 1733 | .xsavec, |
| ... | ... | @@ -1679,7 +1749,6 @@ pub const cpu = struct { |
| 1679 | 1749 | .fxsr, |
| 1680 | 1750 | .mmx, |
| 1681 | 1751 | .movbe, |
| 1682 | .mpx, | |
| 1683 | 1752 | .nopl, |
| 1684 | 1753 | .pclmul, |
| 1685 | 1754 | .popcnt, |
| ... | ... | @@ -1696,6 +1765,8 @@ pub const cpu = struct { |
| 1696 | 1765 | .slow_two_mem_ops, |
| 1697 | 1766 | .sse4_2, |
| 1698 | 1767 | .ssse3, |
| 1768 | .use_glm_div_sqrt_costs, | |
| 1769 | .vzeroupper, | |
| 1699 | 1770 | .x87, |
| 1700 | 1771 | .xsave, |
| 1701 | 1772 | .xsavec, |
| ... | ... | @@ -1739,6 +1810,7 @@ pub const cpu = struct { |
| 1739 | 1810 | .sahf, |
| 1740 | 1811 | .slow_3ops_lea, |
| 1741 | 1812 | .sse4_2, |
| 1813 | .vzeroupper, | |
| 1742 | 1814 | .x87, |
| 1743 | 1815 | .xsave, |
| 1744 | 1816 | .xsaveopt, |
| ... | ... | @@ -1749,6 +1821,7 @@ pub const cpu = struct { |
| 1749 | 1821 | .llvm_name = "i386", |
| 1750 | 1822 | .features = featureSet(&[_]Feature{ |
| 1751 | 1823 | .slow_unaligned_mem_16, |
| 1824 | .vzeroupper, | |
| 1752 | 1825 | .x87, |
| 1753 | 1826 | }), |
| 1754 | 1827 | }; |
| ... | ... | @@ -1757,6 +1830,7 @@ pub const cpu = struct { |
| 1757 | 1830 | .llvm_name = "i486", |
| 1758 | 1831 | .features = featureSet(&[_]Feature{ |
| 1759 | 1832 | .slow_unaligned_mem_16, |
| 1833 | .vzeroupper, | |
| 1760 | 1834 | .x87, |
| 1761 | 1835 | }), |
| 1762 | 1836 | }; |
| ... | ... | @@ -1766,6 +1840,7 @@ pub const cpu = struct { |
| 1766 | 1840 | .features = featureSet(&[_]Feature{ |
| 1767 | 1841 | .cx8, |
| 1768 | 1842 | .slow_unaligned_mem_16, |
| 1843 | .vzeroupper, | |
| 1769 | 1844 | .x87, |
| 1770 | 1845 | }), |
| 1771 | 1846 | }; |
| ... | ... | @@ -1776,6 +1851,7 @@ pub const cpu = struct { |
| 1776 | 1851 | .cmov, |
| 1777 | 1852 | .cx8, |
| 1778 | 1853 | .slow_unaligned_mem_16, |
| 1854 | .vzeroupper, | |
| 1779 | 1855 | .x87, |
| 1780 | 1856 | }), |
| 1781 | 1857 | }; |
| ... | ... | @@ -1824,11 +1900,11 @@ pub const cpu = struct { |
| 1824 | 1900 | .merge_to_threeway_branch, |
| 1825 | 1901 | .mmx, |
| 1826 | 1902 | .movbe, |
| 1827 | .mpx, | |
| 1828 | 1903 | .nopl, |
| 1829 | 1904 | .pclmul, |
| 1830 | 1905 | .pku, |
| 1831 | 1906 | .popcnt, |
| 1907 | .prefer_256_bit, | |
| 1832 | 1908 | .prfchw, |
| 1833 | 1909 | .rdpid, |
| 1834 | 1910 | .rdrnd, |
| ... | ... | @@ -1840,6 +1916,7 @@ pub const cpu = struct { |
| 1840 | 1916 | .sse4_2, |
| 1841 | 1917 | .vaes, |
| 1842 | 1918 | .vpclmulqdq, |
| 1919 | .vzeroupper, | |
| 1843 | 1920 | .x87, |
| 1844 | 1921 | .xsave, |
| 1845 | 1922 | .xsavec, |
| ... | ... | @@ -1892,12 +1969,12 @@ pub const cpu = struct { |
| 1892 | 1969 | .merge_to_threeway_branch, |
| 1893 | 1970 | .mmx, |
| 1894 | 1971 | .movbe, |
| 1895 | .mpx, | |
| 1896 | 1972 | .nopl, |
| 1897 | 1973 | .pclmul, |
| 1898 | 1974 | .pconfig, |
| 1899 | 1975 | .pku, |
| 1900 | 1976 | .popcnt, |
| 1977 | .prefer_256_bit, | |
| 1901 | 1978 | .prfchw, |
| 1902 | 1979 | .rdpid, |
| 1903 | 1980 | .rdrnd, |
| ... | ... | @@ -1909,6 +1986,7 @@ pub const cpu = struct { |
| 1909 | 1986 | .sse4_2, |
| 1910 | 1987 | .vaes, |
| 1911 | 1988 | .vpclmulqdq, |
| 1989 | .vzeroupper, | |
| 1912 | 1990 | .wbnoinvd, |
| 1913 | 1991 | .x87, |
| 1914 | 1992 | .xsave, |
| ... | ... | @@ -1944,6 +2022,7 @@ pub const cpu = struct { |
| 1944 | 2022 | .slow_3ops_lea, |
| 1945 | 2023 | .slow_unaligned_mem_32, |
| 1946 | 2024 | .sse4_2, |
| 2025 | .vzeroupper, | |
| 1947 | 2026 | .x87, |
| 1948 | 2027 | .xsave, |
| 1949 | 2028 | .xsaveopt, |
| ... | ... | @@ -1956,6 +2035,7 @@ pub const cpu = struct { |
| 1956 | 2035 | .cx8, |
| 1957 | 2036 | .mmx, |
| 1958 | 2037 | .slow_unaligned_mem_16, |
| 2038 | .vzeroupper, | |
| 1959 | 2039 | .x87, |
| 1960 | 2040 | }), |
| 1961 | 2041 | }; |
| ... | ... | @@ -1966,6 +2046,7 @@ pub const cpu = struct { |
| 1966 | 2046 | .@"3dnow", |
| 1967 | 2047 | .cx8, |
| 1968 | 2048 | .slow_unaligned_mem_16, |
| 2049 | .vzeroupper, | |
| 1969 | 2050 | .x87, |
| 1970 | 2051 | }), |
| 1971 | 2052 | }; |
| ... | ... | @@ -1976,6 +2057,7 @@ pub const cpu = struct { |
| 1976 | 2057 | .@"3dnow", |
| 1977 | 2058 | .cx8, |
| 1978 | 2059 | .slow_unaligned_mem_16, |
| 2060 | .vzeroupper, | |
| 1979 | 2061 | .x87, |
| 1980 | 2062 | }), |
| 1981 | 2063 | }; |
| ... | ... | @@ -1993,6 +2075,7 @@ pub const cpu = struct { |
| 1993 | 2075 | .slow_shld, |
| 1994 | 2076 | .slow_unaligned_mem_16, |
| 1995 | 2077 | .sse2, |
| 2078 | .vzeroupper, | |
| 1996 | 2079 | .x87, |
| 1997 | 2080 | }), |
| 1998 | 2081 | }; |
| ... | ... | @@ -2011,6 +2094,7 @@ pub const cpu = struct { |
| 2011 | 2094 | .slow_shld, |
| 2012 | 2095 | .slow_unaligned_mem_16, |
| 2013 | 2096 | .sse3, |
| 2097 | .vzeroupper, | |
| 2014 | 2098 | .x87, |
| 2015 | 2099 | }), |
| 2016 | 2100 | }; |
| ... | ... | @@ -2032,7 +2116,6 @@ pub const cpu = struct { |
| 2032 | 2116 | .cx8, |
| 2033 | 2117 | .f16c, |
| 2034 | 2118 | .fast_gather, |
| 2035 | .fast_partial_ymm_or_zmm_write, | |
| 2036 | 2119 | .fma, |
| 2037 | 2120 | .fsgsbase, |
| 2038 | 2121 | .fxsr, |
| ... | ... | @@ -2043,6 +2126,7 @@ pub const cpu = struct { |
| 2043 | 2126 | .nopl, |
| 2044 | 2127 | .pclmul, |
| 2045 | 2128 | .popcnt, |
| 2129 | .prefer_mask_registers, | |
| 2046 | 2130 | .prefetchwt1, |
| 2047 | 2131 | .prfchw, |
| 2048 | 2132 | .rdrnd, |
| ... | ... | @@ -2076,7 +2160,6 @@ pub const cpu = struct { |
| 2076 | 2160 | .cx8, |
| 2077 | 2161 | .f16c, |
| 2078 | 2162 | .fast_gather, |
| 2079 | .fast_partial_ymm_or_zmm_write, | |
| 2080 | 2163 | .fma, |
| 2081 | 2164 | .fsgsbase, |
| 2082 | 2165 | .fxsr, |
| ... | ... | @@ -2087,6 +2170,7 @@ pub const cpu = struct { |
| 2087 | 2170 | .nopl, |
| 2088 | 2171 | .pclmul, |
| 2089 | 2172 | .popcnt, |
| 2173 | .prefer_mask_registers, | |
| 2090 | 2174 | .prefetchwt1, |
| 2091 | 2175 | .prfchw, |
| 2092 | 2176 | .rdrnd, |
| ... | ... | @@ -2104,7 +2188,9 @@ pub const cpu = struct { |
| 2104 | 2188 | pub const lakemont = Cpu{ |
| 2105 | 2189 | .name = "lakemont", |
| 2106 | 2190 | .llvm_name = "lakemont", |
| 2107 | .features = featureSet(&[_]Feature{}), | |
| 2191 | .features = featureSet(&[_]Feature{ | |
| 2192 | .vzeroupper, | |
| 2193 | }), | |
| 2108 | 2194 | }; |
| 2109 | 2195 | pub const nehalem = Cpu{ |
| 2110 | 2196 | .name = "nehalem", |
| ... | ... | @@ -2121,6 +2207,7 @@ pub const cpu = struct { |
| 2121 | 2207 | .popcnt, |
| 2122 | 2208 | .sahf, |
| 2123 | 2209 | .sse4_2, |
| 2210 | .vzeroupper, | |
| 2124 | 2211 | .x87, |
| 2125 | 2212 | }), |
| 2126 | 2213 | }; |
| ... | ... | @@ -2137,6 +2224,7 @@ pub const cpu = struct { |
| 2137 | 2224 | .nopl, |
| 2138 | 2225 | .slow_unaligned_mem_16, |
| 2139 | 2226 | .sse3, |
| 2227 | .vzeroupper, | |
| 2140 | 2228 | .x87, |
| 2141 | 2229 | }), |
| 2142 | 2230 | }; |
| ... | ... | @@ -2154,6 +2242,7 @@ pub const cpu = struct { |
| 2154 | 2242 | .slow_shld, |
| 2155 | 2243 | .slow_unaligned_mem_16, |
| 2156 | 2244 | .sse2, |
| 2245 | .vzeroupper, | |
| 2157 | 2246 | .x87, |
| 2158 | 2247 | }), |
| 2159 | 2248 | }; |
| ... | ... | @@ -2172,6 +2261,7 @@ pub const cpu = struct { |
| 2172 | 2261 | .slow_shld, |
| 2173 | 2262 | .slow_unaligned_mem_16, |
| 2174 | 2263 | .sse3, |
| 2264 | .vzeroupper, | |
| 2175 | 2265 | .x87, |
| 2176 | 2266 | }), |
| 2177 | 2267 | }; |
| ... | ... | @@ -2190,6 +2280,7 @@ pub const cpu = struct { |
| 2190 | 2280 | .sahf, |
| 2191 | 2281 | .slow_unaligned_mem_16, |
| 2192 | 2282 | .sse4_1, |
| 2283 | .vzeroupper, | |
| 2193 | 2284 | .x87, |
| 2194 | 2285 | }), |
| 2195 | 2286 | }; |
| ... | ... | @@ -2199,6 +2290,7 @@ pub const cpu = struct { |
| 2199 | 2290 | .features = featureSet(&[_]Feature{ |
| 2200 | 2291 | .cx8, |
| 2201 | 2292 | .slow_unaligned_mem_16, |
| 2293 | .vzeroupper, | |
| 2202 | 2294 | .x87, |
| 2203 | 2295 | }), |
| 2204 | 2296 | }; |
| ... | ... | @@ -2213,6 +2305,7 @@ pub const cpu = struct { |
| 2213 | 2305 | .nopl, |
| 2214 | 2306 | .slow_unaligned_mem_16, |
| 2215 | 2307 | .sse2, |
| 2308 | .vzeroupper, | |
| 2216 | 2309 | .x87, |
| 2217 | 2310 | }), |
| 2218 | 2311 | }; |
| ... | ... | @@ -2223,6 +2316,7 @@ pub const cpu = struct { |
| 2223 | 2316 | .cx8, |
| 2224 | 2317 | .mmx, |
| 2225 | 2318 | .slow_unaligned_mem_16, |
| 2319 | .vzeroupper, | |
| 2226 | 2320 | .x87, |
| 2227 | 2321 | }), |
| 2228 | 2322 | }; |
| ... | ... | @@ -2236,6 +2330,7 @@ pub const cpu = struct { |
| 2236 | 2330 | .mmx, |
| 2237 | 2331 | .nopl, |
| 2238 | 2332 | .slow_unaligned_mem_16, |
| 2333 | .vzeroupper, | |
| 2239 | 2334 | .x87, |
| 2240 | 2335 | }), |
| 2241 | 2336 | }; |
| ... | ... | @@ -2250,6 +2345,7 @@ pub const cpu = struct { |
| 2250 | 2345 | .nopl, |
| 2251 | 2346 | .slow_unaligned_mem_16, |
| 2252 | 2347 | .sse, |
| 2348 | .vzeroupper, | |
| 2253 | 2349 | .x87, |
| 2254 | 2350 | }), |
| 2255 | 2351 | }; |
| ... | ... | @@ -2264,6 +2360,7 @@ pub const cpu = struct { |
| 2264 | 2360 | .nopl, |
| 2265 | 2361 | .slow_unaligned_mem_16, |
| 2266 | 2362 | .sse, |
| 2363 | .vzeroupper, | |
| 2267 | 2364 | .x87, |
| 2268 | 2365 | }), |
| 2269 | 2366 | }; |
| ... | ... | @@ -2278,6 +2375,7 @@ pub const cpu = struct { |
| 2278 | 2375 | .nopl, |
| 2279 | 2376 | .slow_unaligned_mem_16, |
| 2280 | 2377 | .sse2, |
| 2378 | .vzeroupper, | |
| 2281 | 2379 | .x87, |
| 2282 | 2380 | }), |
| 2283 | 2381 | }; |
| ... | ... | @@ -2292,6 +2390,7 @@ pub const cpu = struct { |
| 2292 | 2390 | .nopl, |
| 2293 | 2391 | .slow_unaligned_mem_16, |
| 2294 | 2392 | .sse2, |
| 2393 | .vzeroupper, | |
| 2295 | 2394 | .x87, |
| 2296 | 2395 | }), |
| 2297 | 2396 | }; |
| ... | ... | @@ -2303,6 +2402,7 @@ pub const cpu = struct { |
| 2303 | 2402 | .cx8, |
| 2304 | 2403 | .nopl, |
| 2305 | 2404 | .slow_unaligned_mem_16, |
| 2405 | .vzeroupper, | |
| 2306 | 2406 | .x87, |
| 2307 | 2407 | }), |
| 2308 | 2408 | }; |
| ... | ... | @@ -2317,6 +2417,7 @@ pub const cpu = struct { |
| 2317 | 2417 | .nopl, |
| 2318 | 2418 | .slow_unaligned_mem_16, |
| 2319 | 2419 | .sse3, |
| 2420 | .vzeroupper, | |
| 2320 | 2421 | .x87, |
| 2321 | 2422 | }), |
| 2322 | 2423 | }; |
| ... | ... | @@ -2344,6 +2445,7 @@ pub const cpu = struct { |
| 2344 | 2445 | .slow_3ops_lea, |
| 2345 | 2446 | .slow_unaligned_mem_32, |
| 2346 | 2447 | .sse4_2, |
| 2448 | .vzeroupper, | |
| 2347 | 2449 | .x87, |
| 2348 | 2450 | .xsave, |
| 2349 | 2451 | .xsaveopt, |
| ... | ... | @@ -2374,6 +2476,7 @@ pub const cpu = struct { |
| 2374 | 2476 | .slow_two_mem_ops, |
| 2375 | 2477 | .sse4_2, |
| 2376 | 2478 | .ssse3, |
| 2479 | .vzeroupper, | |
| 2377 | 2480 | .x87, |
| 2378 | 2481 | }), |
| 2379 | 2482 | }; |
| ... | ... | @@ -2416,17 +2519,18 @@ pub const cpu = struct { |
| 2416 | 2519 | .merge_to_threeway_branch, |
| 2417 | 2520 | .mmx, |
| 2418 | 2521 | .movbe, |
| 2419 | .mpx, | |
| 2420 | 2522 | .nopl, |
| 2421 | 2523 | .pclmul, |
| 2422 | 2524 | .pku, |
| 2423 | 2525 | .popcnt, |
| 2526 | .prefer_256_bit, | |
| 2424 | 2527 | .prfchw, |
| 2425 | 2528 | .rdrnd, |
| 2426 | 2529 | .rdseed, |
| 2427 | 2530 | .sahf, |
| 2428 | 2531 | .slow_3ops_lea, |
| 2429 | 2532 | .sse4_2, |
| 2533 | .vzeroupper, | |
| 2430 | 2534 | .x87, |
| 2431 | 2535 | .xsave, |
| 2432 | 2536 | .xsavec, |
| ... | ... | @@ -2467,7 +2571,6 @@ pub const cpu = struct { |
| 2467 | 2571 | .merge_to_threeway_branch, |
| 2468 | 2572 | .mmx, |
| 2469 | 2573 | .movbe, |
| 2470 | .mpx, | |
| 2471 | 2574 | .nopl, |
| 2472 | 2575 | .pclmul, |
| 2473 | 2576 | .popcnt, |
| ... | ... | @@ -2478,6 +2581,7 @@ pub const cpu = struct { |
| 2478 | 2581 | .sgx, |
| 2479 | 2582 | .slow_3ops_lea, |
| 2480 | 2583 | .sse4_2, |
| 2584 | .vzeroupper, | |
| 2481 | 2585 | .x87, |
| 2482 | 2586 | .xsave, |
| 2483 | 2587 | .xsavec, |
| ... | ... | @@ -2524,17 +2628,18 @@ pub const cpu = struct { |
| 2524 | 2628 | .merge_to_threeway_branch, |
| 2525 | 2629 | .mmx, |
| 2526 | 2630 | .movbe, |
| 2527 | .mpx, | |
| 2528 | 2631 | .nopl, |
| 2529 | 2632 | .pclmul, |
| 2530 | 2633 | .pku, |
| 2531 | 2634 | .popcnt, |
| 2635 | .prefer_256_bit, | |
| 2532 | 2636 | .prfchw, |
| 2533 | 2637 | .rdrnd, |
| 2534 | 2638 | .rdseed, |
| 2535 | 2639 | .sahf, |
| 2536 | 2640 | .slow_3ops_lea, |
| 2537 | 2641 | .sse4_2, |
| 2642 | .vzeroupper, | |
| 2538 | 2643 | .x87, |
| 2539 | 2644 | .xsave, |
| 2540 | 2645 | .xsavec, |
| ... | ... | @@ -2567,7 +2672,81 @@ pub const cpu = struct { |
| 2567 | 2672 | .slow_two_mem_ops, |
| 2568 | 2673 | .sse4_2, |
| 2569 | 2674 | .ssse3, |
| 2675 | .vzeroupper, | |
| 2676 | .x87, | |
| 2677 | }), | |
| 2678 | }; | |
| 2679 | pub const tigerlake = Cpu{ | |
| 2680 | .name = "tigerlake", | |
| 2681 | .llvm_name = "tigerlake", | |
| 2682 | .features = featureSet(&[_]Feature{ | |
| 2683 | .@"64bit", | |
| 2684 | .adx, | |
| 2685 | .aes, | |
| 2686 | .avx, | |
| 2687 | .avx2, | |
| 2688 | .avx512bitalg, | |
| 2689 | .avx512bw, | |
| 2690 | .avx512cd, | |
| 2691 | .avx512dq, | |
| 2692 | .avx512f, | |
| 2693 | .avx512ifma, | |
| 2694 | .avx512vbmi, | |
| 2695 | .avx512vbmi2, | |
| 2696 | .avx512vl, | |
| 2697 | .avx512vnni, | |
| 2698 | .avx512vp2intersect, | |
| 2699 | .avx512vpopcntdq, | |
| 2700 | .bmi, | |
| 2701 | .bmi2, | |
| 2702 | .clflushopt, | |
| 2703 | .clwb, | |
| 2704 | .cmov, | |
| 2705 | .cx16, | |
| 2706 | .cx8, | |
| 2707 | .ermsb, | |
| 2708 | .f16c, | |
| 2709 | .fast_gather, | |
| 2710 | .fast_scalar_fsqrt, | |
| 2711 | .fast_shld_rotate, | |
| 2712 | .fast_variable_shuffle, | |
| 2713 | .fast_vector_fsqrt, | |
| 2714 | .fma, | |
| 2715 | .fsgsbase, | |
| 2716 | .fxsr, | |
| 2717 | .gfni, | |
| 2718 | .idivq_to_divl, | |
| 2719 | .invpcid, | |
| 2720 | .lzcnt, | |
| 2721 | .macrofusion, | |
| 2722 | .merge_to_threeway_branch, | |
| 2723 | .mmx, | |
| 2724 | .movbe, | |
| 2725 | .movdir64b, | |
| 2726 | .movdiri, | |
| 2727 | .nopl, | |
| 2728 | .pclmul, | |
| 2729 | .pku, | |
| 2730 | .popcnt, | |
| 2731 | .prefer_256_bit, | |
| 2732 | .prfchw, | |
| 2733 | .rdpid, | |
| 2734 | .rdrnd, | |
| 2735 | .rdseed, | |
| 2736 | .sahf, | |
| 2737 | .sgx, | |
| 2738 | .sha, | |
| 2739 | .shstk, | |
| 2740 | .slow_3ops_lea, | |
| 2741 | .sse4_2, | |
| 2742 | .vaes, | |
| 2743 | .vpclmulqdq, | |
| 2744 | .vzeroupper, | |
| 2570 | 2745 | .x87, |
| 2746 | .xsave, | |
| 2747 | .xsavec, | |
| 2748 | .xsaveopt, | |
| 2749 | .xsaves, | |
| 2571 | 2750 | }), |
| 2572 | 2751 | }; |
| 2573 | 2752 | pub const tremont = Cpu{ |
| ... | ... | @@ -2588,7 +2767,6 @@ pub const cpu = struct { |
| 2588 | 2767 | .movbe, |
| 2589 | 2768 | .movdir64b, |
| 2590 | 2769 | .movdiri, |
| 2591 | .mpx, | |
| 2592 | 2770 | .nopl, |
| 2593 | 2771 | .pclmul, |
| 2594 | 2772 | .popcnt, |
| ... | ... | @@ -2605,6 +2783,8 @@ pub const cpu = struct { |
| 2605 | 2783 | .slow_two_mem_ops, |
| 2606 | 2784 | .sse4_2, |
| 2607 | 2785 | .ssse3, |
| 2786 | .use_glm_div_sqrt_costs, | |
| 2787 | .vzeroupper, | |
| 2608 | 2788 | .waitpkg, |
| 2609 | 2789 | .x87, |
| 2610 | 2790 | .xsave, |
| ... | ... | @@ -2629,6 +2809,7 @@ pub const cpu = struct { |
| 2629 | 2809 | .popcnt, |
| 2630 | 2810 | .sahf, |
| 2631 | 2811 | .sse4_2, |
| 2812 | .vzeroupper, | |
| 2632 | 2813 | .x87, |
| 2633 | 2814 | }), |
| 2634 | 2815 | }; |
| ... | ... | @@ -2638,6 +2819,7 @@ pub const cpu = struct { |
| 2638 | 2819 | .features = featureSet(&[_]Feature{ |
| 2639 | 2820 | .mmx, |
| 2640 | 2821 | .slow_unaligned_mem_16, |
| 2822 | .vzeroupper, | |
| 2641 | 2823 | .x87, |
| 2642 | 2824 | }), |
| 2643 | 2825 | }; |
| ... | ... | @@ -2647,6 +2829,7 @@ pub const cpu = struct { |
| 2647 | 2829 | .features = featureSet(&[_]Feature{ |
| 2648 | 2830 | .@"3dnow", |
| 2649 | 2831 | .slow_unaligned_mem_16, |
| 2832 | .vzeroupper, | |
| 2650 | 2833 | .x87, |
| 2651 | 2834 | }), |
| 2652 | 2835 | }; |
| ... | ... | @@ -2664,6 +2847,7 @@ pub const cpu = struct { |
| 2664 | 2847 | .slow_3ops_lea, |
| 2665 | 2848 | .slow_incdec, |
| 2666 | 2849 | .sse2, |
| 2850 | .vzeroupper, | |
| 2667 | 2851 | .x87, |
| 2668 | 2852 | }), |
| 2669 | 2853 | }; |
| ... | ... | @@ -2678,6 +2862,7 @@ pub const cpu = struct { |
| 2678 | 2862 | .nopl, |
| 2679 | 2863 | .slow_unaligned_mem_16, |
| 2680 | 2864 | .sse3, |
| 2865 | .vzeroupper, | |
| 2681 | 2866 | .x87, |
| 2682 | 2867 | }), |
| 2683 | 2868 | }; |
| ... | ... | @@ -2718,6 +2903,7 @@ pub const cpu = struct { |
| 2718 | 2903 | .sha, |
| 2719 | 2904 | .slow_shld, |
| 2720 | 2905 | .sse4a, |
| 2906 | .vzeroupper, | |
| 2721 | 2907 | .x87, |
| 2722 | 2908 | .xsave, |
| 2723 | 2909 | .xsavec, |
| ... | ... | @@ -2764,6 +2950,7 @@ pub const cpu = struct { |
| 2764 | 2950 | .sha, |
| 2765 | 2951 | .slow_shld, |
| 2766 | 2952 | .sse4a, |
| 2953 | .vzeroupper, | |
| 2767 | 2954 | .wbnoinvd, |
| 2768 | 2955 | .x87, |
| 2769 | 2956 | .xsave, |
| ... | ... | @@ -2848,6 +3035,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 2848 | 3035 | &cpu.skylake, |
| 2849 | 3036 | &cpu.skylake_avx512, |
| 2850 | 3037 | &cpu.slm, |
| 3038 | &cpu.tigerlake, | |
| 2851 | 3039 | &cpu.tremont, |
| 2852 | 3040 | &cpu.westmere, |
| 2853 | 3041 | &cpu.winchip_c6, |