| ... | ... | @@ -2,6 +2,14 @@ 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, |
| 5 | 13 | aes, |
| 6 | 14 | aggressive_fma, |
| 7 | 15 | alternate_sextload_cvt_f32_pattern, |
| ... | ... | @@ -27,10 +35,16 @@ pub const Feature = enum { |
| 27 | 35 | crc, |
| 28 | 36 | crypto, |
| 29 | 37 | custom_cheap_as_move, |
| 38 | cyclone, |
| 30 | 39 | disable_latency_sched_heuristic, |
| 31 | 40 | dit, |
| 32 | 41 | dotprod, |
| 33 | 42 | exynos_cheap_as_move, |
| 43 | exynosm1, |
| 44 | exynosm2, |
| 45 | exynosm3, |
| 46 | exynosm4, |
| 47 | falkor, |
| 34 | 48 | fmi, |
| 35 | 49 | force_32bit_jump_tables, |
| 36 | 50 | fp_armv8, |
| ... | ... | @@ -44,6 +58,7 @@ pub const Feature = enum { |
| 44 | 58 | fuse_csel, |
| 45 | 59 | fuse_literals, |
| 46 | 60 | jsconv, |
| 61 | kryo, |
| 47 | 62 | lor, |
| 48 | 63 | lse, |
| 49 | 64 | lsl_fast, |
| ... | ... | @@ -88,6 +103,7 @@ pub const Feature = enum { |
| 88 | 103 | reserve_x6, |
| 89 | 104 | reserve_x7, |
| 90 | 105 | reserve_x9, |
| 106 | saphira, |
| 91 | 107 | sb, |
| 92 | 108 | sel2, |
| 93 | 109 | sha2, |
| ... | ... | @@ -106,11 +122,17 @@ pub const Feature = enum { |
| 106 | 122 | sve2_bitperm, |
| 107 | 123 | sve2_sha3, |
| 108 | 124 | sve2_sm4, |
| 125 | thunderx, |
| 126 | thunderx2t99, |
| 127 | thunderxt81, |
| 128 | thunderxt83, |
| 129 | thunderxt88, |
| 109 | 130 | tlb_rmi, |
| 110 | 131 | tpidr_el1, |
| 111 | 132 | tpidr_el2, |
| 112 | 133 | tpidr_el3, |
| 113 | 134 | tracev8_4, |
| 135 | tsv110, |
| 114 | 136 | uaops, |
| 115 | 137 | use_aa, |
| 116 | 138 | use_postra_scheduler, |
| ... | ... | @@ -134,6 +156,134 @@ pub const all_features = blk: { |
| 134 | 156 | const len = @typeInfo(Feature).Enum.fields.len; |
| 135 | 157 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); |
| 136 | 158 | 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 | }; |
| 137 | 287 | result[@enumToInt(Feature.aes)] = .{ |
| 138 | 288 | .index = @enumToInt(Feature.aes), |
| 139 | 289 | .name = @tagName(Feature.aes), |
| ... | ... | @@ -317,6 +467,27 @@ pub const all_features = blk: { |
| 317 | 467 | .description = "Use custom handling of cheap instructions", |
| 318 | 468 | .dependencies = 0, |
| 319 | 469 | }; |
| 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 | }; |
| 320 | 491 | result[@enumToInt(Feature.disable_latency_sched_heuristic)] = .{ |
| 321 | 492 | .index = @enumToInt(Feature.disable_latency_sched_heuristic), |
| 322 | 493 | .name = @tagName(Feature.disable_latency_sched_heuristic), |
| ... | ... | @@ -347,6 +518,109 @@ pub const all_features = blk: { |
| 347 | 518 | .custom_cheap_as_move, |
| 348 | 519 | }), |
| 349 | 520 | }; |
| 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 | }; |
| 350 | 624 | result[@enumToInt(Feature.fmi)] = .{ |
| 351 | 625 | .index = @enumToInt(Feature.fmi), |
| 352 | 626 | .name = @tagName(Feature.fmi), |
| ... | ... | @@ -444,6 +718,24 @@ pub const all_features = blk: { |
| 444 | 718 | .fp_armv8, |
| 445 | 719 | }), |
| 446 | 720 | }; |
| 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 | }; |
| 447 | 739 | result[@enumToInt(Feature.lor)] = .{ |
| 448 | 740 | .index = @enumToInt(Feature.lor), |
| 449 | 741 | .name = @tagName(Feature.lor), |
| ... | ... | @@ -760,6 +1052,25 @@ pub const all_features = blk: { |
| 760 | 1052 | .description = "Reserve X9, making it unavailable as a GPR", |
| 761 | 1053 | .dependencies = 0, |
| 762 | 1054 | }; |
| 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 | }; |
| 763 | 1074 | result[@enumToInt(Feature.sb)] = .{ |
| 764 | 1075 | .index = @enumToInt(Feature.sb), |
| 765 | 1076 | .name = @tagName(Feature.sb), |
| ... | ... | @@ -906,28 +1217,106 @@ pub const all_features = blk: { |
| 906 | 1217 | .sve2, |
| 907 | 1218 | }), |
| 908 | 1219 | }; |
| 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, |
| 915 | | }; |
| 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, |
| 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 | }), |
| 922 | 1234 | }; |
| 923 | | result[@enumToInt(Feature.tpidr_el2)] = .{ |
| 924 | | .index = @enumToInt(Feature.tpidr_el2), |
| 925 | | .name = @tagName(Feature.tpidr_el2), |
| 926 | | .llvm_name = "tpidr-el2", |
| 927 | | .description = "Permit use of TPIDR_EL2 for the TLS base", |
| 928 | | .dependencies = 0, |
| 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 | }), |
| 929 | 1252 | }; |
| 930 | | result[@enumToInt(Feature.tpidr_el3)] = .{ |
| 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, |
| 1311 | }; |
| 1312 | result[@enumToInt(Feature.tpidr_el2)] = .{ |
| 1313 | .index = @enumToInt(Feature.tpidr_el2), |
| 1314 | .name = @tagName(Feature.tpidr_el2), |
| 1315 | .llvm_name = "tpidr-el2", |
| 1316 | .description = "Permit use of TPIDR_EL2 for the TLS base", |
| 1317 | .dependencies = 0, |
| 1318 | }; |
| 1319 | result[@enumToInt(Feature.tpidr_el3)] = .{ |
| 931 | 1320 | .index = @enumToInt(Feature.tpidr_el3), |
| 932 | 1321 | .name = @tagName(Feature.tpidr_el3), |
| 933 | 1322 | .llvm_name = "tpidr-el3", |
| ... | ... | @@ -941,6 +1330,26 @@ pub const all_features = blk: { |
| 941 | 1330 | .description = "Enable v8.4-A Trace extension", |
| 942 | 1331 | .dependencies = 0, |
| 943 | 1332 | }; |
| 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 | }; |
| 944 | 1353 | result[@enumToInt(Feature.uaops)] = .{ |
| 945 | 1354 | .index = @enumToInt(Feature.uaops), |
| 946 | 1355 | .name = @tagName(Feature.uaops), |
| ... | ... | @@ -1096,265 +1505,123 @@ pub const all_features = blk: { |
| 1096 | 1505 | }; |
| 1097 | 1506 | |
| 1098 | 1507 | 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 | }; |
| 1099 | 1515 | pub const cortex_a35 = Cpu{ |
| 1100 | 1516 | .name = "cortex_a35", |
| 1101 | 1517 | .llvm_name = "cortex-a35", |
| 1102 | 1518 | .features = featureSet(&[_]Feature{ |
| 1103 | | .crc, |
| 1104 | | .crypto, |
| 1105 | | .fp_armv8, |
| 1106 | | .neon, |
| 1107 | | .perfmon, |
| 1519 | .a35, |
| 1108 | 1520 | }), |
| 1109 | 1521 | }; |
| 1110 | 1522 | pub const cortex_a53 = Cpu{ |
| 1111 | 1523 | .name = "cortex_a53", |
| 1112 | 1524 | .llvm_name = "cortex-a53", |
| 1113 | 1525 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1526 | .a53, |
| 1124 | 1527 | }), |
| 1125 | 1528 | }; |
| 1126 | 1529 | pub const cortex_a55 = Cpu{ |
| 1127 | 1530 | .name = "cortex_a55", |
| 1128 | 1531 | .llvm_name = "cortex-a55", |
| 1129 | 1532 | .features = featureSet(&[_]Feature{ |
| 1130 | | .crypto, |
| 1131 | | .dotprod, |
| 1132 | | .fp_armv8, |
| 1133 | | .fullfp16, |
| 1134 | | .fuse_aes, |
| 1135 | | .neon, |
| 1136 | | .perfmon, |
| 1137 | | .rcpc, |
| 1138 | | .v8_2a, |
| 1533 | .a55, |
| 1139 | 1534 | }), |
| 1140 | 1535 | }; |
| 1141 | 1536 | pub const cortex_a57 = Cpu{ |
| 1142 | 1537 | .name = "cortex_a57", |
| 1143 | 1538 | .llvm_name = "cortex-a57", |
| 1144 | 1539 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1540 | .a57, |
| 1156 | 1541 | }), |
| 1157 | 1542 | }; |
| 1158 | 1543 | pub const cortex_a72 = Cpu{ |
| 1159 | 1544 | .name = "cortex_a72", |
| 1160 | 1545 | .llvm_name = "cortex-a72", |
| 1161 | 1546 | .features = featureSet(&[_]Feature{ |
| 1162 | | .crc, |
| 1163 | | .crypto, |
| 1164 | | .fp_armv8, |
| 1165 | | .fuse_aes, |
| 1166 | | .neon, |
| 1167 | | .perfmon, |
| 1547 | .a72, |
| 1168 | 1548 | }), |
| 1169 | 1549 | }; |
| 1170 | 1550 | pub const cortex_a73 = Cpu{ |
| 1171 | 1551 | .name = "cortex_a73", |
| 1172 | 1552 | .llvm_name = "cortex-a73", |
| 1173 | 1553 | .features = featureSet(&[_]Feature{ |
| 1174 | | .crc, |
| 1175 | | .crypto, |
| 1176 | | .fp_armv8, |
| 1177 | | .fuse_aes, |
| 1178 | | .neon, |
| 1179 | | .perfmon, |
| 1554 | .a73, |
| 1180 | 1555 | }), |
| 1181 | 1556 | }; |
| 1182 | 1557 | pub const cortex_a75 = Cpu{ |
| 1183 | 1558 | .name = "cortex_a75", |
| 1184 | 1559 | .llvm_name = "cortex-a75", |
| 1185 | 1560 | .features = featureSet(&[_]Feature{ |
| 1186 | | .crypto, |
| 1187 | | .dotprod, |
| 1188 | | .fp_armv8, |
| 1189 | | .fullfp16, |
| 1190 | | .fuse_aes, |
| 1191 | | .neon, |
| 1192 | | .perfmon, |
| 1193 | | .rcpc, |
| 1194 | | .v8_2a, |
| 1561 | .a75, |
| 1195 | 1562 | }), |
| 1196 | 1563 | }; |
| 1197 | 1564 | pub const cortex_a76 = Cpu{ |
| 1198 | 1565 | .name = "cortex_a76", |
| 1199 | 1566 | .llvm_name = "cortex-a76", |
| 1200 | 1567 | .features = featureSet(&[_]Feature{ |
| 1201 | | .crypto, |
| 1202 | | .dotprod, |
| 1203 | | .fp_armv8, |
| 1204 | | .fullfp16, |
| 1205 | | .neon, |
| 1206 | | .rcpc, |
| 1207 | | .ssbs, |
| 1208 | | .v8_2a, |
| 1568 | .a76, |
| 1209 | 1569 | }), |
| 1210 | 1570 | }; |
| 1211 | 1571 | pub const cortex_a76ae = Cpu{ |
| 1212 | 1572 | .name = "cortex_a76ae", |
| 1213 | 1573 | .llvm_name = "cortex-a76ae", |
| 1214 | 1574 | .features = featureSet(&[_]Feature{ |
| 1215 | | .crypto, |
| 1216 | | .dotprod, |
| 1217 | | .fp_armv8, |
| 1218 | | .fullfp16, |
| 1219 | | .neon, |
| 1220 | | .rcpc, |
| 1221 | | .ssbs, |
| 1222 | | .v8_2a, |
| 1575 | .a76, |
| 1223 | 1576 | }), |
| 1224 | 1577 | }; |
| 1225 | 1578 | pub const cyclone = Cpu{ |
| 1226 | 1579 | .name = "cyclone", |
| 1227 | 1580 | .llvm_name = "cyclone", |
| 1228 | 1581 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1582 | .cyclone, |
| 1242 | 1583 | }), |
| 1243 | 1584 | }; |
| 1244 | 1585 | pub const exynos_m1 = Cpu{ |
| 1245 | 1586 | .name = "exynos_m1", |
| 1246 | 1587 | .llvm_name = "exynos-m1", |
| 1247 | 1588 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1589 | .exynosm1, |
| 1259 | 1590 | }), |
| 1260 | 1591 | }; |
| 1261 | 1592 | pub const exynos_m2 = Cpu{ |
| 1262 | 1593 | .name = "exynos_m2", |
| 1263 | 1594 | .llvm_name = "exynos-m2", |
| 1264 | 1595 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1596 | .exynosm2, |
| 1275 | 1597 | }), |
| 1276 | 1598 | }; |
| 1277 | 1599 | pub const exynos_m3 = Cpu{ |
| 1278 | 1600 | .name = "exynos_m3", |
| 1279 | 1601 | .llvm_name = "exynos-m3", |
| 1280 | 1602 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1603 | .exynosm3, |
| 1294 | 1604 | }), |
| 1295 | 1605 | }; |
| 1296 | 1606 | pub const exynos_m4 = Cpu{ |
| 1297 | 1607 | .name = "exynos_m4", |
| 1298 | 1608 | .llvm_name = "exynos-m4", |
| 1299 | 1609 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1610 | .exynosm4, |
| 1317 | 1611 | }), |
| 1318 | 1612 | }; |
| 1319 | 1613 | pub const exynos_m5 = Cpu{ |
| 1320 | 1614 | .name = "exynos_m5", |
| 1321 | 1615 | .llvm_name = "exynos-m5", |
| 1322 | 1616 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1617 | .exynosm4, |
| 1340 | 1618 | }), |
| 1341 | 1619 | }; |
| 1342 | 1620 | pub const falkor = Cpu{ |
| 1343 | 1621 | .name = "falkor", |
| 1344 | 1622 | .llvm_name = "falkor", |
| 1345 | 1623 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1624 | .falkor, |
| 1358 | 1625 | }), |
| 1359 | 1626 | }; |
| 1360 | 1627 | pub const generic = Cpu{ |
| ... | ... | @@ -1372,119 +1639,56 @@ pub const cpu = struct { |
| 1372 | 1639 | .name = "kryo", |
| 1373 | 1640 | .llvm_name = "kryo", |
| 1374 | 1641 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1642 | .kryo, |
| 1385 | 1643 | }), |
| 1386 | 1644 | }; |
| 1387 | 1645 | pub const saphira = Cpu{ |
| 1388 | 1646 | .name = "saphira", |
| 1389 | 1647 | .llvm_name = "saphira", |
| 1390 | 1648 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1649 | .saphira, |
| 1402 | 1650 | }), |
| 1403 | 1651 | }; |
| 1404 | 1652 | pub const thunderx = Cpu{ |
| 1405 | 1653 | .name = "thunderx", |
| 1406 | 1654 | .llvm_name = "thunderx", |
| 1407 | 1655 | .features = featureSet(&[_]Feature{ |
| 1408 | | .crc, |
| 1409 | | .crypto, |
| 1410 | | .fp_armv8, |
| 1411 | | .neon, |
| 1412 | | .perfmon, |
| 1413 | | .predictable_select_expensive, |
| 1414 | | .use_postra_scheduler, |
| 1656 | .thunderx, |
| 1415 | 1657 | }), |
| 1416 | 1658 | }; |
| 1417 | 1659 | pub const thunderx2t99 = Cpu{ |
| 1418 | 1660 | .name = "thunderx2t99", |
| 1419 | 1661 | .llvm_name = "thunderx2t99", |
| 1420 | 1662 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1663 | .thunderx2t99, |
| 1431 | 1664 | }), |
| 1432 | 1665 | }; |
| 1433 | 1666 | pub const thunderxt81 = Cpu{ |
| 1434 | 1667 | .name = "thunderxt81", |
| 1435 | 1668 | .llvm_name = "thunderxt81", |
| 1436 | 1669 | .features = featureSet(&[_]Feature{ |
| 1437 | | .crc, |
| 1438 | | .crypto, |
| 1439 | | .fp_armv8, |
| 1440 | | .neon, |
| 1441 | | .perfmon, |
| 1442 | | .predictable_select_expensive, |
| 1443 | | .use_postra_scheduler, |
| 1670 | .thunderxt81, |
| 1444 | 1671 | }), |
| 1445 | 1672 | }; |
| 1446 | 1673 | pub const thunderxt83 = Cpu{ |
| 1447 | 1674 | .name = "thunderxt83", |
| 1448 | 1675 | .llvm_name = "thunderxt83", |
| 1449 | 1676 | .features = featureSet(&[_]Feature{ |
| 1450 | | .crc, |
| 1451 | | .crypto, |
| 1452 | | .fp_armv8, |
| 1453 | | .neon, |
| 1454 | | .perfmon, |
| 1455 | | .predictable_select_expensive, |
| 1456 | | .use_postra_scheduler, |
| 1677 | .thunderxt83, |
| 1457 | 1678 | }), |
| 1458 | 1679 | }; |
| 1459 | 1680 | pub const thunderxt88 = Cpu{ |
| 1460 | 1681 | .name = "thunderxt88", |
| 1461 | 1682 | .llvm_name = "thunderxt88", |
| 1462 | 1683 | .features = featureSet(&[_]Feature{ |
| 1463 | | .crc, |
| 1464 | | .crypto, |
| 1465 | | .fp_armv8, |
| 1466 | | .neon, |
| 1467 | | .perfmon, |
| 1468 | | .predictable_select_expensive, |
| 1469 | | .use_postra_scheduler, |
| 1684 | .thunderxt88, |
| 1470 | 1685 | }), |
| 1471 | 1686 | }; |
| 1472 | 1687 | pub const tsv110 = Cpu{ |
| 1473 | 1688 | .name = "tsv110", |
| 1474 | 1689 | .llvm_name = "tsv110", |
| 1475 | 1690 | .features = featureSet(&[_]Feature{ |
| 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, |
| 1691 | .tsv110, |
| 1488 | 1692 | }), |
| 1489 | 1693 | }; |
| 1490 | 1694 | }; |
| ... | ... | @@ -1493,6 +1697,7 @@ pub const cpu = struct { |
| 1493 | 1697 | /// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1 |
| 1494 | 1698 | /// compiler has inefficient memory and CPU usage, affecting build times. |
| 1495 | 1699 | pub const all_cpus = &[_]*const Cpu{ |
| 1700 | &cpu.apple_latest, |
| 1496 | 1701 | &cpu.cortex_a35, |
| 1497 | 1702 | &cpu.cortex_a53, |
| 1498 | 1703 | &cpu.cortex_a55, |
| ... | ... | @@ -1513,6 +1718,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 1513 | 1718 | &cpu.kryo, |
| 1514 | 1719 | &cpu.saphira, |
| 1515 | 1720 | &cpu.thunderx, |
| 1721 | &cpu.thunderx2t99, |
| 1516 | 1722 | &cpu.thunderxt81, |
| 1517 | 1723 | &cpu.thunderxt83, |
| 1518 | 1724 | &cpu.thunderxt88, |