| ... | ... | @@ -2,14 +2,6 @@ const std = @import("../std.zig"); |
| 2 | 2 | const Cpu = std.Target.Cpu; |
| 3 | 3 | |
| 4 | 4 | pub const Feature = enum { |
| 5 | | a35, |
| 6 | | a53, |
| 7 | | a55, |
| 8 | | a57, |
| 9 | | a72, |
| 10 | | a73, |
| 11 | | a75, |
| 12 | | a76, |
| 13 | 5 | aes, |
| 14 | 6 | aggressive_fma, |
| 15 | 7 | alternate_sextload_cvt_f32_pattern, |
| ... | ... | @@ -35,16 +27,10 @@ pub const Feature = enum { |
| 35 | 27 | crc, |
| 36 | 28 | crypto, |
| 37 | 29 | custom_cheap_as_move, |
| 38 | | cyclone, |
| 39 | 30 | disable_latency_sched_heuristic, |
| 40 | 31 | dit, |
| 41 | 32 | dotprod, |
| 42 | 33 | exynos_cheap_as_move, |
| 43 | | exynosm1, |
| 44 | | exynosm2, |
| 45 | | exynosm3, |
| 46 | | exynosm4, |
| 47 | | falkor, |
| 48 | 34 | fmi, |
| 49 | 35 | force_32bit_jump_tables, |
| 50 | 36 | fp_armv8, |
| ... | ... | @@ -58,7 +44,6 @@ pub const Feature = enum { |
| 58 | 44 | fuse_csel, |
| 59 | 45 | fuse_literals, |
| 60 | 46 | jsconv, |
| 61 | | kryo, |
| 62 | 47 | lor, |
| 63 | 48 | lse, |
| 64 | 49 | lsl_fast, |
| ... | ... | @@ -103,7 +88,6 @@ pub const Feature = enum { |
| 103 | 88 | reserve_x6, |
| 104 | 89 | reserve_x7, |
| 105 | 90 | reserve_x9, |
| 106 | | saphira, |
| 107 | 91 | sb, |
| 108 | 92 | sel2, |
| 109 | 93 | sha2, |
| ... | ... | @@ -122,17 +106,11 @@ pub const Feature = enum { |
| 122 | 106 | sve2_bitperm, |
| 123 | 107 | sve2_sha3, |
| 124 | 108 | sve2_sm4, |
| 125 | | thunderx, |
| 126 | | thunderx2t99, |
| 127 | | thunderxt81, |
| 128 | | thunderxt83, |
| 129 | | thunderxt88, |
| 130 | 109 | tlb_rmi, |
| 131 | 110 | tpidr_el1, |
| 132 | 111 | tpidr_el2, |
| 133 | 112 | tpidr_el3, |
| 134 | 113 | tracev8_4, |
| 135 | | tsv110, |
| 136 | 114 | uaops, |
| 137 | 115 | use_aa, |
| 138 | 116 | use_postra_scheduler, |
| ... | ... | @@ -156,134 +134,6 @@ pub const all_features = blk: { |
| 156 | 134 | const len = @typeInfo(Feature).Enum.fields.len; |
| 157 | 135 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); |
| 158 | 136 | var result: [len]Cpu.Feature = undefined; |
| 159 | | result[@enumToInt(Feature.a35)] = .{ |
| 160 | | .index = @enumToInt(Feature.a35), |
| 161 | | .name = @tagName(Feature.a35), |
| 162 | | .llvm_name = "a35", |
| 163 | | .description = "Cortex-A35 ARM processors", |
| 164 | | .dependencies = featureSet(&[_]Feature{ |
| 165 | | .crc, |
| 166 | | .crypto, |
| 167 | | .fp_armv8, |
| 168 | | .neon, |
| 169 | | .perfmon, |
| 170 | | }), |
| 171 | | }; |
| 172 | | result[@enumToInt(Feature.a53)] = .{ |
| 173 | | .index = @enumToInt(Feature.a53), |
| 174 | | .name = @tagName(Feature.a53), |
| 175 | | .llvm_name = "a53", |
| 176 | | .description = "Cortex-A53 ARM processors", |
| 177 | | .dependencies = featureSet(&[_]Feature{ |
| 178 | | .balance_fp_ops, |
| 179 | | .crc, |
| 180 | | .crypto, |
| 181 | | .custom_cheap_as_move, |
| 182 | | .fp_armv8, |
| 183 | | .fuse_aes, |
| 184 | | .neon, |
| 185 | | .perfmon, |
| 186 | | .use_aa, |
| 187 | | .use_postra_scheduler, |
| 188 | | }), |
| 189 | | }; |
| 190 | | result[@enumToInt(Feature.a55)] = .{ |
| 191 | | .index = @enumToInt(Feature.a55), |
| 192 | | .name = @tagName(Feature.a55), |
| 193 | | .llvm_name = "a55", |
| 194 | | .description = "Cortex-A55 ARM processors", |
| 195 | | .dependencies = featureSet(&[_]Feature{ |
| 196 | | .crypto, |
| 197 | | .dotprod, |
| 198 | | .fp_armv8, |
| 199 | | .fullfp16, |
| 200 | | .fuse_aes, |
| 201 | | .neon, |
| 202 | | .perfmon, |
| 203 | | .rcpc, |
| 204 | | .v8_2a, |
| 205 | | }), |
| 206 | | }; |
| 207 | | result[@enumToInt(Feature.a57)] = .{ |
| 208 | | .index = @enumToInt(Feature.a57), |
| 209 | | .name = @tagName(Feature.a57), |
| 210 | | .llvm_name = "a57", |
| 211 | | .description = "Cortex-A57 ARM processors", |
| 212 | | .dependencies = featureSet(&[_]Feature{ |
| 213 | | .balance_fp_ops, |
| 214 | | .crc, |
| 215 | | .crypto, |
| 216 | | .custom_cheap_as_move, |
| 217 | | .fp_armv8, |
| 218 | | .fuse_aes, |
| 219 | | .fuse_literals, |
| 220 | | .neon, |
| 221 | | .perfmon, |
| 222 | | .predictable_select_expensive, |
| 223 | | .use_postra_scheduler, |
| 224 | | }), |
| 225 | | }; |
| 226 | | result[@enumToInt(Feature.a72)] = .{ |
| 227 | | .index = @enumToInt(Feature.a72), |
| 228 | | .name = @tagName(Feature.a72), |
| 229 | | .llvm_name = "a72", |
| 230 | | .description = "Cortex-A72 ARM processors", |
| 231 | | .dependencies = featureSet(&[_]Feature{ |
| 232 | | .crc, |
| 233 | | .crypto, |
| 234 | | .fp_armv8, |
| 235 | | .fuse_aes, |
| 236 | | .neon, |
| 237 | | .perfmon, |
| 238 | | }), |
| 239 | | }; |
| 240 | | result[@enumToInt(Feature.a73)] = .{ |
| 241 | | .index = @enumToInt(Feature.a73), |
| 242 | | .name = @tagName(Feature.a73), |
| 243 | | .llvm_name = "a73", |
| 244 | | .description = "Cortex-A73 ARM processors", |
| 245 | | .dependencies = featureSet(&[_]Feature{ |
| 246 | | .crc, |
| 247 | | .crypto, |
| 248 | | .fp_armv8, |
| 249 | | .fuse_aes, |
| 250 | | .neon, |
| 251 | | .perfmon, |
| 252 | | }), |
| 253 | | }; |
| 254 | | result[@enumToInt(Feature.a75)] = .{ |
| 255 | | .index = @enumToInt(Feature.a75), |
| 256 | | .name = @tagName(Feature.a75), |
| 257 | | .llvm_name = "a75", |
| 258 | | .description = "Cortex-A75 ARM processors", |
| 259 | | .dependencies = featureSet(&[_]Feature{ |
| 260 | | .crypto, |
| 261 | | .dotprod, |
| 262 | | .fp_armv8, |
| 263 | | .fullfp16, |
| 264 | | .fuse_aes, |
| 265 | | .neon, |
| 266 | | .perfmon, |
| 267 | | .rcpc, |
| 268 | | .v8_2a, |
| 269 | | }), |
| 270 | | }; |
| 271 | | result[@enumToInt(Feature.a76)] = .{ |
| 272 | | .index = @enumToInt(Feature.a76), |
| 273 | | .name = @tagName(Feature.a76), |
| 274 | | .llvm_name = "a76", |
| 275 | | .description = "Cortex-A76 ARM processors", |
| 276 | | .dependencies = featureSet(&[_]Feature{ |
| 277 | | .crypto, |
| 278 | | .dotprod, |
| 279 | | .fp_armv8, |
| 280 | | .fullfp16, |
| 281 | | .neon, |
| 282 | | .rcpc, |
| 283 | | .ssbs, |
| 284 | | .v8_2a, |
| 285 | | }), |
| 286 | | }; |
| 287 | 137 | result[@enumToInt(Feature.aes)] = .{ |
| 288 | 138 | .index = @enumToInt(Feature.aes), |
| 289 | 139 | .name = @tagName(Feature.aes), |
| ... | ... | @@ -467,27 +317,6 @@ pub const all_features = blk: { |
| 467 | 317 | .description = "Use custom handling of cheap instructions", |
| 468 | 318 | .dependencies = 0, |
| 469 | 319 | }; |
| 470 | | result[@enumToInt(Feature.cyclone)] = .{ |
| 471 | | .index = @enumToInt(Feature.cyclone), |
| 472 | | .name = @tagName(Feature.cyclone), |
| 473 | | .llvm_name = "cyclone", |
| 474 | | .description = "Cyclone", |
| 475 | | .dependencies = featureSet(&[_]Feature{ |
| 476 | | .alternate_sextload_cvt_f32_pattern, |
| 477 | | .arith_bcc_fusion, |
| 478 | | .arith_cbz_fusion, |
| 479 | | .crypto, |
| 480 | | .disable_latency_sched_heuristic, |
| 481 | | .fp_armv8, |
| 482 | | .fuse_aes, |
| 483 | | .fuse_crypto_eor, |
| 484 | | .neon, |
| 485 | | .perfmon, |
| 486 | | .zcm, |
| 487 | | .zcz, |
| 488 | | .zcz_fp_workaround, |
| 489 | | }), |
| 490 | | }; |
| 491 | 320 | result[@enumToInt(Feature.disable_latency_sched_heuristic)] = .{ |
| 492 | 321 | .index = @enumToInt(Feature.disable_latency_sched_heuristic), |
| 493 | 322 | .name = @tagName(Feature.disable_latency_sched_heuristic), |
| ... | ... | @@ -518,109 +347,6 @@ pub const all_features = blk: { |
| 518 | 347 | .custom_cheap_as_move, |
| 519 | 348 | }), |
| 520 | 349 | }; |
| 521 | | result[@enumToInt(Feature.exynosm1)] = .{ |
| 522 | | .index = @enumToInt(Feature.exynosm1), |
| 523 | | .name = @tagName(Feature.exynosm1), |
| 524 | | .llvm_name = "exynosm1", |
| 525 | | .description = "Samsung Exynos-M1 processors", |
| 526 | | .dependencies = featureSet(&[_]Feature{ |
| 527 | | .crc, |
| 528 | | .crypto, |
| 529 | | .exynos_cheap_as_move, |
| 530 | | .force_32bit_jump_tables, |
| 531 | | .fuse_aes, |
| 532 | | .perfmon, |
| 533 | | .slow_misaligned_128store, |
| 534 | | .slow_paired_128, |
| 535 | | .use_postra_scheduler, |
| 536 | | .use_reciprocal_square_root, |
| 537 | | .zcz_fp, |
| 538 | | }), |
| 539 | | }; |
| 540 | | result[@enumToInt(Feature.exynosm2)] = .{ |
| 541 | | .index = @enumToInt(Feature.exynosm2), |
| 542 | | .name = @tagName(Feature.exynosm2), |
| 543 | | .llvm_name = "exynosm2", |
| 544 | | .description = "Samsung Exynos-M2 processors", |
| 545 | | .dependencies = featureSet(&[_]Feature{ |
| 546 | | .crc, |
| 547 | | .crypto, |
| 548 | | .exynos_cheap_as_move, |
| 549 | | .force_32bit_jump_tables, |
| 550 | | .fuse_aes, |
| 551 | | .perfmon, |
| 552 | | .slow_misaligned_128store, |
| 553 | | .slow_paired_128, |
| 554 | | .use_postra_scheduler, |
| 555 | | .zcz_fp, |
| 556 | | }), |
| 557 | | }; |
| 558 | | result[@enumToInt(Feature.exynosm3)] = .{ |
| 559 | | .index = @enumToInt(Feature.exynosm3), |
| 560 | | .name = @tagName(Feature.exynosm3), |
| 561 | | .llvm_name = "exynosm3", |
| 562 | | .description = "Samsung Exynos-M3 processors", |
| 563 | | .dependencies = featureSet(&[_]Feature{ |
| 564 | | .crc, |
| 565 | | .crypto, |
| 566 | | .exynos_cheap_as_move, |
| 567 | | .force_32bit_jump_tables, |
| 568 | | .fuse_address, |
| 569 | | .fuse_aes, |
| 570 | | .fuse_csel, |
| 571 | | .fuse_literals, |
| 572 | | .lsl_fast, |
| 573 | | .perfmon, |
| 574 | | .predictable_select_expensive, |
| 575 | | .use_postra_scheduler, |
| 576 | | .zcz_fp, |
| 577 | | }), |
| 578 | | }; |
| 579 | | result[@enumToInt(Feature.exynosm4)] = .{ |
| 580 | | .index = @enumToInt(Feature.exynosm4), |
| 581 | | .name = @tagName(Feature.exynosm4), |
| 582 | | .llvm_name = "exynosm4", |
| 583 | | .description = "Samsung Exynos-M4 processors", |
| 584 | | .dependencies = featureSet(&[_]Feature{ |
| 585 | | .arith_bcc_fusion, |
| 586 | | .arith_cbz_fusion, |
| 587 | | .crypto, |
| 588 | | .dotprod, |
| 589 | | .exynos_cheap_as_move, |
| 590 | | .force_32bit_jump_tables, |
| 591 | | .fullfp16, |
| 592 | | .fuse_address, |
| 593 | | .fuse_aes, |
| 594 | | .fuse_arith_logic, |
| 595 | | .fuse_csel, |
| 596 | | .fuse_literals, |
| 597 | | .lsl_fast, |
| 598 | | .perfmon, |
| 599 | | .use_postra_scheduler, |
| 600 | | .v8_2a, |
| 601 | | .zcz, |
| 602 | | }), |
| 603 | | }; |
| 604 | | result[@enumToInt(Feature.falkor)] = .{ |
| 605 | | .index = @enumToInt(Feature.falkor), |
| 606 | | .name = @tagName(Feature.falkor), |
| 607 | | .llvm_name = "falkor", |
| 608 | | .description = "Qualcomm Falkor processors", |
| 609 | | .dependencies = featureSet(&[_]Feature{ |
| 610 | | .crc, |
| 611 | | .crypto, |
| 612 | | .custom_cheap_as_move, |
| 613 | | .fp_armv8, |
| 614 | | .lsl_fast, |
| 615 | | .neon, |
| 616 | | .perfmon, |
| 617 | | .predictable_select_expensive, |
| 618 | | .rdm, |
| 619 | | .slow_strqro_store, |
| 620 | | .use_postra_scheduler, |
| 621 | | .zcz, |
| 622 | | }), |
| 623 | | }; |
| 624 | 350 | result[@enumToInt(Feature.fmi)] = .{ |
| 625 | 351 | .index = @enumToInt(Feature.fmi), |
| 626 | 352 | .name = @tagName(Feature.fmi), |
| ... | ... | @@ -718,24 +444,6 @@ pub const all_features = blk: { |
| 718 | 444 | .fp_armv8, |
| 719 | 445 | }), |
| 720 | 446 | }; |
| 721 | | result[@enumToInt(Feature.kryo)] = .{ |
| 722 | | .index = @enumToInt(Feature.kryo), |
| 723 | | .name = @tagName(Feature.kryo), |
| 724 | | .llvm_name = "kryo", |
| 725 | | .description = "Qualcomm Kryo processors", |
| 726 | | .dependencies = featureSet(&[_]Feature{ |
| 727 | | .crc, |
| 728 | | .crypto, |
| 729 | | .custom_cheap_as_move, |
| 730 | | .fp_armv8, |
| 731 | | .lsl_fast, |
| 732 | | .neon, |
| 733 | | .perfmon, |
| 734 | | .predictable_select_expensive, |
| 735 | | .use_postra_scheduler, |
| 736 | | .zcz, |
| 737 | | }), |
| 738 | | }; |
| 739 | 447 | result[@enumToInt(Feature.lor)] = .{ |
| 740 | 448 | .index = @enumToInt(Feature.lor), |
| 741 | 449 | .name = @tagName(Feature.lor), |
| ... | ... | @@ -1052,25 +760,6 @@ pub const all_features = blk: { |
| 1052 | 760 | .description = "Reserve X9, making it unavailable as a GPR", |
| 1053 | 761 | .dependencies = 0, |
| 1054 | 762 | }; |
| 1055 | | result[@enumToInt(Feature.saphira)] = .{ |
| 1056 | | .index = @enumToInt(Feature.saphira), |
| 1057 | | .name = @tagName(Feature.saphira), |
| 1058 | | .llvm_name = "saphira", |
| 1059 | | .description = "Qualcomm Saphira processors", |
| 1060 | | .dependencies = featureSet(&[_]Feature{ |
| 1061 | | .crypto, |
| 1062 | | .custom_cheap_as_move, |
| 1063 | | .fp_armv8, |
| 1064 | | .lsl_fast, |
| 1065 | | .neon, |
| 1066 | | .perfmon, |
| 1067 | | .predictable_select_expensive, |
| 1068 | | .spe, |
| 1069 | | .use_postra_scheduler, |
| 1070 | | .v8_4a, |
| 1071 | | .zcz, |
| 1072 | | }), |
| 1073 | | }; |
| 1074 | 763 | result[@enumToInt(Feature.sb)] = .{ |
| 1075 | 764 | .index = @enumToInt(Feature.sb), |
| 1076 | 765 | .name = @tagName(Feature.sb), |
| ... | ... | @@ -1217,97 +906,19 @@ pub const all_features = blk: { |
| 1217 | 906 | .sve2, |
| 1218 | 907 | }), |
| 1219 | 908 | }; |
| 1220 | | result[@enumToInt(Feature.thunderx)] = .{ |
| 1221 | | .index = @enumToInt(Feature.thunderx), |
| 1222 | | .name = @tagName(Feature.thunderx), |
| 1223 | | .llvm_name = "thunderx", |
| 1224 | | .description = "Cavium ThunderX processors", |
| 1225 | | .dependencies = featureSet(&[_]Feature{ |
| 1226 | | .crc, |
| 1227 | | .crypto, |
| 1228 | | .fp_armv8, |
| 1229 | | .neon, |
| 1230 | | .perfmon, |
| 1231 | | .predictable_select_expensive, |
| 1232 | | .use_postra_scheduler, |
| 1233 | | }), |
| 909 | result[@enumToInt(Feature.tlb_rmi)] = .{ |
| 910 | .index = @enumToInt(Feature.tlb_rmi), |
| 911 | .name = @tagName(Feature.tlb_rmi), |
| 912 | .llvm_name = "tlb-rmi", |
| 913 | .description = "Enable v8.4-A TLB Range and Maintenance Instructions", |
| 914 | .dependencies = 0, |
| 1234 | 915 | }; |
| 1235 | | result[@enumToInt(Feature.thunderx2t99)] = .{ |
| 1236 | | .index = @enumToInt(Feature.thunderx2t99), |
| 1237 | | .name = @tagName(Feature.thunderx2t99), |
| 1238 | | .llvm_name = "thunderx2t99", |
| 1239 | | .description = "Cavium ThunderX2 processors", |
| 1240 | | .dependencies = featureSet(&[_]Feature{ |
| 1241 | | .aggressive_fma, |
| 1242 | | .arith_bcc_fusion, |
| 1243 | | .crc, |
| 1244 | | .crypto, |
| 1245 | | .fp_armv8, |
| 1246 | | .lse, |
| 1247 | | .neon, |
| 1248 | | .predictable_select_expensive, |
| 1249 | | .use_postra_scheduler, |
| 1250 | | .v8_1a, |
| 1251 | | }), |
| 1252 | | }; |
| 1253 | | result[@enumToInt(Feature.thunderxt81)] = .{ |
| 1254 | | .index = @enumToInt(Feature.thunderxt81), |
| 1255 | | .name = @tagName(Feature.thunderxt81), |
| 1256 | | .llvm_name = "thunderxt81", |
| 1257 | | .description = "Cavium ThunderX processors", |
| 1258 | | .dependencies = featureSet(&[_]Feature{ |
| 1259 | | .crc, |
| 1260 | | .crypto, |
| 1261 | | .fp_armv8, |
| 1262 | | .neon, |
| 1263 | | .perfmon, |
| 1264 | | .predictable_select_expensive, |
| 1265 | | .use_postra_scheduler, |
| 1266 | | }), |
| 1267 | | }; |
| 1268 | | result[@enumToInt(Feature.thunderxt83)] = .{ |
| 1269 | | .index = @enumToInt(Feature.thunderxt83), |
| 1270 | | .name = @tagName(Feature.thunderxt83), |
| 1271 | | .llvm_name = "thunderxt83", |
| 1272 | | .description = "Cavium ThunderX processors", |
| 1273 | | .dependencies = featureSet(&[_]Feature{ |
| 1274 | | .crc, |
| 1275 | | .crypto, |
| 1276 | | .fp_armv8, |
| 1277 | | .neon, |
| 1278 | | .perfmon, |
| 1279 | | .predictable_select_expensive, |
| 1280 | | .use_postra_scheduler, |
| 1281 | | }), |
| 1282 | | }; |
| 1283 | | result[@enumToInt(Feature.thunderxt88)] = .{ |
| 1284 | | .index = @enumToInt(Feature.thunderxt88), |
| 1285 | | .name = @tagName(Feature.thunderxt88), |
| 1286 | | .llvm_name = "thunderxt88", |
| 1287 | | .description = "Cavium ThunderX processors", |
| 1288 | | .dependencies = featureSet(&[_]Feature{ |
| 1289 | | .crc, |
| 1290 | | .crypto, |
| 1291 | | .fp_armv8, |
| 1292 | | .neon, |
| 1293 | | .perfmon, |
| 1294 | | .predictable_select_expensive, |
| 1295 | | .use_postra_scheduler, |
| 1296 | | }), |
| 1297 | | }; |
| 1298 | | result[@enumToInt(Feature.tlb_rmi)] = .{ |
| 1299 | | .index = @enumToInt(Feature.tlb_rmi), |
| 1300 | | .name = @tagName(Feature.tlb_rmi), |
| 1301 | | .llvm_name = "tlb-rmi", |
| 1302 | | .description = "Enable v8.4-A TLB Range and Maintenance Instructions", |
| 1303 | | .dependencies = 0, |
| 1304 | | }; |
| 1305 | | result[@enumToInt(Feature.tpidr_el1)] = .{ |
| 1306 | | .index = @enumToInt(Feature.tpidr_el1), |
| 1307 | | .name = @tagName(Feature.tpidr_el1), |
| 1308 | | .llvm_name = "tpidr-el1", |
| 1309 | | .description = "Permit use of TPIDR_EL1 for the TLS base", |
| 1310 | | .dependencies = 0, |
| 916 | result[@enumToInt(Feature.tpidr_el1)] = .{ |
| 917 | .index = @enumToInt(Feature.tpidr_el1), |
| 918 | .name = @tagName(Feature.tpidr_el1), |
| 919 | .llvm_name = "tpidr-el1", |
| 920 | .description = "Permit use of TPIDR_EL1 for the TLS base", |
| 921 | .dependencies = 0, |
| 1311 | 922 | }; |
| 1312 | 923 | result[@enumToInt(Feature.tpidr_el2)] = .{ |
| 1313 | 924 | .index = @enumToInt(Feature.tpidr_el2), |
| ... | ... | @@ -1330,26 +941,6 @@ pub const all_features = blk: { |
| 1330 | 941 | .description = "Enable v8.4-A Trace extension", |
| 1331 | 942 | .dependencies = 0, |
| 1332 | 943 | }; |
| 1333 | | result[@enumToInt(Feature.tsv110)] = .{ |
| 1334 | | .index = @enumToInt(Feature.tsv110), |
| 1335 | | .name = @tagName(Feature.tsv110), |
| 1336 | | .llvm_name = "tsv110", |
| 1337 | | .description = "HiSilicon TS-V110 processors", |
| 1338 | | .dependencies = featureSet(&[_]Feature{ |
| 1339 | | .crypto, |
| 1340 | | .custom_cheap_as_move, |
| 1341 | | .dotprod, |
| 1342 | | .fp_armv8, |
| 1343 | | .fp16fml, |
| 1344 | | .fullfp16, |
| 1345 | | .fuse_aes, |
| 1346 | | .neon, |
| 1347 | | .perfmon, |
| 1348 | | .spe, |
| 1349 | | .use_postra_scheduler, |
| 1350 | | .v8_2a, |
| 1351 | | }), |
| 1352 | | }; |
| 1353 | 944 | result[@enumToInt(Feature.uaops)] = .{ |
| 1354 | 945 | .index = @enumToInt(Feature.uaops), |
| 1355 | 946 | .name = @tagName(Feature.uaops), |
| ... | ... | @@ -1505,123 +1096,265 @@ pub const all_features = blk: { |
| 1505 | 1096 | }; |
| 1506 | 1097 | |
| 1507 | 1098 | pub const cpu = struct { |
| 1508 | | pub const apple_latest = Cpu{ |
| 1509 | | .name = "apple_latest", |
| 1510 | | .llvm_name = "apple-latest", |
| 1511 | | .features = featureSet(&[_]Feature{ |
| 1512 | | .cyclone, |
| 1513 | | }), |
| 1514 | | }; |
| 1515 | 1099 | pub const cortex_a35 = Cpu{ |
| 1516 | 1100 | .name = "cortex_a35", |
| 1517 | 1101 | .llvm_name = "cortex-a35", |
| 1518 | 1102 | .features = featureSet(&[_]Feature{ |
| 1519 | | .a35, |
| 1103 | .crc, |
| 1104 | .crypto, |
| 1105 | .fp_armv8, |
| 1106 | .neon, |
| 1107 | .perfmon, |
| 1520 | 1108 | }), |
| 1521 | 1109 | }; |
| 1522 | 1110 | pub const cortex_a53 = Cpu{ |
| 1523 | 1111 | .name = "cortex_a53", |
| 1524 | 1112 | .llvm_name = "cortex-a53", |
| 1525 | 1113 | .features = featureSet(&[_]Feature{ |
| 1526 | | .a53, |
| 1114 | .balance_fp_ops, |
| 1115 | .crc, |
| 1116 | .crypto, |
| 1117 | .custom_cheap_as_move, |
| 1118 | .fp_armv8, |
| 1119 | .fuse_aes, |
| 1120 | .neon, |
| 1121 | .perfmon, |
| 1122 | .use_aa, |
| 1123 | .use_postra_scheduler, |
| 1527 | 1124 | }), |
| 1528 | 1125 | }; |
| 1529 | 1126 | pub const cortex_a55 = Cpu{ |
| 1530 | 1127 | .name = "cortex_a55", |
| 1531 | 1128 | .llvm_name = "cortex-a55", |
| 1532 | 1129 | .features = featureSet(&[_]Feature{ |
| 1533 | | .a55, |
| 1130 | .crypto, |
| 1131 | .dotprod, |
| 1132 | .fp_armv8, |
| 1133 | .fullfp16, |
| 1134 | .fuse_aes, |
| 1135 | .neon, |
| 1136 | .perfmon, |
| 1137 | .rcpc, |
| 1138 | .v8_2a, |
| 1534 | 1139 | }), |
| 1535 | 1140 | }; |
| 1536 | 1141 | pub const cortex_a57 = Cpu{ |
| 1537 | 1142 | .name = "cortex_a57", |
| 1538 | 1143 | .llvm_name = "cortex-a57", |
| 1539 | 1144 | .features = featureSet(&[_]Feature{ |
| 1540 | | .a57, |
| 1145 | .balance_fp_ops, |
| 1146 | .crc, |
| 1147 | .crypto, |
| 1148 | .custom_cheap_as_move, |
| 1149 | .fp_armv8, |
| 1150 | .fuse_aes, |
| 1151 | .fuse_literals, |
| 1152 | .neon, |
| 1153 | .perfmon, |
| 1154 | .predictable_select_expensive, |
| 1155 | .use_postra_scheduler, |
| 1541 | 1156 | }), |
| 1542 | 1157 | }; |
| 1543 | 1158 | pub const cortex_a72 = Cpu{ |
| 1544 | 1159 | .name = "cortex_a72", |
| 1545 | 1160 | .llvm_name = "cortex-a72", |
| 1546 | 1161 | .features = featureSet(&[_]Feature{ |
| 1547 | | .a72, |
| 1162 | .crc, |
| 1163 | .crypto, |
| 1164 | .fp_armv8, |
| 1165 | .fuse_aes, |
| 1166 | .neon, |
| 1167 | .perfmon, |
| 1548 | 1168 | }), |
| 1549 | 1169 | }; |
| 1550 | 1170 | pub const cortex_a73 = Cpu{ |
| 1551 | 1171 | .name = "cortex_a73", |
| 1552 | 1172 | .llvm_name = "cortex-a73", |
| 1553 | 1173 | .features = featureSet(&[_]Feature{ |
| 1554 | | .a73, |
| 1174 | .crc, |
| 1175 | .crypto, |
| 1176 | .fp_armv8, |
| 1177 | .fuse_aes, |
| 1178 | .neon, |
| 1179 | .perfmon, |
| 1555 | 1180 | }), |
| 1556 | 1181 | }; |
| 1557 | 1182 | pub const cortex_a75 = Cpu{ |
| 1558 | 1183 | .name = "cortex_a75", |
| 1559 | 1184 | .llvm_name = "cortex-a75", |
| 1560 | 1185 | .features = featureSet(&[_]Feature{ |
| 1561 | | .a75, |
| 1186 | .crypto, |
| 1187 | .dotprod, |
| 1188 | .fp_armv8, |
| 1189 | .fullfp16, |
| 1190 | .fuse_aes, |
| 1191 | .neon, |
| 1192 | .perfmon, |
| 1193 | .rcpc, |
| 1194 | .v8_2a, |
| 1562 | 1195 | }), |
| 1563 | 1196 | }; |
| 1564 | 1197 | pub const cortex_a76 = Cpu{ |
| 1565 | 1198 | .name = "cortex_a76", |
| 1566 | 1199 | .llvm_name = "cortex-a76", |
| 1567 | 1200 | .features = featureSet(&[_]Feature{ |
| 1568 | | .a76, |
| 1201 | .crypto, |
| 1202 | .dotprod, |
| 1203 | .fp_armv8, |
| 1204 | .fullfp16, |
| 1205 | .neon, |
| 1206 | .rcpc, |
| 1207 | .ssbs, |
| 1208 | .v8_2a, |
| 1569 | 1209 | }), |
| 1570 | 1210 | }; |
| 1571 | 1211 | pub const cortex_a76ae = Cpu{ |
| 1572 | 1212 | .name = "cortex_a76ae", |
| 1573 | 1213 | .llvm_name = "cortex-a76ae", |
| 1574 | 1214 | .features = featureSet(&[_]Feature{ |
| 1575 | | .a76, |
| 1215 | .crypto, |
| 1216 | .dotprod, |
| 1217 | .fp_armv8, |
| 1218 | .fullfp16, |
| 1219 | .neon, |
| 1220 | .rcpc, |
| 1221 | .ssbs, |
| 1222 | .v8_2a, |
| 1576 | 1223 | }), |
| 1577 | 1224 | }; |
| 1578 | 1225 | pub const cyclone = Cpu{ |
| 1579 | 1226 | .name = "cyclone", |
| 1580 | 1227 | .llvm_name = "cyclone", |
| 1581 | 1228 | .features = featureSet(&[_]Feature{ |
| 1582 | | .cyclone, |
| 1229 | .alternate_sextload_cvt_f32_pattern, |
| 1230 | .arith_bcc_fusion, |
| 1231 | .arith_cbz_fusion, |
| 1232 | .crypto, |
| 1233 | .disable_latency_sched_heuristic, |
| 1234 | .fp_armv8, |
| 1235 | .fuse_aes, |
| 1236 | .fuse_crypto_eor, |
| 1237 | .neon, |
| 1238 | .perfmon, |
| 1239 | .zcm, |
| 1240 | .zcz, |
| 1241 | .zcz_fp_workaround, |
| 1583 | 1242 | }), |
| 1584 | 1243 | }; |
| 1585 | 1244 | pub const exynos_m1 = Cpu{ |
| 1586 | 1245 | .name = "exynos_m1", |
| 1587 | 1246 | .llvm_name = "exynos-m1", |
| 1588 | 1247 | .features = featureSet(&[_]Feature{ |
| 1589 | | .exynosm1, |
| 1248 | .crc, |
| 1249 | .crypto, |
| 1250 | .exynos_cheap_as_move, |
| 1251 | .force_32bit_jump_tables, |
| 1252 | .fuse_aes, |
| 1253 | .perfmon, |
| 1254 | .slow_misaligned_128store, |
| 1255 | .slow_paired_128, |
| 1256 | .use_postra_scheduler, |
| 1257 | .use_reciprocal_square_root, |
| 1258 | .zcz_fp, |
| 1590 | 1259 | }), |
| 1591 | 1260 | }; |
| 1592 | 1261 | pub const exynos_m2 = Cpu{ |
| 1593 | 1262 | .name = "exynos_m2", |
| 1594 | 1263 | .llvm_name = "exynos-m2", |
| 1595 | 1264 | .features = featureSet(&[_]Feature{ |
| 1596 | | .exynosm2, |
| 1265 | .crc, |
| 1266 | .crypto, |
| 1267 | .exynos_cheap_as_move, |
| 1268 | .force_32bit_jump_tables, |
| 1269 | .fuse_aes, |
| 1270 | .perfmon, |
| 1271 | .slow_misaligned_128store, |
| 1272 | .slow_paired_128, |
| 1273 | .use_postra_scheduler, |
| 1274 | .zcz_fp, |
| 1597 | 1275 | }), |
| 1598 | 1276 | }; |
| 1599 | 1277 | pub const exynos_m3 = Cpu{ |
| 1600 | 1278 | .name = "exynos_m3", |
| 1601 | 1279 | .llvm_name = "exynos-m3", |
| 1602 | 1280 | .features = featureSet(&[_]Feature{ |
| 1603 | | .exynosm3, |
| 1281 | .crc, |
| 1282 | .crypto, |
| 1283 | .exynos_cheap_as_move, |
| 1284 | .force_32bit_jump_tables, |
| 1285 | .fuse_address, |
| 1286 | .fuse_aes, |
| 1287 | .fuse_csel, |
| 1288 | .fuse_literals, |
| 1289 | .lsl_fast, |
| 1290 | .perfmon, |
| 1291 | .predictable_select_expensive, |
| 1292 | .use_postra_scheduler, |
| 1293 | .zcz_fp, |
| 1604 | 1294 | }), |
| 1605 | 1295 | }; |
| 1606 | 1296 | pub const exynos_m4 = Cpu{ |
| 1607 | 1297 | .name = "exynos_m4", |
| 1608 | 1298 | .llvm_name = "exynos-m4", |
| 1609 | 1299 | .features = featureSet(&[_]Feature{ |
| 1610 | | .exynosm4, |
| 1300 | .arith_bcc_fusion, |
| 1301 | .arith_cbz_fusion, |
| 1302 | .crypto, |
| 1303 | .dotprod, |
| 1304 | .exynos_cheap_as_move, |
| 1305 | .force_32bit_jump_tables, |
| 1306 | .fullfp16, |
| 1307 | .fuse_address, |
| 1308 | .fuse_aes, |
| 1309 | .fuse_arith_logic, |
| 1310 | .fuse_csel, |
| 1311 | .fuse_literals, |
| 1312 | .lsl_fast, |
| 1313 | .perfmon, |
| 1314 | .use_postra_scheduler, |
| 1315 | .v8_2a, |
| 1316 | .zcz, |
| 1611 | 1317 | }), |
| 1612 | 1318 | }; |
| 1613 | 1319 | pub const exynos_m5 = Cpu{ |
| 1614 | 1320 | .name = "exynos_m5", |
| 1615 | 1321 | .llvm_name = "exynos-m5", |
| 1616 | 1322 | .features = featureSet(&[_]Feature{ |
| 1617 | | .exynosm4, |
| 1323 | .arith_bcc_fusion, |
| 1324 | .arith_cbz_fusion, |
| 1325 | .crypto, |
| 1326 | .dotprod, |
| 1327 | .exynos_cheap_as_move, |
| 1328 | .force_32bit_jump_tables, |
| 1329 | .fullfp16, |
| 1330 | .fuse_address, |
| 1331 | .fuse_aes, |
| 1332 | .fuse_arith_logic, |
| 1333 | .fuse_csel, |
| 1334 | .fuse_literals, |
| 1335 | .lsl_fast, |
| 1336 | .perfmon, |
| 1337 | .use_postra_scheduler, |
| 1338 | .v8_2a, |
| 1339 | .zcz, |
| 1618 | 1340 | }), |
| 1619 | 1341 | }; |
| 1620 | 1342 | pub const falkor = Cpu{ |
| 1621 | 1343 | .name = "falkor", |
| 1622 | 1344 | .llvm_name = "falkor", |
| 1623 | 1345 | .features = featureSet(&[_]Feature{ |
| 1624 | | .falkor, |
| 1346 | .crc, |
| 1347 | .crypto, |
| 1348 | .custom_cheap_as_move, |
| 1349 | .fp_armv8, |
| 1350 | .lsl_fast, |
| 1351 | .neon, |
| 1352 | .perfmon, |
| 1353 | .predictable_select_expensive, |
| 1354 | .rdm, |
| 1355 | .slow_strqro_store, |
| 1356 | .use_postra_scheduler, |
| 1357 | .zcz, |
| 1625 | 1358 | }), |
| 1626 | 1359 | }; |
| 1627 | 1360 | pub const generic = Cpu{ |
| ... | ... | @@ -1639,56 +1372,119 @@ pub const cpu = struct { |
| 1639 | 1372 | .name = "kryo", |
| 1640 | 1373 | .llvm_name = "kryo", |
| 1641 | 1374 | .features = featureSet(&[_]Feature{ |
| 1642 | | .kryo, |
| 1375 | .crc, |
| 1376 | .crypto, |
| 1377 | .custom_cheap_as_move, |
| 1378 | .fp_armv8, |
| 1379 | .lsl_fast, |
| 1380 | .neon, |
| 1381 | .perfmon, |
| 1382 | .predictable_select_expensive, |
| 1383 | .use_postra_scheduler, |
| 1384 | .zcz, |
| 1643 | 1385 | }), |
| 1644 | 1386 | }; |
| 1645 | 1387 | pub const saphira = Cpu{ |
| 1646 | 1388 | .name = "saphira", |
| 1647 | 1389 | .llvm_name = "saphira", |
| 1648 | 1390 | .features = featureSet(&[_]Feature{ |
| 1649 | | .saphira, |
| 1391 | .crypto, |
| 1392 | .custom_cheap_as_move, |
| 1393 | .fp_armv8, |
| 1394 | .lsl_fast, |
| 1395 | .neon, |
| 1396 | .perfmon, |
| 1397 | .predictable_select_expensive, |
| 1398 | .spe, |
| 1399 | .use_postra_scheduler, |
| 1400 | .v8_4a, |
| 1401 | .zcz, |
| 1650 | 1402 | }), |
| 1651 | 1403 | }; |
| 1652 | 1404 | pub const thunderx = Cpu{ |
| 1653 | 1405 | .name = "thunderx", |
| 1654 | 1406 | .llvm_name = "thunderx", |
| 1655 | 1407 | .features = featureSet(&[_]Feature{ |
| 1656 | | .thunderx, |
| 1408 | .crc, |
| 1409 | .crypto, |
| 1410 | .fp_armv8, |
| 1411 | .neon, |
| 1412 | .perfmon, |
| 1413 | .predictable_select_expensive, |
| 1414 | .use_postra_scheduler, |
| 1657 | 1415 | }), |
| 1658 | 1416 | }; |
| 1659 | 1417 | pub const thunderx2t99 = Cpu{ |
| 1660 | 1418 | .name = "thunderx2t99", |
| 1661 | 1419 | .llvm_name = "thunderx2t99", |
| 1662 | 1420 | .features = featureSet(&[_]Feature{ |
| 1663 | | .thunderx2t99, |
| 1421 | .aggressive_fma, |
| 1422 | .arith_bcc_fusion, |
| 1423 | .crc, |
| 1424 | .crypto, |
| 1425 | .fp_armv8, |
| 1426 | .lse, |
| 1427 | .neon, |
| 1428 | .predictable_select_expensive, |
| 1429 | .use_postra_scheduler, |
| 1430 | .v8_1a, |
| 1664 | 1431 | }), |
| 1665 | 1432 | }; |
| 1666 | 1433 | pub const thunderxt81 = Cpu{ |
| 1667 | 1434 | .name = "thunderxt81", |
| 1668 | 1435 | .llvm_name = "thunderxt81", |
| 1669 | 1436 | .features = featureSet(&[_]Feature{ |
| 1670 | | .thunderxt81, |
| 1437 | .crc, |
| 1438 | .crypto, |
| 1439 | .fp_armv8, |
| 1440 | .neon, |
| 1441 | .perfmon, |
| 1442 | .predictable_select_expensive, |
| 1443 | .use_postra_scheduler, |
| 1671 | 1444 | }), |
| 1672 | 1445 | }; |
| 1673 | 1446 | pub const thunderxt83 = Cpu{ |
| 1674 | 1447 | .name = "thunderxt83", |
| 1675 | 1448 | .llvm_name = "thunderxt83", |
| 1676 | 1449 | .features = featureSet(&[_]Feature{ |
| 1677 | | .thunderxt83, |
| 1450 | .crc, |
| 1451 | .crypto, |
| 1452 | .fp_armv8, |
| 1453 | .neon, |
| 1454 | .perfmon, |
| 1455 | .predictable_select_expensive, |
| 1456 | .use_postra_scheduler, |
| 1678 | 1457 | }), |
| 1679 | 1458 | }; |
| 1680 | 1459 | pub const thunderxt88 = Cpu{ |
| 1681 | 1460 | .name = "thunderxt88", |
| 1682 | 1461 | .llvm_name = "thunderxt88", |
| 1683 | 1462 | .features = featureSet(&[_]Feature{ |
| 1684 | | .thunderxt88, |
| 1463 | .crc, |
| 1464 | .crypto, |
| 1465 | .fp_armv8, |
| 1466 | .neon, |
| 1467 | .perfmon, |
| 1468 | .predictable_select_expensive, |
| 1469 | .use_postra_scheduler, |
| 1685 | 1470 | }), |
| 1686 | 1471 | }; |
| 1687 | 1472 | pub const tsv110 = Cpu{ |
| 1688 | 1473 | .name = "tsv110", |
| 1689 | 1474 | .llvm_name = "tsv110", |
| 1690 | 1475 | .features = featureSet(&[_]Feature{ |
| 1691 | | .tsv110, |
| 1476 | .crypto, |
| 1477 | .custom_cheap_as_move, |
| 1478 | .dotprod, |
| 1479 | .fp_armv8, |
| 1480 | .fp16fml, |
| 1481 | .fullfp16, |
| 1482 | .fuse_aes, |
| 1483 | .neon, |
| 1484 | .perfmon, |
| 1485 | .spe, |
| 1486 | .use_postra_scheduler, |
| 1487 | .v8_2a, |
| 1692 | 1488 | }), |
| 1693 | 1489 | }; |
| 1694 | 1490 | }; |
| ... | ... | @@ -1697,7 +1493,6 @@ pub const cpu = struct { |
| 1697 | 1493 | /// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1 |
| 1698 | 1494 | /// compiler has inefficient memory and CPU usage, affecting build times. |
| 1699 | 1495 | pub const all_cpus = &[_]*const Cpu{ |
| 1700 | | &cpu.apple_latest, |
| 1701 | 1496 | &cpu.cortex_a35, |
| 1702 | 1497 | &cpu.cortex_a53, |
| 1703 | 1498 | &cpu.cortex_a55, |
| ... | ... | @@ -1718,7 +1513,6 @@ pub const all_cpus = &[_]*const Cpu{ |
| 1718 | 1513 | &cpu.kryo, |
| 1719 | 1514 | &cpu.saphira, |
| 1720 | 1515 | &cpu.thunderx, |
| 1721 | | &cpu.thunderx2t99, |
| 1722 | 1516 | &cpu.thunderxt81, |
| 1723 | 1517 | &cpu.thunderxt83, |
| 1724 | 1518 | &cpu.thunderxt88, |