| author | |
| committer | |
| log | 50a5fc98dc7d458cb731980d1231ee6e1a7eb880 |
| tree | 4cba5d87033ebda58a1fe95d41375dcd35686eea |
| parent | 59b4facd34dc525d2258bde8f5d94049d02355dc |
The tools/update_cpu_features script is coming along, and generates
correct information for all these targets. The remaining targets are:
* arm
* aarch64
* amdgpu
* riscv
I will commit them once the issues with the updater tool are resolved.12 files changed, 117 insertions(+), 190 deletions(-)
lib/std/target.zig+6-6| ... | ... | @@ -1070,17 +1070,13 @@ pub const Target = struct { |
| 1070 | 1070 | } |
| 1071 | 1071 | } |
| 1072 | 1072 | |
| 1073 | /// Returns a name that matches the lib/std/target/* directory name. | |
| 1073 | /// Returns a name that matches the lib/std/target/* source file name. | |
| 1074 | 1074 | pub fn genericName(arch: Arch) []const u8 { |
| 1075 | 1075 | return switch (arch) { |
| 1076 | 1076 | .arm, .armeb, .thumb, .thumbeb => "arm", |
| 1077 | 1077 | .aarch64, .aarch64_be, .aarch64_32 => "aarch64", |
| 1078 | .avr => "avr", | |
| 1079 | 1078 | .bpfel, .bpfeb => "bpf", |
| 1080 | .csky => "csky", | |
| 1081 | .hexagon => "hexagon", | |
| 1082 | 1079 | .mips, .mipsel, .mips64, .mips64el => "mips", |
| 1083 | .msp430 => "msp430", | |
| 1084 | 1080 | .powerpc, .powerpc64, .powerpc64le => "powerpc", |
| 1085 | 1081 | .amdgcn => "amdgpu", |
| 1086 | 1082 | .riscv32, .riscv64 => "riscv", |
| ... | ... | @@ -1111,6 +1107,7 @@ pub const Target = struct { |
| 1111 | 1107 | .s390x => &systemz.all_features, |
| 1112 | 1108 | .i386, .x86_64 => &x86.all_features, |
| 1113 | 1109 | .nvptx, .nvptx64 => &nvptx.all_features, |
| 1110 | .ve => &ve.all_features, | |
| 1114 | 1111 | .wasm32, .wasm64 => &wasm.all_features, |
| 1115 | 1112 | |
| 1116 | 1113 | else => &[0]Cpu.Feature{}, |
| ... | ... | @@ -1134,6 +1131,7 @@ pub const Target = struct { |
| 1134 | 1131 | .s390x => comptime allCpusFromDecls(systemz.cpu), |
| 1135 | 1132 | .i386, .x86_64 => comptime allCpusFromDecls(x86.cpu), |
| 1136 | 1133 | .nvptx, .nvptx64 => comptime allCpusFromDecls(nvptx.cpu), |
| 1134 | .ve => comptime allCpusFromDecls(ve.cpu), | |
| 1137 | 1135 | .wasm32, .wasm64 => comptime allCpusFromDecls(wasm.cpu), |
| 1138 | 1136 | |
| 1139 | 1137 | else => &[0]*const Model{}, |
| ... | ... | @@ -1188,12 +1186,13 @@ pub const Target = struct { |
| 1188 | 1186 | .amdgcn => &amdgpu.cpu.generic, |
| 1189 | 1187 | .riscv32 => &riscv.cpu.generic_rv32, |
| 1190 | 1188 | .riscv64 => &riscv.cpu.generic_rv64, |
| 1191 | .sparc, .sparcel => &sparc.cpu.v8, | |
| 1189 | .sparc, .sparcel => &sparc.cpu.generic, | |
| 1192 | 1190 | .sparcv9 => &sparc.cpu.v9, |
| 1193 | 1191 | .s390x => &systemz.cpu.generic, |
| 1194 | 1192 | .i386 => &x86.cpu._i386, |
| 1195 | 1193 | .x86_64 => &x86.cpu.x86_64, |
| 1196 | 1194 | .nvptx, .nvptx64 => &nvptx.cpu.sm_20, |
| 1195 | .ve => &ve.cpu.generic, | |
| 1197 | 1196 | .wasm32, .wasm64 => &wasm.cpu.generic, |
| 1198 | 1197 | |
| 1199 | 1198 | else => &S.generic_model, |
| ... | ... | @@ -1207,6 +1206,7 @@ pub const Target = struct { |
| 1207 | 1206 | .riscv64 => &riscv.cpu.baseline_rv64, |
| 1208 | 1207 | .i386 => &x86.cpu.pentium4, |
| 1209 | 1208 | .nvptx, .nvptx64 => &nvptx.cpu.sm_20, |
| 1209 | .sparc, .sparcel => &sparc.cpu.v8, | |
| 1210 | 1210 | |
| 1211 | 1211 | else => generic(arch), |
| 1212 | 1212 | }; |
lib/std/target/avr.zig+3-7| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -163,7 +160,6 @@ pub const all_features = blk: { |
| 163 | 160 | .dependencies = featureSet(&[_]Feature{ |
| 164 | 161 | .avr0, |
| 165 | 162 | .@"break", |
| 166 | .memmappedregs, | |
| 167 | 163 | .sram, |
| 168 | 164 | .tinyencoding, |
| 169 | 165 | }), |
| ... | ... | @@ -1859,7 +1855,7 @@ pub const cpu = struct { |
| 1859 | 1855 | .name = "atxmega16e5", |
| 1860 | 1856 | .llvm_name = "atxmega16e5", |
| 1861 | 1857 | .features = featureSet(&[_]Feature{ |
| 1862 | .xmega, | |
| 1858 | .xmegau, | |
| 1863 | 1859 | }), |
| 1864 | 1860 | }; |
| 1865 | 1861 | pub const atxmega192a3 = CpuModel{ |
lib/std/target/bpf.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/hexagon.zig+2-23| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -92,7 +89,6 @@ pub const all_features = blk: { |
| 92 | 89 | .llvm_name = "hvxv62", |
| 93 | 90 | .description = "Hexagon HVX instructions", |
| 94 | 91 | .dependencies = featureSet(&[_]Feature{ |
| 95 | .hvx, | |
| 96 | 92 | .hvxv60, |
| 97 | 93 | }), |
| 98 | 94 | }; |
| ... | ... | @@ -100,8 +96,6 @@ pub const all_features = blk: { |
| 100 | 96 | .llvm_name = "hvxv65", |
| 101 | 97 | .description = "Hexagon HVX instructions", |
| 102 | 98 | .dependencies = featureSet(&[_]Feature{ |
| 103 | .hvx, | |
| 104 | .hvxv60, | |
| 105 | 99 | .hvxv62, |
| 106 | 100 | }), |
| 107 | 101 | }; |
| ... | ... | @@ -109,9 +103,6 @@ pub const all_features = blk: { |
| 109 | 103 | .llvm_name = "hvxv66", |
| 110 | 104 | .description = "Hexagon HVX instructions", |
| 111 | 105 | .dependencies = featureSet(&[_]Feature{ |
| 112 | .hvx, | |
| 113 | .hvxv60, | |
| 114 | .hvxv62, | |
| 115 | 106 | .hvxv65, |
| 116 | 107 | .zreg, |
| 117 | 108 | }), |
| ... | ... | @@ -120,9 +111,6 @@ pub const all_features = blk: { |
| 120 | 111 | .llvm_name = "hvxv67", |
| 121 | 112 | .description = "Hexagon HVX instructions", |
| 122 | 113 | .dependencies = featureSet(&[_]Feature{ |
| 123 | .hvxv60, | |
| 124 | .hvxv62, | |
| 125 | .hvxv65, | |
| 126 | 114 | .hvxv66, |
| 127 | 115 | }), |
| 128 | 116 | }; |
| ... | ... | @@ -248,7 +236,6 @@ pub const cpu = struct { |
| 248 | 236 | .memops, |
| 249 | 237 | .nvj, |
| 250 | 238 | .nvs, |
| 251 | .packets, | |
| 252 | 239 | .prev65, |
| 253 | 240 | .small_data, |
| 254 | 241 | .v5, |
| ... | ... | @@ -265,7 +252,6 @@ pub const cpu = struct { |
| 265 | 252 | .memops, |
| 266 | 253 | .nvj, |
| 267 | 254 | .nvs, |
| 268 | .packets, | |
| 269 | 255 | .prev65, |
| 270 | 256 | .small_data, |
| 271 | 257 | .v5, |
| ... | ... | @@ -280,7 +266,6 @@ pub const cpu = struct { |
| 280 | 266 | .memops, |
| 281 | 267 | .nvj, |
| 282 | 268 | .nvs, |
| 283 | .packets, | |
| 284 | 269 | .prev65, |
| 285 | 270 | .small_data, |
| 286 | 271 | .v5, |
| ... | ... | @@ -296,7 +281,6 @@ pub const cpu = struct { |
| 296 | 281 | .memops, |
| 297 | 282 | .nvj, |
| 298 | 283 | .nvs, |
| 299 | .packets, | |
| 300 | 284 | .prev65, |
| 301 | 285 | .small_data, |
| 302 | 286 | .v5, |
| ... | ... | @@ -313,7 +297,6 @@ pub const cpu = struct { |
| 313 | 297 | .memops, |
| 314 | 298 | .nvj, |
| 315 | 299 | .nvs, |
| 316 | .packets, | |
| 317 | 300 | .prev65, |
| 318 | 301 | .small_data, |
| 319 | 302 | .v5, |
| ... | ... | @@ -332,7 +315,6 @@ pub const cpu = struct { |
| 332 | 315 | .memops, |
| 333 | 316 | .nvj, |
| 334 | 317 | .nvs, |
| 335 | .packets, | |
| 336 | 318 | .small_data, |
| 337 | 319 | .v5, |
| 338 | 320 | .v55, |
| ... | ... | @@ -351,7 +333,6 @@ pub const cpu = struct { |
| 351 | 333 | .memops, |
| 352 | 334 | .nvj, |
| 353 | 335 | .nvs, |
| 354 | .packets, | |
| 355 | 336 | .small_data, |
| 356 | 337 | .v5, |
| 357 | 338 | .v55, |
| ... | ... | @@ -371,7 +352,6 @@ pub const cpu = struct { |
| 371 | 352 | .memops, |
| 372 | 353 | .nvj, |
| 373 | 354 | .nvs, |
| 374 | .packets, | |
| 375 | 355 | .small_data, |
| 376 | 356 | .v5, |
| 377 | 357 | .v55, |
| ... | ... | @@ -391,7 +371,6 @@ pub const cpu = struct { |
| 391 | 371 | .mem_noshuf, |
| 392 | 372 | .memops, |
| 393 | 373 | .nvs, |
| 394 | .packets, | |
| 395 | 374 | .small_data, |
| 396 | 375 | .tinycore, |
| 397 | 376 | .v5, |
lib/std/target/mips.zig+2-11| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -108,7 +105,6 @@ pub const all_features = blk: { |
| 108 | 105 | .llvm_name = "dspr3", |
| 109 | 106 | .description = "Mips DSP-R3 ASE", |
| 110 | 107 | .dependencies = featureSet(&[_]Feature{ |
| 111 | .dsp, | |
| 112 | 108 | .dspr2, |
| 113 | 109 | }), |
| 114 | 110 | }; |
| ... | ... | @@ -301,10 +297,8 @@ pub const all_features = blk: { |
| 301 | 297 | .llvm_name = "mips64r6", |
| 302 | 298 | .description = "Mips64r6 ISA Support [experimental]", |
| 303 | 299 | .dependencies = featureSet(&[_]Feature{ |
| 304 | .abs2008, | |
| 305 | 300 | .mips32r6, |
| 306 | 301 | .mips64r5, |
| 307 | .nan2008, | |
| 308 | 302 | }), |
| 309 | 303 | }; |
| 310 | 304 | result[@enumToInt(Feature.msa)] = .{ |
| ... | ... | @@ -515,16 +509,13 @@ pub const cpu = struct { |
| 515 | 509 | .llvm_name = "octeon", |
| 516 | 510 | .features = featureSet(&[_]Feature{ |
| 517 | 511 | .cnmips, |
| 518 | .mips64r2, | |
| 519 | 512 | }), |
| 520 | 513 | }; |
| 521 | 514 | pub const @"octeon+" = CpuModel{ |
| 522 | 515 | .name = "octeon+", |
| 523 | 516 | .llvm_name = "octeon+", |
| 524 | 517 | .features = featureSet(&[_]Feature{ |
| 525 | .cnmips, | |
| 526 | 518 | .cnmipsp, |
| 527 | .mips64r2, | |
| 528 | 519 | }), |
| 529 | 520 | }; |
| 530 | 521 | pub const p5600 = CpuModel{ |
lib/std/target/msp430.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/nvptx.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/powerpc.zig+51-113| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -10,6 +7,7 @@ const CpuModel = std.Target.Cpu.Model; |
| 10 | 7 | pub const Feature = enum { |
| 11 | 8 | @"64bit", |
| 12 | 9 | @"64bitregs", |
| 10 | aix, | |
| 13 | 11 | allow_unaligned_fp_access, |
| 14 | 12 | altivec, |
| 15 | 13 | booke, |
| ... | ... | @@ -19,6 +17,7 @@ pub const Feature = enum { |
| 19 | 17 | crypto, |
| 20 | 18 | direct_move, |
| 21 | 19 | e500, |
| 20 | efpu2, | |
| 22 | 21 | extdiv, |
| 23 | 22 | fcpsgn, |
| 24 | 23 | float128, |
| ... | ... | @@ -46,6 +45,7 @@ pub const Feature = enum { |
| 46 | 45 | longcall, |
| 47 | 46 | mfocrf, |
| 48 | 47 | mma, |
| 48 | modern_aix_as, | |
| 49 | 49 | msync, |
| 50 | 50 | paired_vector_memops, |
| 51 | 51 | partword_atomics, |
| ... | ... | @@ -62,7 +62,6 @@ pub const Feature = enum { |
| 62 | 62 | ppc6xx, |
| 63 | 63 | predictable_select_expensive, |
| 64 | 64 | prefix_instrs, |
| 65 | qpx, | |
| 66 | 65 | recipprec, |
| 67 | 66 | secure_plt, |
| 68 | 67 | slow_popcntd, |
| ... | ... | @@ -89,6 +88,11 @@ pub const all_features = blk: { |
| 89 | 88 | .description = "Enable 64-bit registers usage for ppc32 [beta]", |
| 90 | 89 | .dependencies = featureSet(&[_]Feature{}), |
| 91 | 90 | }; |
| 91 | result[@enumToInt(Feature.aix)] = .{ | |
| 92 | .llvm_name = "aix", | |
| 93 | .description = "AIX OS", | |
| 94 | .dependencies = featureSet(&[_]Feature{}), | |
| 95 | }; | |
| 92 | 96 | result[@enumToInt(Feature.allow_unaligned_fp_access)] = .{ |
| 93 | 97 | .llvm_name = "allow-unaligned-fp-access", |
| 94 | 98 | .description = "CPU does not trap on unaligned FP access", |
| ... | ... | @@ -142,6 +146,13 @@ pub const all_features = blk: { |
| 142 | 146 | .description = "Enable E500/E500mc instructions", |
| 143 | 147 | .dependencies = featureSet(&[_]Feature{}), |
| 144 | 148 | }; |
| 149 | result[@enumToInt(Feature.efpu2)] = .{ | |
| 150 | .llvm_name = "efpu2", | |
| 151 | .description = "Enable Embedded Floating-Point APU 2 instructions", | |
| 152 | .dependencies = featureSet(&[_]Feature{ | |
| 153 | .spe, | |
| 154 | }), | |
| 155 | }; | |
| 145 | 156 | result[@enumToInt(Feature.extdiv)] = .{ |
| 146 | 157 | .llvm_name = "extdiv", |
| 147 | 158 | .description = "Enable extended divide instructions", |
| ... | ... | @@ -311,6 +322,11 @@ pub const all_features = blk: { |
| 311 | 322 | .power9_altivec, |
| 312 | 323 | }), |
| 313 | 324 | }; |
| 325 | result[@enumToInt(Feature.modern_aix_as)] = .{ | |
| 326 | .llvm_name = "modern-aix-as", | |
| 327 | .description = "AIX system assembler is modern enough to support new mnes", | |
| 328 | .dependencies = featureSet(&[_]Feature{}), | |
| 329 | }; | |
| 314 | 330 | result[@enumToInt(Feature.msync)] = .{ |
| 315 | 331 | .llvm_name = "msync", |
| 316 | 332 | .description = "Has only the msync instruction instead of sync", |
| ... | ... | @@ -334,7 +350,6 @@ pub const all_features = blk: { |
| 334 | 350 | .llvm_name = "pcrelative-memops", |
| 335 | 351 | .description = "Enable PC relative Memory Ops", |
| 336 | 352 | .dependencies = featureSet(&[_]Feature{ |
| 337 | .isa_v30_instructions, | |
| 338 | 353 | .prefix_instrs, |
| 339 | 354 | }), |
| 340 | 355 | }; |
| ... | ... | @@ -378,7 +393,6 @@ pub const all_features = blk: { |
| 378 | 393 | .llvm_name = "power9-vector", |
| 379 | 394 | .description = "Enable POWER9 vector instructions", |
| 380 | 395 | .dependencies = featureSet(&[_]Feature{ |
| 381 | .isa_v30_instructions, | |
| 382 | 396 | .power8_vector, |
| 383 | 397 | .power9_altivec, |
| 384 | 398 | }), |
| ... | ... | @@ -412,18 +426,10 @@ pub const all_features = blk: { |
| 412 | 426 | .llvm_name = "prefix-instrs", |
| 413 | 427 | .description = "Enable prefixed instructions", |
| 414 | 428 | .dependencies = featureSet(&[_]Feature{ |
| 415 | .isa_v30_instructions, | |
| 416 | 429 | .power8_vector, |
| 417 | 430 | .power9_altivec, |
| 418 | 431 | }), |
| 419 | 432 | }; |
| 420 | result[@enumToInt(Feature.qpx)] = .{ | |
| 421 | .llvm_name = null, | |
| 422 | .description = "Enable QPX instructions", | |
| 423 | .dependencies = featureSet(&[_]Feature{ | |
| 424 | .fpu, | |
| 425 | }), | |
| 426 | }; | |
| 427 | 433 | result[@enumToInt(Feature.recipprec)] = .{ |
| 428 | 434 | .llvm_name = "recipprec", |
| 429 | 435 | .description = "Assume higher precision reciprocal estimates", |
| ... | ... | @@ -479,94 +485,90 @@ pub const all_features = blk: { |
| 479 | 485 | }; |
| 480 | 486 | |
| 481 | 487 | pub const cpu = struct { |
| 482 | pub const @"ppc440" = CpuModel{ | |
| 483 | .name = "ppc440", | |
| 488 | pub const @"440" = CpuModel{ | |
| 489 | .name = "440", | |
| 484 | 490 | .llvm_name = "440", |
| 485 | 491 | .features = featureSet(&[_]Feature{ |
| 486 | .booke, | |
| 487 | 492 | .fres, |
| 488 | 493 | .frsqrte, |
| 489 | .icbt, | |
| 490 | 494 | .isel, |
| 491 | 495 | .msync, |
| 492 | 496 | }), |
| 493 | 497 | }; |
| 494 | pub const @"ppc450" = CpuModel{ | |
| 495 | .name = "ppc450", | |
| 498 | pub const @"450" = CpuModel{ | |
| 499 | .name = "450", | |
| 496 | 500 | .llvm_name = "450", |
| 497 | 501 | .features = featureSet(&[_]Feature{ |
| 498 | .booke, | |
| 499 | 502 | .fres, |
| 500 | 503 | .frsqrte, |
| 501 | .icbt, | |
| 502 | 504 | .isel, |
| 503 | 505 | .msync, |
| 504 | 506 | }), |
| 505 | 507 | }; |
| 506 | pub const @"ppc601" = CpuModel{ | |
| 507 | .name = "ppc601", | |
| 508 | pub const @"601" = CpuModel{ | |
| 509 | .name = "601", | |
| 508 | 510 | .llvm_name = "601", |
| 509 | 511 | .features = featureSet(&[_]Feature{ |
| 510 | 512 | .fpu, |
| 511 | 513 | }), |
| 512 | 514 | }; |
| 513 | pub const @"ppc602" = CpuModel{ | |
| 514 | .name = "ppc602", | |
| 515 | pub const @"602" = CpuModel{ | |
| 516 | .name = "602", | |
| 515 | 517 | .llvm_name = "602", |
| 516 | 518 | .features = featureSet(&[_]Feature{ |
| 517 | 519 | .fpu, |
| 518 | 520 | }), |
| 519 | 521 | }; |
| 520 | pub const @"ppc603" = CpuModel{ | |
| 521 | .name = "ppc603", | |
| 522 | pub const @"603" = CpuModel{ | |
| 523 | .name = "603", | |
| 522 | 524 | .llvm_name = "603", |
| 523 | 525 | .features = featureSet(&[_]Feature{ |
| 524 | 526 | .fres, |
| 525 | 527 | .frsqrte, |
| 526 | 528 | }), |
| 527 | 529 | }; |
| 528 | pub const @"ppc603e" = CpuModel{ | |
| 529 | .name = "ppc603e", | |
| 530 | pub const @"603e" = CpuModel{ | |
| 531 | .name = "603e", | |
| 530 | 532 | .llvm_name = "603e", |
| 531 | 533 | .features = featureSet(&[_]Feature{ |
| 532 | 534 | .fres, |
| 533 | 535 | .frsqrte, |
| 534 | 536 | }), |
| 535 | 537 | }; |
| 536 | pub const @"ppc603ev" = CpuModel{ | |
| 537 | .name = "ppc603ev", | |
| 538 | pub const @"603ev" = CpuModel{ | |
| 539 | .name = "603ev", | |
| 538 | 540 | .llvm_name = "603ev", |
| 539 | 541 | .features = featureSet(&[_]Feature{ |
| 540 | 542 | .fres, |
| 541 | 543 | .frsqrte, |
| 542 | 544 | }), |
| 543 | 545 | }; |
| 544 | pub const @"ppc604" = CpuModel{ | |
| 545 | .name = "ppc604", | |
| 546 | pub const @"604" = CpuModel{ | |
| 547 | .name = "604", | |
| 546 | 548 | .llvm_name = "604", |
| 547 | 549 | .features = featureSet(&[_]Feature{ |
| 548 | 550 | .fres, |
| 549 | 551 | .frsqrte, |
| 550 | 552 | }), |
| 551 | 553 | }; |
| 552 | pub const @"ppc604e" = CpuModel{ | |
| 553 | .name = "ppc604e", | |
| 554 | pub const @"604e" = CpuModel{ | |
| 555 | .name = "604e", | |
| 554 | 556 | .llvm_name = "604e", |
| 555 | 557 | .features = featureSet(&[_]Feature{ |
| 556 | 558 | .fres, |
| 557 | 559 | .frsqrte, |
| 558 | 560 | }), |
| 559 | 561 | }; |
| 560 | pub const @"ppc620" = CpuModel{ | |
| 561 | .name = "ppc620", | |
| 562 | pub const @"620" = CpuModel{ | |
| 563 | .name = "620", | |
| 562 | 564 | .llvm_name = "620", |
| 563 | 565 | .features = featureSet(&[_]Feature{ |
| 564 | 566 | .fres, |
| 565 | 567 | .frsqrte, |
| 566 | 568 | }), |
| 567 | 569 | }; |
| 568 | pub const @"ppc7400" = CpuModel{ | |
| 569 | .name = "ppc7400", | |
| 570 | pub const @"7400" = CpuModel{ | |
| 571 | .name = "7400", | |
| 570 | 572 | .llvm_name = "7400", |
| 571 | 573 | .features = featureSet(&[_]Feature{ |
| 572 | 574 | .altivec, |
| ... | ... | @@ -574,8 +576,8 @@ pub const cpu = struct { |
| 574 | 576 | .frsqrte, |
| 575 | 577 | }), |
| 576 | 578 | }; |
| 577 | pub const @"ppc7450" = CpuModel{ | |
| 578 | .name = "ppc7450", | |
| 579 | pub const @"7450" = CpuModel{ | |
| 580 | .name = "7450", | |
| 579 | 581 | .llvm_name = "7450", |
| 580 | 582 | .features = featureSet(&[_]Feature{ |
| 581 | 583 | .altivec, |
| ... | ... | @@ -583,16 +585,16 @@ pub const cpu = struct { |
| 583 | 585 | .frsqrte, |
| 584 | 586 | }), |
| 585 | 587 | }; |
| 586 | pub const @"ppc750" = CpuModel{ | |
| 587 | .name = "ppc750", | |
| 588 | pub const @"750" = CpuModel{ | |
| 589 | .name = "750", | |
| 588 | 590 | .llvm_name = "750", |
| 589 | 591 | .features = featureSet(&[_]Feature{ |
| 590 | 592 | .fres, |
| 591 | 593 | .frsqrte, |
| 592 | 594 | }), |
| 593 | 595 | }; |
| 594 | pub const @"ppc970" = CpuModel{ | |
| 595 | .name = "ppc970", | |
| 596 | pub const @"970" = CpuModel{ | |
| 597 | .name = "970", | |
| 596 | 598 | .llvm_name = "970", |
| 597 | 599 | .features = featureSet(&[_]Feature{ |
| 598 | 600 | .@"64bit", |
| ... | ... | @@ -619,7 +621,6 @@ pub const cpu = struct { |
| 619 | 621 | .frsqrte, |
| 620 | 622 | .frsqrtes, |
| 621 | 623 | .fsqrt, |
| 622 | .icbt, | |
| 623 | 624 | .isel, |
| 624 | 625 | .ldbrx, |
| 625 | 626 | .lfiwax, |
| ... | ... | @@ -629,38 +630,10 @@ pub const cpu = struct { |
| 629 | 630 | .stfiwx, |
| 630 | 631 | }), |
| 631 | 632 | }; |
| 632 | pub const a2q = CpuModel{ | |
| 633 | .name = "a2q", | |
| 634 | .llvm_name = "a2q", | |
| 635 | .features = featureSet(&[_]Feature{ | |
| 636 | .@"64bit", | |
| 637 | .booke, | |
| 638 | .cmpb, | |
| 639 | .fcpsgn, | |
| 640 | .fpcvt, | |
| 641 | .fprnd, | |
| 642 | .fre, | |
| 643 | .fres, | |
| 644 | .frsqrte, | |
| 645 | .frsqrtes, | |
| 646 | .fsqrt, | |
| 647 | .icbt, | |
| 648 | .isel, | |
| 649 | .ldbrx, | |
| 650 | .lfiwax, | |
| 651 | .mfocrf, | |
| 652 | .qpx, | |
| 653 | .recipprec, | |
| 654 | .slow_popcntd, | |
| 655 | .stfiwx, | |
| 656 | }), | |
| 657 | }; | |
| 658 | 633 | pub const e500 = CpuModel{ |
| 659 | 634 | .name = "e500", |
| 660 | 635 | .llvm_name = "e500", |
| 661 | 636 | .features = featureSet(&[_]Feature{ |
| 662 | .booke, | |
| 663 | .icbt, | |
| 664 | 637 | .isel, |
| 665 | 638 | .msync, |
| 666 | 639 | .spe, |
| ... | ... | @@ -671,7 +644,6 @@ pub const cpu = struct { |
| 671 | 644 | .llvm_name = "e500mc", |
| 672 | 645 | .features = featureSet(&[_]Feature{ |
| 673 | 646 | .booke, |
| 674 | .icbt, | |
| 675 | 647 | .isel, |
| 676 | 648 | .stfiwx, |
| 677 | 649 | }), |
| ... | ... | @@ -682,7 +654,6 @@ pub const cpu = struct { |
| 682 | 654 | .features = featureSet(&[_]Feature{ |
| 683 | 655 | .@"64bit", |
| 684 | 656 | .booke, |
| 685 | .icbt, | |
| 686 | 657 | .isel, |
| 687 | 658 | .mfocrf, |
| 688 | 659 | .stfiwx, |
| ... | ... | @@ -694,7 +665,6 @@ pub const cpu = struct { |
| 694 | 665 | .features = featureSet(&[_]Feature{ |
| 695 | 666 | .@"64bit", |
| 696 | 667 | .allow_unaligned_fp_access, |
| 697 | .altivec, | |
| 698 | 668 | .bpermd, |
| 699 | 669 | .cmpb, |
| 700 | 670 | .crypto, |
| ... | ... | @@ -711,30 +681,21 @@ pub const cpu = struct { |
| 711 | 681 | .fuse_store, |
| 712 | 682 | .htm, |
| 713 | 683 | .icbt, |
| 714 | .isa_v30_instructions, | |
| 715 | .isa_v31_instructions, | |
| 716 | 684 | .isel, |
| 717 | 685 | .ldbrx, |
| 718 | 686 | .lfiwax, |
| 719 | 687 | .mfocrf, |
| 720 | 688 | .mma, |
| 721 | .paired_vector_memops, | |
| 722 | 689 | .partword_atomics, |
| 723 | 690 | .pcrelative_memops, |
| 724 | 691 | .popcntd, |
| 725 | 692 | .power10_vector, |
| 726 | .power8_altivec, | |
| 727 | .power8_vector, | |
| 728 | .power9_altivec, | |
| 729 | .power9_vector, | |
| 730 | 693 | .ppc_postra_sched, |
| 731 | 694 | .ppc_prera_sched, |
| 732 | 695 | .predictable_select_expensive, |
| 733 | .prefix_instrs, | |
| 734 | 696 | .recipprec, |
| 735 | 697 | .stfiwx, |
| 736 | 698 | .two_const_nr, |
| 737 | .vsx, | |
| 738 | 699 | }), |
| 739 | 700 | }; |
| 740 | 701 | pub const g3 = CpuModel{ |
| ... | ... | @@ -792,7 +753,7 @@ pub const cpu = struct { |
| 792 | 753 | }; |
| 793 | 754 | pub const ppc32 = CpuModel{ |
| 794 | 755 | .name = "ppc32", |
| 795 | .llvm_name = "ppc", | |
| 756 | .llvm_name = "ppc32", | |
| 796 | 757 | .features = featureSet(&[_]Feature{ |
| 797 | 758 | .hard_float, |
| 798 | 759 | }), |
| ... | ... | @@ -816,7 +777,6 @@ pub const cpu = struct { |
| 816 | 777 | .features = featureSet(&[_]Feature{ |
| 817 | 778 | .@"64bit", |
| 818 | 779 | .allow_unaligned_fp_access, |
| 819 | .altivec, | |
| 820 | 780 | .bpermd, |
| 821 | 781 | .cmpb, |
| 822 | 782 | .crypto, |
| ... | ... | @@ -840,13 +800,11 @@ pub const cpu = struct { |
| 840 | 800 | .mfocrf, |
| 841 | 801 | .partword_atomics, |
| 842 | 802 | .popcntd, |
| 843 | .power8_altivec, | |
| 844 | 803 | .power8_vector, |
| 845 | 804 | .predictable_select_expensive, |
| 846 | 805 | .recipprec, |
| 847 | 806 | .stfiwx, |
| 848 | 807 | .two_const_nr, |
| 849 | .vsx, | |
| 850 | 808 | }), |
| 851 | 809 | }; |
| 852 | 810 | pub const pwr10 = CpuModel{ |
| ... | ... | @@ -855,7 +813,6 @@ pub const cpu = struct { |
| 855 | 813 | .features = featureSet(&[_]Feature{ |
| 856 | 814 | .@"64bit", |
| 857 | 815 | .allow_unaligned_fp_access, |
| 858 | .altivec, | |
| 859 | 816 | .bpermd, |
| 860 | 817 | .cmpb, |
| 861 | 818 | .crypto, |
| ... | ... | @@ -872,30 +829,21 @@ pub const cpu = struct { |
| 872 | 829 | .fuse_store, |
| 873 | 830 | .htm, |
| 874 | 831 | .icbt, |
| 875 | .isa_v30_instructions, | |
| 876 | .isa_v31_instructions, | |
| 877 | 832 | .isel, |
| 878 | 833 | .ldbrx, |
| 879 | 834 | .lfiwax, |
| 880 | 835 | .mfocrf, |
| 881 | 836 | .mma, |
| 882 | .paired_vector_memops, | |
| 883 | 837 | .partword_atomics, |
| 884 | 838 | .pcrelative_memops, |
| 885 | 839 | .popcntd, |
| 886 | 840 | .power10_vector, |
| 887 | .power8_altivec, | |
| 888 | .power8_vector, | |
| 889 | .power9_altivec, | |
| 890 | .power9_vector, | |
| 891 | 841 | .ppc_postra_sched, |
| 892 | 842 | .ppc_prera_sched, |
| 893 | 843 | .predictable_select_expensive, |
| 894 | .prefix_instrs, | |
| 895 | 844 | .recipprec, |
| 896 | 845 | .stfiwx, |
| 897 | 846 | .two_const_nr, |
| 898 | .vsx, | |
| 899 | 847 | }), |
| 900 | 848 | }; |
| 901 | 849 | pub const pwr3 = CpuModel{ |
| ... | ... | @@ -1000,7 +948,6 @@ pub const cpu = struct { |
| 1000 | 948 | .features = featureSet(&[_]Feature{ |
| 1001 | 949 | .@"64bit", |
| 1002 | 950 | .allow_unaligned_fp_access, |
| 1003 | .altivec, | |
| 1004 | 951 | .bpermd, |
| 1005 | 952 | .cmpb, |
| 1006 | 953 | .extdiv, |
| ... | ... | @@ -1029,7 +976,6 @@ pub const cpu = struct { |
| 1029 | 976 | .features = featureSet(&[_]Feature{ |
| 1030 | 977 | .@"64bit", |
| 1031 | 978 | .allow_unaligned_fp_access, |
| 1032 | .altivec, | |
| 1033 | 979 | .bpermd, |
| 1034 | 980 | .cmpb, |
| 1035 | 981 | .crypto, |
| ... | ... | @@ -1053,13 +999,11 @@ pub const cpu = struct { |
| 1053 | 999 | .mfocrf, |
| 1054 | 1000 | .partword_atomics, |
| 1055 | 1001 | .popcntd, |
| 1056 | .power8_altivec, | |
| 1057 | 1002 | .power8_vector, |
| 1058 | 1003 | .predictable_select_expensive, |
| 1059 | 1004 | .recipprec, |
| 1060 | 1005 | .stfiwx, |
| 1061 | 1006 | .two_const_nr, |
| 1062 | .vsx, | |
| 1063 | 1007 | }), |
| 1064 | 1008 | }; |
| 1065 | 1009 | pub const pwr9 = CpuModel{ |
| ... | ... | @@ -1068,7 +1012,6 @@ pub const cpu = struct { |
| 1068 | 1012 | .features = featureSet(&[_]Feature{ |
| 1069 | 1013 | .@"64bit", |
| 1070 | 1014 | .allow_unaligned_fp_access, |
| 1071 | .altivec, | |
| 1072 | 1015 | .bpermd, |
| 1073 | 1016 | .cmpb, |
| 1074 | 1017 | .crypto, |
| ... | ... | @@ -1084,16 +1027,12 @@ pub const cpu = struct { |
| 1084 | 1027 | .fsqrt, |
| 1085 | 1028 | .htm, |
| 1086 | 1029 | .icbt, |
| 1087 | .isa_v30_instructions, | |
| 1088 | 1030 | .isel, |
| 1089 | 1031 | .ldbrx, |
| 1090 | 1032 | .lfiwax, |
| 1091 | 1033 | .mfocrf, |
| 1092 | 1034 | .partword_atomics, |
| 1093 | 1035 | .popcntd, |
| 1094 | .power8_altivec, | |
| 1095 | .power8_vector, | |
| 1096 | .power9_altivec, | |
| 1097 | 1036 | .power9_vector, |
| 1098 | 1037 | .ppc_postra_sched, |
| 1099 | 1038 | .ppc_prera_sched, |
| ... | ... | @@ -1102,7 +1041,6 @@ pub const cpu = struct { |
| 1102 | 1041 | .stfiwx, |
| 1103 | 1042 | .two_const_nr, |
| 1104 | 1043 | .vectors_use_two_units, |
| 1105 | .vsx, | |
| 1106 | 1044 | }), |
| 1107 | 1045 | }; |
| 1108 | 1046 | }; |
lib/std/target/sparc.zig+7-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
| ... | ... | @@ -160,6 +157,11 @@ pub const cpu = struct { |
| 160 | 157 | .llvm_name = "f934", |
| 161 | 158 | .features = featureSet(&[_]Feature{}), |
| 162 | 159 | }; |
| 160 | pub const generic = CpuModel{ | |
| 161 | .name = "generic", | |
| 162 | .llvm_name = "generic", | |
| 163 | .features = featureSet(&[_]Feature{}), | |
| 164 | }; | |
| 163 | 165 | pub const gr712rc = CpuModel{ |
| 164 | 166 | .name = "gr712rc", |
| 165 | 167 | .llvm_name = "gr712rc", |
lib/std/target/systemz.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |
lib/std/target/ve.zig created+36| ... | ... | @@ -0,0 +1,36 @@ |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 3 | const std = @import("../std.zig"); | |
| 4 | const CpuFeature = std.Target.Cpu.Feature; | |
| 5 | const CpuModel = std.Target.Cpu.Model; | |
| 6 | ||
| 7 | pub const Feature = enum { | |
| 8 | vpu, | |
| 9 | }; | |
| 10 | ||
| 11 | pub usingnamespace CpuFeature.feature_set_fns(Feature); | |
| 12 | ||
| 13 | pub const all_features = blk: { | |
| 14 | const len = @typeInfo(Feature).Enum.fields.len; | |
| 15 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); | |
| 16 | var result: [len]CpuFeature = undefined; | |
| 17 | result[@enumToInt(Feature.vpu)] = .{ | |
| 18 | .llvm_name = "vpu", | |
| 19 | .description = "Enable the VPU", | |
| 20 | .dependencies = featureSet(&[_]Feature{}), | |
| 21 | }; | |
| 22 | const ti = @typeInfo(Feature); | |
| 23 | for (result) |*elem, i| { | |
| 24 | elem.index = i; | |
| 25 | elem.name = ti.Enum.fields[i].name; | |
| 26 | } | |
| 27 | break :blk result; | |
| 28 | }; | |
| 29 | ||
| 30 | pub const cpu = struct { | |
| 31 | pub const generic = CpuModel{ | |
| 32 | .name = "generic", | |
| 33 | .llvm_name = "generic", | |
| 34 | .features = featureSet(&[_]Feature{}), | |
| 35 | }; | |
| 36 | }; |
lib/std/target/wasm.zig+2-5| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | // SPDX-License-Identifier: MIT | |
| 2 | // Copyright (c) 2015-2021 Zig Contributors | |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. | |
| 4 | // The MIT license requires this copyright notice to be included in all copies | |
| 5 | // and substantial portions of the software. | |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 6 | 3 | const std = @import("../std.zig"); |
| 7 | 4 | const CpuFeature = std.Target.Cpu.Feature; |
| 8 | 5 | const CpuModel = std.Target.Cpu.Model; |