authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-20 01:42:31-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-20 01:42:31-05:00
log8f29d1407350190e1e641ca55f870f00b53d0246
treedd5e25784d7612f9f30a324d612338a44f1b38eb
parent20af858601e015ba76f23033d0af1d672db097ac
signature Commit is signed but in an unrecognized format.

stage1 is building. `zig targets` now self-hosted


10 files changed, 307 insertions(+), 466 deletions(-)

BRANCH_TODO+2
......@@ -1,5 +1,7 @@
11Finish these thigns before merging teh branch
22
3 * it gets the wrong answers with `-target-feature -sse,-avx`
4
35 * finish refactoring target/arch/*
46 * `zig builtin` integration
57 * move target details to better location
lib/std/builtin.zig+3
......@@ -1,5 +1,8 @@
11pub usingnamespace @import("builtin");
22
3/// Deprecated: use `std.Target.Os`.
4pub const Target = std.Target;
5
36/// Deprecated: use `std.Target.Os`.
47pub const Os = std.Target.Os;
58
lib/std/target.zig+31-31
......@@ -49,6 +49,22 @@ pub const Target = union(enum) {
4949 other,
5050 };
5151
52 pub const aarch64 = @import("target/aarch64.zig");
53 pub const amdgpu = @import("target/amdgpu.zig");
54 pub const arm = @import("target/arm.zig");
55 pub const avr = @import("target/avr.zig");
56 pub const bpf = @import("target/bpf.zig");
57 pub const hexagon = @import("target/hexagon.zig");
58 pub const mips = @import("target/mips.zig");
59 pub const msp430 = @import("target/msp430.zig");
60 pub const nvptx = @import("target/nvptx.zig");
61 pub const powerpc = @import("target/powerpc.zig");
62 pub const riscv = @import("target/riscv.zig");
63 pub const sparc = @import("target/sparc.zig");
64 pub const systemz = @import("target/systemz.zig");
65 pub const wasm = @import("target/wasm.zig");
66 pub const x86 = @import("target/x86.zig");
67
5268 pub const Arch = union(enum) {
5369 arm: Arm32,
5470 armeb: Arm32,
......@@ -101,22 +117,6 @@ pub const Target = union(enum) {
101117 renderscript32,
102118 renderscript64,
103119
104 pub const aarch64 = @import("target/aarch64.zig");
105 pub const amdgpu = @import("target/amdgpu.zig");
106 pub const arm = @import("target/arm.zig");
107 pub const avr = @import("target/avr.zig");
108 pub const bpf = @import("target/bpf.zig");
109 pub const hexagon = @import("target/hexagon.zig");
110 pub const mips = @import("target/mips.zig");
111 pub const msp430 = @import("target/msp430.zig");
112 pub const nvptx = @import("target/nvptx.zig");
113 pub const powerpc = @import("target/powerpc.zig");
114 pub const riscv = @import("target/riscv.zig");
115 pub const sparc = @import("target/sparc.zig");
116 pub const systemz = @import("target/systemz.zig");
117 pub const wasm = @import("target/wasm.zig");
118 pub const x86 = @import("target/x86.zig");
119
120120 pub const Arm32 = enum {
121121 v8_5a,
122122 v8_4a,
......@@ -251,7 +251,7 @@ pub const Target = union(enum) {
251251 };
252252 for (arch.allFeaturesList()) |feature, index| {
253253 if (mem.eql(u8, feature_name, feature.name)) {
254 set |= @splat(2, 1 << index);
254 set |= @splat(2, @as(Cpu.Feature.Set, 1) << @intCast(u7, index));
255255 break;
256256 }
257257 } else {
......@@ -440,7 +440,7 @@ pub const Target = union(enum) {
440440 // TODO .sparc, .sparcv9, .sparcel => sparc.baseline_features,
441441 // TODO .s390x => systemz.baseline_features,
442442 .i386 => x86.cpu.pentium4.features,
443 .x86_64 => x86.cpu.x8664.features,
443 .x86_64 => x86.cpu.x86_64.features,
444444 // TODO .nvptx, .nvptx64 => nvptx.baseline_features,
445445 // TODO .wasm32, .wasm64 => wasm.baseline_features,
446446
......@@ -451,21 +451,21 @@ pub const Target = union(enum) {
451451 /// All CPUs Zig is aware of, sorted lexicographically by name.
452452 pub fn allCpus(arch: Arch) []const *const Cpu {
453453 return switch (arch) {
454 .arm, .armeb, .thumb, .thumbeb => arm.all_cpus,
454 // TODO .arm, .armeb, .thumb, .thumbeb => arm.all_cpus,
455455 .aarch64, .aarch64_be, .aarch64_32 => aarch64.all_cpus,
456 .avr => avr.all_cpus,
457 .bpfel, .bpfeb => bpf.all_cpus,
458 .hexagon => hexagon.all_cpus,
459 .mips, .mipsel, .mips64, .mips64el => mips.all_cpus,
460 .msp430 => msp430.all_cpus,
461 .powerpc, .powerpc64, .powerpc64le => powerpc.all_cpus,
462 .amdgcn => amdgpu.all_cpus,
463 .riscv32, .riscv64 => riscv.all_cpus,
464 .sparc, .sparcv9, .sparcel => sparc.all_cpus,
465 .s390x => systemz.all_cpus,
456 // TODO .avr => avr.all_cpus,
457 // TODO .bpfel, .bpfeb => bpf.all_cpus,
458 // TODO .hexagon => hexagon.all_cpus,
459 // TODO .mips, .mipsel, .mips64, .mips64el => mips.all_cpus,
460 // TODO .msp430 => msp430.all_cpus,
461 // TODO .powerpc, .powerpc64, .powerpc64le => powerpc.all_cpus,
462 // TODO .amdgcn => amdgpu.all_cpus,
463 // TODO .riscv32, .riscv64 => riscv.all_cpus,
464 // TODO .sparc, .sparcv9, .sparcel => sparc.all_cpus,
465 // TODO .s390x => systemz.all_cpus,
466466 .i386, .x86_64 => x86.all_cpus,
467 .nvptx, .nvptx64 => nvptx.all_cpus,
468 .wasm32, .wasm64 => wasm.all_cpus,
467 // TODO .nvptx, .nvptx64 => nvptx.all_cpus,
468 // TODO .wasm32, .wasm64 => wasm.all_cpus,
469469
470470 else => &[0]*const Cpu{},
471471 };
lib/std/target/x86.zig+196-196
......@@ -1213,10 +1213,10 @@ pub const cpu = struct {
12131213 pub const amdfam10 = Cpu{
12141214 .name = "amdfam10",
12151215 .llvm_name = "amdfam10",
1216 .dependencies = featureSet(&[_]Feature{
1216 .features = featureSet(&[_]Feature{
12171217 .mmx,
1218 .dnowa3,
1219 .bit64,
1218 .@"3dnowa",
1219 .@"64bit",
12201220 .cmov,
12211221 .cx8,
12221222 .cx16,
......@@ -1236,9 +1236,9 @@ pub const cpu = struct {
12361236 pub const athlon = Cpu{
12371237 .name = "athlon",
12381238 .llvm_name = "athlon",
1239 .dependencies = featureSet(&[_]Feature{
1239 .features = featureSet(&[_]Feature{
12401240 .mmx,
1241 .dnowa3,
1241 .@"3dnowa",
12421242 .cmov,
12431243 .cx8,
12441244 .nopl,
......@@ -1251,9 +1251,9 @@ pub const cpu = struct {
12511251 pub const athlon4 = Cpu{
12521252 .name = "athlon_4",
12531253 .llvm_name = "athlon-4",
1254 .dependencies = featureSet(&[_]Feature{
1254 .features = featureSet(&[_]Feature{
12551255 .mmx,
1256 .dnowa3,
1256 .@"3dnowa",
12571257 .cmov,
12581258 .cx8,
12591259 .fxsr,
......@@ -1268,10 +1268,10 @@ pub const cpu = struct {
12681268 pub const athlon_fx = Cpu{
12691269 .name = "athlon_fx",
12701270 .llvm_name = "athlon-fx",
1271 .dependencies = featureSet(&[_]Feature{
1271 .features = featureSet(&[_]Feature{
12721272 .mmx,
1273 .dnowa3,
1274 .bit64,
1273 .@"3dnowa",
1274 .@"64bit",
12751275 .cmov,
12761276 .cx8,
12771277 .fxsr,
......@@ -1288,9 +1288,9 @@ pub const cpu = struct {
12881288 pub const athlon_mp = Cpu{
12891289 .name = "athlon_mp",
12901290 .llvm_name = "athlon-mp",
1291 .dependencies = featureSet(&[_]Feature{
1291 .features = featureSet(&[_]Feature{
12921292 .mmx,
1293 .dnowa3,
1293 .@"3dnowa",
12941294 .cmov,
12951295 .cx8,
12961296 .fxsr,
......@@ -1305,9 +1305,9 @@ pub const cpu = struct {
13051305 pub const athlon_tbird = Cpu{
13061306 .name = "athlon_tbird",
13071307 .llvm_name = "athlon-tbird",
1308 .dependencies = featureSet(&[_]Feature{
1308 .features = featureSet(&[_]Feature{
13091309 .mmx,
1310 .dnowa3,
1310 .@"3dnowa",
13111311 .cmov,
13121312 .cx8,
13131313 .nopl,
......@@ -1320,9 +1320,9 @@ pub const cpu = struct {
13201320 pub const athlon_xp = Cpu{
13211321 .name = "athlon_xp",
13221322 .llvm_name = "athlon-xp",
1323 .dependencies = featureSet(&[_]Feature{
1323 .features = featureSet(&[_]Feature{
13241324 .mmx,
1325 .dnowa3,
1325 .@"3dnowa",
13261326 .cmov,
13271327 .cx8,
13281328 .fxsr,
......@@ -1337,10 +1337,10 @@ pub const cpu = struct {
13371337 pub const athlon64 = Cpu{
13381338 .name = "athlon64",
13391339 .llvm_name = "athlon64",
1340 .dependencies = featureSet(&[_]Feature{
1340 .features = featureSet(&[_]Feature{
13411341 .mmx,
1342 .dnowa3,
1343 .bit64,
1342 .@"3dnowa",
1343 .@"64bit",
13441344 .cmov,
13451345 .cx8,
13461346 .fxsr,
......@@ -1357,10 +1357,10 @@ pub const cpu = struct {
13571357 pub const athlon64_sse3 = Cpu{
13581358 .name = "athlon64_sse3",
13591359 .llvm_name = "athlon64-sse3",
1360 .dependencies = featureSet(&[_]Feature{
1360 .features = featureSet(&[_]Feature{
13611361 .mmx,
1362 .dnowa3,
1363 .bit64,
1362 .@"3dnowa",
1363 .@"64bit",
13641364 .cmov,
13651365 .cx8,
13661366 .cx16,
......@@ -1378,8 +1378,8 @@ pub const cpu = struct {
13781378 pub const atom = Cpu{
13791379 .name = "atom",
13801380 .llvm_name = "atom",
1381 .dependencies = featureSet(&[_]Feature{
1382 .bit64,
1381 .features = featureSet(&[_]Feature{
1382 .@"64bit",
13831383 .cmov,
13841384 .cx8,
13851385 .cx16,
......@@ -1404,10 +1404,10 @@ pub const cpu = struct {
14041404 pub const barcelona = Cpu{
14051405 .name = "barcelona",
14061406 .llvm_name = "barcelona",
1407 .dependencies = featureSet(&[_]Feature{
1407 .features = featureSet(&[_]Feature{
14081408 .mmx,
1409 .dnowa3,
1410 .bit64,
1409 .@"3dnowa",
1410 .@"64bit",
14111411 .cmov,
14121412 .cx8,
14131413 .cx16,
......@@ -1427,8 +1427,8 @@ pub const cpu = struct {
14271427 pub const bdver1 = Cpu{
14281428 .name = "bdver1",
14291429 .llvm_name = "bdver1",
1430 .dependencies = featureSet(&[_]Feature{
1431 .bit64,
1430 .features = featureSet(&[_]Feature{
1431 .@"64bit",
14321432 .sse,
14331433 .aes,
14341434 .branchfusion,
......@@ -1436,7 +1436,7 @@ pub const cpu = struct {
14361436 .cx8,
14371437 .cx16,
14381438 .fxsr,
1439 .fast11bytenop,
1439 .fast_11bytenop,
14401440 .fast_scalar_shift_masks,
14411441 .sahf,
14421442 .lwp,
......@@ -1456,8 +1456,8 @@ pub const cpu = struct {
14561456 pub const bdver2 = Cpu{
14571457 .name = "bdver2",
14581458 .llvm_name = "bdver2",
1459 .dependencies = featureSet(&[_]Feature{
1460 .bit64,
1459 .features = featureSet(&[_]Feature{
1460 .@"64bit",
14611461 .sse,
14621462 .aes,
14631463 .bmi,
......@@ -1468,7 +1468,7 @@ pub const cpu = struct {
14681468 .f16c,
14691469 .fma,
14701470 .fxsr,
1471 .fast11bytenop,
1471 .fast_11bytenop,
14721472 .fast_bextr,
14731473 .fast_scalar_shift_masks,
14741474 .sahf,
......@@ -1490,8 +1490,8 @@ pub const cpu = struct {
14901490 pub const bdver3 = Cpu{
14911491 .name = "bdver3",
14921492 .llvm_name = "bdver3",
1493 .dependencies = featureSet(&[_]Feature{
1494 .bit64,
1493 .features = featureSet(&[_]Feature{
1494 .@"64bit",
14951495 .sse,
14961496 .aes,
14971497 .bmi,
......@@ -1503,7 +1503,7 @@ pub const cpu = struct {
15031503 .fma,
15041504 .fsgsbase,
15051505 .fxsr,
1506 .fast11bytenop,
1506 .fast_11bytenop,
15071507 .fast_bextr,
15081508 .fast_scalar_shift_masks,
15091509 .sahf,
......@@ -1526,8 +1526,8 @@ pub const cpu = struct {
15261526 pub const bdver4 = Cpu{
15271527 .name = "bdver4",
15281528 .llvm_name = "bdver4",
1529 .dependencies = featureSet(&[_]Feature{
1530 .bit64,
1529 .features = featureSet(&[_]Feature{
1530 .@"64bit",
15311531 .sse,
15321532 .aes,
15331533 .avx2,
......@@ -1541,7 +1541,7 @@ pub const cpu = struct {
15411541 .fma,
15421542 .fsgsbase,
15431543 .fxsr,
1544 .fast11bytenop,
1544 .fast_11bytenop,
15451545 .fast_bextr,
15461546 .fast_scalar_shift_masks,
15471547 .sahf,
......@@ -1565,8 +1565,8 @@ pub const cpu = struct {
15651565 pub const bonnell = Cpu{
15661566 .name = "bonnell",
15671567 .llvm_name = "bonnell",
1568 .dependencies = featureSet(&[_]Feature{
1569 .bit64,
1568 .features = featureSet(&[_]Feature{
1569 .@"64bit",
15701570 .cmov,
15711571 .cx8,
15721572 .cx16,
......@@ -1591,8 +1591,8 @@ pub const cpu = struct {
15911591 pub const broadwell = Cpu{
15921592 .name = "broadwell",
15931593 .llvm_name = "broadwell",
1594 .dependencies = featureSet(&[_]Feature{
1595 .bit64,
1594 .features = featureSet(&[_]Feature{
1595 .@"64bit",
15961596 .adx,
15971597 .sse,
15981598 .avx,
......@@ -1625,7 +1625,7 @@ pub const cpu = struct {
16251625 .prfchw,
16261626 .rdrnd,
16271627 .rdseed,
1628 .sse42,
1628 .sse4_2,
16291629 .slow_3ops_lea,
16301630 .idivq_to_divl,
16311631 .x87,
......@@ -1637,13 +1637,13 @@ pub const cpu = struct {
16371637 pub const btver1 = Cpu{
16381638 .name = "btver1",
16391639 .llvm_name = "btver1",
1640 .dependencies = featureSet(&[_]Feature{
1641 .bit64,
1640 .features = featureSet(&[_]Feature{
1641 .@"64bit",
16421642 .cmov,
16431643 .cx8,
16441644 .cx16,
16451645 .fxsr,
1646 .fast15bytenop,
1646 .fast_15bytenop,
16471647 .fast_scalar_shift_masks,
16481648 .fast_vector_shift_masks,
16491649 .sahf,
......@@ -1663,8 +1663,8 @@ pub const cpu = struct {
16631663 pub const btver2 = Cpu{
16641664 .name = "btver2",
16651665 .llvm_name = "btver2",
1666 .dependencies = featureSet(&[_]Feature{
1667 .bit64,
1666 .features = featureSet(&[_]Feature{
1667 .@"64bit",
16681668 .sse,
16691669 .aes,
16701670 .avx,
......@@ -1674,7 +1674,7 @@ pub const cpu = struct {
16741674 .cx16,
16751675 .f16c,
16761676 .fxsr,
1677 .fast15bytenop,
1677 .fast_15bytenop,
16781678 .fast_bextr,
16791679 .fast_hops,
16801680 .fast_lzcnt,
......@@ -1701,9 +1701,9 @@ pub const cpu = struct {
17011701 pub const c3 = Cpu{
17021702 .name = "c3",
17031703 .llvm_name = "c3",
1704 .dependencies = featureSet(&[_]Feature{
1704 .features = featureSet(&[_]Feature{
17051705 .mmx,
1706 .dnow3,
1706 .@"3dnow",
17071707 .slow_unaligned_mem_16,
17081708 .x87,
17091709 }),
......@@ -1712,7 +1712,7 @@ pub const cpu = struct {
17121712 pub const c32 = Cpu{
17131713 .name = "c3_2",
17141714 .llvm_name = "c3-2",
1715 .dependencies = featureSet(&[_]Feature{
1715 .features = featureSet(&[_]Feature{
17161716 .cmov,
17171717 .cx8,
17181718 .fxsr,
......@@ -1726,8 +1726,8 @@ pub const cpu = struct {
17261726 pub const cannonlake = Cpu{
17271727 .name = "cannonlake",
17281728 .llvm_name = "cannonlake",
1729 .dependencies = featureSet(&[_]Feature{
1730 .bit64,
1729 .features = featureSet(&[_]Feature{
1730 .@"64bit",
17311731 .adx,
17321732 .sse,
17331733 .aes,
......@@ -1771,7 +1771,7 @@ pub const cpu = struct {
17711771 .rdseed,
17721772 .sgx,
17731773 .sha,
1774 .sse42,
1774 .sse4_2,
17751775 .slow_3ops_lea,
17761776 .idivq_to_divl,
17771777 .avx512vbmi,
......@@ -1787,8 +1787,8 @@ pub const cpu = struct {
17871787 pub const cascadelake = Cpu{
17881788 .name = "cascadelake",
17891789 .llvm_name = "cascadelake",
1790 .dependencies = featureSet(&[_]Feature{
1791 .bit64,
1790 .features = featureSet(&[_]Feature{
1791 .@"64bit",
17921792 .adx,
17931793 .sse,
17941794 .aes,
......@@ -1831,7 +1831,7 @@ pub const cpu = struct {
18311831 .prfchw,
18321832 .rdrnd,
18331833 .rdseed,
1834 .sse42,
1834 .sse4_2,
18351835 .slow_3ops_lea,
18361836 .idivq_to_divl,
18371837 .avx512vl,
......@@ -1847,8 +1847,8 @@ pub const cpu = struct {
18471847 pub const cooperlake = Cpu{
18481848 .name = "cooperlake",
18491849 .llvm_name = "cooperlake",
1850 .dependencies = featureSet(&[_]Feature{
1851 .bit64,
1850 .features = featureSet(&[_]Feature{
1851 .@"64bit",
18521852 .adx,
18531853 .sse,
18541854 .aes,
......@@ -1892,7 +1892,7 @@ pub const cpu = struct {
18921892 .prfchw,
18931893 .rdrnd,
18941894 .rdseed,
1895 .sse42,
1895 .sse4_2,
18961896 .slow_3ops_lea,
18971897 .idivq_to_divl,
18981898 .avx512vl,
......@@ -1908,8 +1908,8 @@ pub const cpu = struct {
19081908 pub const core_avx_i = Cpu{
19091909 .name = "core_avx_i",
19101910 .llvm_name = "core-avx-i",
1911 .dependencies = featureSet(&[_]Feature{
1912 .bit64,
1911 .features = featureSet(&[_]Feature{
1912 .@"64bit",
19131913 .sse,
19141914 .avx,
19151915 .cmov,
......@@ -1929,7 +1929,7 @@ pub const cpu = struct {
19291929 .popcnt,
19301930 .false_deps_popcnt,
19311931 .rdrnd,
1932 .sse42,
1932 .sse4_2,
19331933 .slow_3ops_lea,
19341934 .idivq_to_divl,
19351935 .slow_unaligned_mem_32,
......@@ -1942,8 +1942,8 @@ pub const cpu = struct {
19421942 pub const core_avx2 = Cpu{
19431943 .name = "core_avx2",
19441944 .llvm_name = "core-avx2",
1945 .dependencies = featureSet(&[_]Feature{
1946 .bit64,
1945 .features = featureSet(&[_]Feature{
1946 .@"64bit",
19471947 .sse,
19481948 .avx,
19491949 .avx2,
......@@ -1973,7 +1973,7 @@ pub const cpu = struct {
19731973 .popcnt,
19741974 .false_deps_popcnt,
19751975 .rdrnd,
1976 .sse42,
1976 .sse4_2,
19771977 .slow_3ops_lea,
19781978 .idivq_to_divl,
19791979 .x87,
......@@ -1985,8 +1985,8 @@ pub const cpu = struct {
19851985 pub const core2 = Cpu{
19861986 .name = "core2",
19871987 .llvm_name = "core2",
1988 .dependencies = featureSet(&[_]Feature{
1989 .bit64,
1988 .features = featureSet(&[_]Feature{
1989 .@"64bit",
19901990 .cmov,
19911991 .cx8,
19921992 .cx16,
......@@ -2005,8 +2005,8 @@ pub const cpu = struct {
20052005 pub const corei7 = Cpu{
20062006 .name = "corei7",
20072007 .llvm_name = "corei7",
2008 .dependencies = featureSet(&[_]Feature{
2009 .bit64,
2008 .features = featureSet(&[_]Feature{
2009 .@"64bit",
20102010 .cmov,
20112011 .cx8,
20122012 .cx16,
......@@ -2017,7 +2017,7 @@ pub const cpu = struct {
20172017 .nopl,
20182018 .popcnt,
20192019 .sse,
2020 .sse42,
2020 .sse4_2,
20212021 .x87,
20222022 }),
20232023 };
......@@ -2025,8 +2025,8 @@ pub const cpu = struct {
20252025 pub const corei7_avx = Cpu{
20262026 .name = "corei7_avx",
20272027 .llvm_name = "corei7-avx",
2028 .dependencies = featureSet(&[_]Feature{
2029 .bit64,
2028 .features = featureSet(&[_]Feature{
2029 .@"64bit",
20302030 .sse,
20312031 .avx,
20322032 .cmov,
......@@ -2043,7 +2043,7 @@ pub const cpu = struct {
20432043 .pclmul,
20442044 .popcnt,
20452045 .false_deps_popcnt,
2046 .sse42,
2046 .sse4_2,
20472047 .slow_3ops_lea,
20482048 .idivq_to_divl,
20492049 .slow_unaligned_mem_32,
......@@ -2056,7 +2056,7 @@ pub const cpu = struct {
20562056 pub const generic = Cpu{
20572057 .name = "generic",
20582058 .llvm_name = "generic",
2059 .dependencies = featureSet(&[_]Feature{
2059 .features = featureSet(&[_]Feature{
20602060 .cx8,
20612061 .slow_unaligned_mem_16,
20622062 .x87,
......@@ -2066,9 +2066,9 @@ pub const cpu = struct {
20662066 pub const geode = Cpu{
20672067 .name = "geode",
20682068 .llvm_name = "geode",
2069 .dependencies = featureSet(&[_]Feature{
2069 .features = featureSet(&[_]Feature{
20702070 .mmx,
2071 .dnowa3,
2071 .@"3dnowa",
20722072 .cx8,
20732073 .slow_unaligned_mem_16,
20742074 .x87,
......@@ -2078,8 +2078,8 @@ pub const cpu = struct {
20782078 pub const goldmont = Cpu{
20792079 .name = "goldmont",
20802080 .llvm_name = "goldmont",
2081 .dependencies = featureSet(&[_]Feature{
2082 .bit64,
2081 .features = featureSet(&[_]Feature{
2082 .@"64bit",
20832083 .sse,
20842084 .aes,
20852085 .clflushopt,
......@@ -2100,10 +2100,10 @@ pub const cpu = struct {
21002100 .rdrnd,
21012101 .rdseed,
21022102 .sha,
2103 .sse42,
2103 .sse4_2,
21042104 .ssse3,
21052105 .slow_incdec,
2106 .slowLea,
2106 .slow_lea,
21072107 .slow_two_mem_ops,
21082108 .x87,
21092109 .xsave,
......@@ -2116,8 +2116,8 @@ pub const cpu = struct {
21162116 pub const goldmont_plus = Cpu{
21172117 .name = "goldmont_plus",
21182118 .llvm_name = "goldmont-plus",
2119 .dependencies = featureSet(&[_]Feature{
2120 .bit64,
2119 .features = featureSet(&[_]Feature{
2120 .@"64bit",
21212121 .sse,
21222122 .aes,
21232123 .clflushopt,
......@@ -2140,10 +2140,10 @@ pub const cpu = struct {
21402140 .rdseed,
21412141 .sgx,
21422142 .sha,
2143 .sse42,
2143 .sse4_2,
21442144 .ssse3,
21452145 .slow_incdec,
2146 .slowLea,
2146 .slow_lea,
21472147 .slow_two_mem_ops,
21482148 .x87,
21492149 .xsave,
......@@ -2156,8 +2156,8 @@ pub const cpu = struct {
21562156 pub const haswell = Cpu{
21572157 .name = "haswell",
21582158 .llvm_name = "haswell",
2159 .dependencies = featureSet(&[_]Feature{
2160 .bit64,
2159 .features = featureSet(&[_]Feature{
2160 .@"64bit",
21612161 .sse,
21622162 .avx,
21632163 .avx2,
......@@ -2187,7 +2187,7 @@ pub const cpu = struct {
21872187 .popcnt,
21882188 .false_deps_popcnt,
21892189 .rdrnd,
2190 .sse42,
2190 .sse4_2,
21912191 .slow_3ops_lea,
21922192 .idivq_to_divl,
21932193 .x87,
......@@ -2196,38 +2196,38 @@ pub const cpu = struct {
21962196 }),
21972197 };
21982198
2199 pub const i386 = Cpu{
2200 .name = "i386",
2199 pub const _i386 = Cpu{
2200 .name = "_i386",
22012201 .llvm_name = "i386",
2202 .dependencies = featureSet(&[_]Feature{
2202 .features = featureSet(&[_]Feature{
22032203 .slow_unaligned_mem_16,
22042204 .x87,
22052205 }),
22062206 };
22072207
2208 pub const i486 = Cpu{
2209 .name = "i486",
2208 pub const _i486 = Cpu{
2209 .name = "_i486",
22102210 .llvm_name = "i486",
2211 .dependencies = featureSet(&[_]Feature{
2211 .features = featureSet(&[_]Feature{
22122212 .slow_unaligned_mem_16,
22132213 .x87,
22142214 }),
22152215 };
22162216
2217 pub const i586 = Cpu{
2218 .name = "i586",
2217 pub const _i586 = Cpu{
2218 .name = "_i586",
22192219 .llvm_name = "i586",
2220 .dependencies = featureSet(&[_]Feature{
2220 .features = featureSet(&[_]Feature{
22212221 .cx8,
22222222 .slow_unaligned_mem_16,
22232223 .x87,
22242224 }),
22252225 };
22262226
2227 pub const i686 = Cpu{
2228 .name = "i686",
2227 pub const _i686 = Cpu{
2228 .name = "_i686",
22292229 .llvm_name = "i686",
2230 .dependencies = featureSet(&[_]Feature{
2230 .features = featureSet(&[_]Feature{
22312231 .cmov,
22322232 .cx8,
22332233 .slow_unaligned_mem_16,
......@@ -2238,8 +2238,8 @@ pub const cpu = struct {
22382238 pub const icelake_client = Cpu{
22392239 .name = "icelake_client",
22402240 .llvm_name = "icelake-client",
2241 .dependencies = featureSet(&[_]Feature{
2242 .bit64,
2241 .features = featureSet(&[_]Feature{
2242 .@"64bit",
22432243 .adx,
22442244 .sse,
22452245 .aes,
......@@ -2287,7 +2287,7 @@ pub const cpu = struct {
22872287 .rdseed,
22882288 .sgx,
22892289 .sha,
2290 .sse42,
2290 .sse4_2,
22912291 .slow_3ops_lea,
22922292 .idivq_to_divl,
22932293 .vaes,
......@@ -2308,8 +2308,8 @@ pub const cpu = struct {
23082308 pub const icelake_server = Cpu{
23092309 .name = "icelake_server",
23102310 .llvm_name = "icelake-server",
2311 .dependencies = featureSet(&[_]Feature{
2312 .bit64,
2311 .features = featureSet(&[_]Feature{
2312 .@"64bit",
23132313 .adx,
23142314 .sse,
23152315 .aes,
......@@ -2358,7 +2358,7 @@ pub const cpu = struct {
23582358 .rdseed,
23592359 .sgx,
23602360 .sha,
2361 .sse42,
2361 .sse4_2,
23622362 .slow_3ops_lea,
23632363 .idivq_to_divl,
23642364 .vaes,
......@@ -2380,8 +2380,8 @@ pub const cpu = struct {
23802380 pub const ivybridge = Cpu{
23812381 .name = "ivybridge",
23822382 .llvm_name = "ivybridge",
2383 .dependencies = featureSet(&[_]Feature{
2384 .bit64,
2383 .features = featureSet(&[_]Feature{
2384 .@"64bit",
23852385 .sse,
23862386 .avx,
23872387 .cmov,
......@@ -2401,7 +2401,7 @@ pub const cpu = struct {
24012401 .popcnt,
24022402 .false_deps_popcnt,
24032403 .rdrnd,
2404 .sse42,
2404 .sse4_2,
24052405 .slow_3ops_lea,
24062406 .idivq_to_divl,
24072407 .slow_unaligned_mem_32,
......@@ -2414,7 +2414,7 @@ pub const cpu = struct {
24142414 pub const k6 = Cpu{
24152415 .name = "k6",
24162416 .llvm_name = "k6",
2417 .dependencies = featureSet(&[_]Feature{
2417 .features = featureSet(&[_]Feature{
24182418 .cx8,
24192419 .mmx,
24202420 .slow_unaligned_mem_16,
......@@ -2425,9 +2425,9 @@ pub const cpu = struct {
24252425 pub const k62 = Cpu{
24262426 .name = "k6_2",
24272427 .llvm_name = "k6-2",
2428 .dependencies = featureSet(&[_]Feature{
2428 .features = featureSet(&[_]Feature{
24292429 .mmx,
2430 .dnow3,
2430 .@"3dnow",
24312431 .cx8,
24322432 .slow_unaligned_mem_16,
24332433 .x87,
......@@ -2437,9 +2437,9 @@ pub const cpu = struct {
24372437 pub const k63 = Cpu{
24382438 .name = "k6_3",
24392439 .llvm_name = "k6-3",
2440 .dependencies = featureSet(&[_]Feature{
2440 .features = featureSet(&[_]Feature{
24412441 .mmx,
2442 .dnow3,
2442 .@"3dnow",
24432443 .cx8,
24442444 .slow_unaligned_mem_16,
24452445 .x87,
......@@ -2449,10 +2449,10 @@ pub const cpu = struct {
24492449 pub const k8 = Cpu{
24502450 .name = "k8",
24512451 .llvm_name = "k8",
2452 .dependencies = featureSet(&[_]Feature{
2452 .features = featureSet(&[_]Feature{
24532453 .mmx,
2454 .dnowa3,
2455 .bit64,
2454 .@"3dnowa",
2455 .@"64bit",
24562456 .cmov,
24572457 .cx8,
24582458 .fxsr,
......@@ -2469,10 +2469,10 @@ pub const cpu = struct {
24692469 pub const k8_sse3 = Cpu{
24702470 .name = "k8_sse3",
24712471 .llvm_name = "k8-sse3",
2472 .dependencies = featureSet(&[_]Feature{
2472 .features = featureSet(&[_]Feature{
24732473 .mmx,
2474 .dnowa3,
2475 .bit64,
2474 .@"3dnowa",
2475 .@"64bit",
24762476 .cmov,
24772477 .cx8,
24782478 .cx16,
......@@ -2490,8 +2490,8 @@ pub const cpu = struct {
24902490 pub const knl = Cpu{
24912491 .name = "knl",
24922492 .llvm_name = "knl",
2493 .dependencies = featureSet(&[_]Feature{
2494 .bit64,
2493 .features = featureSet(&[_]Feature{
2494 .@"64bit",
24952495 .adx,
24962496 .sse,
24972497 .aes,
......@@ -2535,8 +2535,8 @@ pub const cpu = struct {
25352535 pub const knm = Cpu{
25362536 .name = "knm",
25372537 .llvm_name = "knm",
2538 .dependencies = featureSet(&[_]Feature{
2539 .bit64,
2538 .features = featureSet(&[_]Feature{
2539 .@"64bit",
25402540 .adx,
25412541 .sse,
25422542 .aes,
......@@ -2581,14 +2581,14 @@ pub const cpu = struct {
25812581 pub const lakemont = Cpu{
25822582 .name = "lakemont",
25832583 .llvm_name = "lakemont",
2584 .dependencies = 0,
2584 .features = 0,
25852585 };
25862586
25872587 pub const nehalem = Cpu{
25882588 .name = "nehalem",
25892589 .llvm_name = "nehalem",
2590 .dependencies = featureSet(&[_]Feature{
2591 .bit64,
2590 .features = featureSet(&[_]Feature{
2591 .@"64bit",
25922592 .cmov,
25932593 .cx8,
25942594 .cx16,
......@@ -2599,7 +2599,7 @@ pub const cpu = struct {
25992599 .nopl,
26002600 .popcnt,
26012601 .sse,
2602 .sse42,
2602 .sse4_2,
26032603 .x87,
26042604 }),
26052605 };
......@@ -2607,8 +2607,8 @@ pub const cpu = struct {
26072607 pub const nocona = Cpu{
26082608 .name = "nocona",
26092609 .llvm_name = "nocona",
2610 .dependencies = featureSet(&[_]Feature{
2611 .bit64,
2610 .features = featureSet(&[_]Feature{
2611 .@"64bit",
26122612 .cmov,
26132613 .cx8,
26142614 .cx16,
......@@ -2625,10 +2625,10 @@ pub const cpu = struct {
26252625 pub const opteron = Cpu{
26262626 .name = "opteron",
26272627 .llvm_name = "opteron",
2628 .dependencies = featureSet(&[_]Feature{
2628 .features = featureSet(&[_]Feature{
26292629 .mmx,
2630 .dnowa3,
2631 .bit64,
2630 .@"3dnowa",
2631 .@"64bit",
26322632 .cmov,
26332633 .cx8,
26342634 .fxsr,
......@@ -2645,10 +2645,10 @@ pub const cpu = struct {
26452645 pub const opteron_sse3 = Cpu{
26462646 .name = "opteron_sse3",
26472647 .llvm_name = "opteron-sse3",
2648 .dependencies = featureSet(&[_]Feature{
2648 .features = featureSet(&[_]Feature{
26492649 .mmx,
2650 .dnowa3,
2651 .bit64,
2650 .@"3dnowa",
2651 .@"64bit",
26522652 .cmov,
26532653 .cx8,
26542654 .cx16,
......@@ -2666,8 +2666,8 @@ pub const cpu = struct {
26662666 pub const penryn = Cpu{
26672667 .name = "penryn",
26682668 .llvm_name = "penryn",
2669 .dependencies = featureSet(&[_]Feature{
2670 .bit64,
2669 .features = featureSet(&[_]Feature{
2670 .@"64bit",
26712671 .cmov,
26722672 .cx8,
26732673 .cx16,
......@@ -2677,7 +2677,7 @@ pub const cpu = struct {
26772677 .macrofusion,
26782678 .nopl,
26792679 .sse,
2680 .sse41,
2680 .sse4_1,
26812681 .slow_unaligned_mem_16,
26822682 .x87,
26832683 }),
......@@ -2686,7 +2686,7 @@ pub const cpu = struct {
26862686 pub const pentium = Cpu{
26872687 .name = "pentium",
26882688 .llvm_name = "pentium",
2689 .dependencies = featureSet(&[_]Feature{
2689 .features = featureSet(&[_]Feature{
26902690 .cx8,
26912691 .slow_unaligned_mem_16,
26922692 .x87,
......@@ -2696,7 +2696,7 @@ pub const cpu = struct {
26962696 pub const pentium_m = Cpu{
26972697 .name = "pentium_m",
26982698 .llvm_name = "pentium-m",
2699 .dependencies = featureSet(&[_]Feature{
2699 .features = featureSet(&[_]Feature{
27002700 .cmov,
27012701 .cx8,
27022702 .fxsr,
......@@ -2712,7 +2712,7 @@ pub const cpu = struct {
27122712 pub const pentium_mmx = Cpu{
27132713 .name = "pentium_mmx",
27142714 .llvm_name = "pentium-mmx",
2715 .dependencies = featureSet(&[_]Feature{
2715 .features = featureSet(&[_]Feature{
27162716 .cx8,
27172717 .mmx,
27182718 .slow_unaligned_mem_16,
......@@ -2723,7 +2723,7 @@ pub const cpu = struct {
27232723 pub const pentium2 = Cpu{
27242724 .name = "pentium2",
27252725 .llvm_name = "pentium2",
2726 .dependencies = featureSet(&[_]Feature{
2726 .features = featureSet(&[_]Feature{
27272727 .cmov,
27282728 .cx8,
27292729 .fxsr,
......@@ -2737,7 +2737,7 @@ pub const cpu = struct {
27372737 pub const pentium3 = Cpu{
27382738 .name = "pentium3",
27392739 .llvm_name = "pentium3",
2740 .dependencies = featureSet(&[_]Feature{
2740 .features = featureSet(&[_]Feature{
27412741 .cmov,
27422742 .cx8,
27432743 .fxsr,
......@@ -2752,7 +2752,7 @@ pub const cpu = struct {
27522752 pub const pentium3m = Cpu{
27532753 .name = "pentium3m",
27542754 .llvm_name = "pentium3m",
2755 .dependencies = featureSet(&[_]Feature{
2755 .features = featureSet(&[_]Feature{
27562756 .cmov,
27572757 .cx8,
27582758 .fxsr,
......@@ -2767,7 +2767,7 @@ pub const cpu = struct {
27672767 pub const pentium4 = Cpu{
27682768 .name = "pentium4",
27692769 .llvm_name = "pentium4",
2770 .dependencies = featureSet(&[_]Feature{
2770 .features = featureSet(&[_]Feature{
27712771 .cmov,
27722772 .cx8,
27732773 .fxsr,
......@@ -2783,7 +2783,7 @@ pub const cpu = struct {
27832783 pub const pentium4m = Cpu{
27842784 .name = "pentium4m",
27852785 .llvm_name = "pentium4m",
2786 .dependencies = featureSet(&[_]Feature{
2786 .features = featureSet(&[_]Feature{
27872787 .cmov,
27882788 .cx8,
27892789 .fxsr,
......@@ -2799,7 +2799,7 @@ pub const cpu = struct {
27992799 pub const pentiumpro = Cpu{
28002800 .name = "pentiumpro",
28012801 .llvm_name = "pentiumpro",
2802 .dependencies = featureSet(&[_]Feature{
2802 .features = featureSet(&[_]Feature{
28032803 .cmov,
28042804 .cx8,
28052805 .nopl,
......@@ -2811,7 +2811,7 @@ pub const cpu = struct {
28112811 pub const prescott = Cpu{
28122812 .name = "prescott",
28132813 .llvm_name = "prescott",
2814 .dependencies = featureSet(&[_]Feature{
2814 .features = featureSet(&[_]Feature{
28152815 .cmov,
28162816 .cx8,
28172817 .fxsr,
......@@ -2827,8 +2827,8 @@ pub const cpu = struct {
28272827 pub const sandybridge = Cpu{
28282828 .name = "sandybridge",
28292829 .llvm_name = "sandybridge",
2830 .dependencies = featureSet(&[_]Feature{
2831 .bit64,
2830 .features = featureSet(&[_]Feature{
2831 .@"64bit",
28322832 .sse,
28332833 .avx,
28342834 .cmov,
......@@ -2845,7 +2845,7 @@ pub const cpu = struct {
28452845 .pclmul,
28462846 .popcnt,
28472847 .false_deps_popcnt,
2848 .sse42,
2848 .sse4_2,
28492849 .slow_3ops_lea,
28502850 .idivq_to_divl,
28512851 .slow_unaligned_mem_32,
......@@ -2858,8 +2858,8 @@ pub const cpu = struct {
28582858 pub const silvermont = Cpu{
28592859 .name = "silvermont",
28602860 .llvm_name = "silvermont",
2861 .dependencies = featureSet(&[_]Feature{
2862 .bit64,
2861 .features = featureSet(&[_]Feature{
2862 .@"64bit",
28632863 .cmov,
28642864 .cx8,
28652865 .cx16,
......@@ -2874,12 +2874,12 @@ pub const cpu = struct {
28742874 .false_deps_popcnt,
28752875 .prfchw,
28762876 .rdrnd,
2877 .sse42,
2877 .sse4_2,
28782878 .ssse3,
28792879 .idivq_to_divl,
28802880 .slow_incdec,
2881 .slowLea,
2882 .slowPmulld,
2881 .slow_lea,
2882 .slow_pmulld,
28832883 .slow_two_mem_ops,
28842884 .x87,
28852885 }),
......@@ -2888,8 +2888,8 @@ pub const cpu = struct {
28882888 pub const skx = Cpu{
28892889 .name = "skx",
28902890 .llvm_name = "skx",
2891 .dependencies = featureSet(&[_]Feature{
2892 .bit64,
2891 .features = featureSet(&[_]Feature{
2892 .@"64bit",
28932893 .adx,
28942894 .sse,
28952895 .aes,
......@@ -2932,7 +2932,7 @@ pub const cpu = struct {
29322932 .prfchw,
29332933 .rdrnd,
29342934 .rdseed,
2935 .sse42,
2935 .sse4_2,
29362936 .slow_3ops_lea,
29372937 .idivq_to_divl,
29382938 .avx512vl,
......@@ -2947,8 +2947,8 @@ pub const cpu = struct {
29472947 pub const skylake = Cpu{
29482948 .name = "skylake",
29492949 .llvm_name = "skylake",
2950 .dependencies = featureSet(&[_]Feature{
2951 .bit64,
2950 .features = featureSet(&[_]Feature{
2951 .@"64bit",
29522952 .adx,
29532953 .sse,
29542954 .aes,
......@@ -2986,7 +2986,7 @@ pub const cpu = struct {
29862986 .rdrnd,
29872987 .rdseed,
29882988 .sgx,
2989 .sse42,
2989 .sse4_2,
29902990 .slow_3ops_lea,
29912991 .idivq_to_divl,
29922992 .x87,
......@@ -3000,8 +3000,8 @@ pub const cpu = struct {
30003000 pub const skylake_avx512 = Cpu{
30013001 .name = "skylake_avx512",
30023002 .llvm_name = "skylake-avx512",
3003 .dependencies = featureSet(&[_]Feature{
3004 .bit64,
3003 .features = featureSet(&[_]Feature{
3004 .@"64bit",
30053005 .adx,
30063006 .sse,
30073007 .aes,
......@@ -3044,7 +3044,7 @@ pub const cpu = struct {
30443044 .prfchw,
30453045 .rdrnd,
30463046 .rdseed,
3047 .sse42,
3047 .sse4_2,
30483048 .slow_3ops_lea,
30493049 .idivq_to_divl,
30503050 .avx512vl,
......@@ -3059,8 +3059,8 @@ pub const cpu = struct {
30593059 pub const slm = Cpu{
30603060 .name = "slm",
30613061 .llvm_name = "slm",
3062 .dependencies = featureSet(&[_]Feature{
3063 .bit64,
3062 .features = featureSet(&[_]Feature{
3063 .@"64bit",
30643064 .cmov,
30653065 .cx8,
30663066 .cx16,
......@@ -3075,12 +3075,12 @@ pub const cpu = struct {
30753075 .false_deps_popcnt,
30763076 .prfchw,
30773077 .rdrnd,
3078 .sse42,
3078 .sse4_2,
30793079 .ssse3,
30803080 .idivq_to_divl,
30813081 .slow_incdec,
3082 .slowLea,
3083 .slowPmulld,
3082 .slow_lea,
3083 .slow_pmulld,
30843084 .slow_two_mem_ops,
30853085 .x87,
30863086 }),
......@@ -3089,8 +3089,8 @@ pub const cpu = struct {
30893089 pub const tremont = Cpu{
30903090 .name = "tremont",
30913091 .llvm_name = "tremont",
3092 .dependencies = featureSet(&[_]Feature{
3093 .bit64,
3092 .features = featureSet(&[_]Feature{
3093 .@"64bit",
30943094 .sse,
30953095 .aes,
30963096 .cldemote,
......@@ -3117,10 +3117,10 @@ pub const cpu = struct {
31173117 .rdseed,
31183118 .sgx,
31193119 .sha,
3120 .sse42,
3120 .sse4_2,
31213121 .ssse3,
31223122 .slow_incdec,
3123 .slowLea,
3123 .slow_lea,
31243124 .slow_two_mem_ops,
31253125 .waitpkg,
31263126 .x87,
......@@ -3134,8 +3134,8 @@ pub const cpu = struct {
31343134 pub const westmere = Cpu{
31353135 .name = "westmere",
31363136 .llvm_name = "westmere",
3137 .dependencies = featureSet(&[_]Feature{
3138 .bit64,
3137 .features = featureSet(&[_]Feature{
3138 .@"64bit",
31393139 .cmov,
31403140 .cx8,
31413141 .cx16,
......@@ -3147,7 +3147,7 @@ pub const cpu = struct {
31473147 .sse,
31483148 .pclmul,
31493149 .popcnt,
3150 .sse42,
3150 .sse4_2,
31513151 .x87,
31523152 }),
31533153 };
......@@ -3155,7 +3155,7 @@ pub const cpu = struct {
31553155 pub const winchip_c6 = Cpu{
31563156 .name = "winchip_c6",
31573157 .llvm_name = "winchip-c6",
3158 .dependencies = featureSet(&[_]Feature{
3158 .features = featureSet(&[_]Feature{
31593159 .mmx,
31603160 .slow_unaligned_mem_16,
31613161 .x87,
......@@ -3165,9 +3165,9 @@ pub const cpu = struct {
31653165 pub const winchip2 = Cpu{
31663166 .name = "winchip2",
31673167 .llvm_name = "winchip2",
3168 .dependencies = featureSet(&[_]Feature{
3168 .features = featureSet(&[_]Feature{
31693169 .mmx,
3170 .dnow3,
3170 .@"3dnow",
31713171 .slow_unaligned_mem_16,
31723172 .x87,
31733173 }),
......@@ -3176,8 +3176,8 @@ pub const cpu = struct {
31763176 pub const x86_64 = Cpu{
31773177 .name = "x86_64",
31783178 .llvm_name = "x86-64",
3179 .dependencies = featureSet(&[_]Feature{
3180 .bit64,
3179 .features = featureSet(&[_]Feature{
3180 .@"64bit",
31813181 .cmov,
31823182 .cx8,
31833183 .fxsr,
......@@ -3195,7 +3195,7 @@ pub const cpu = struct {
31953195 pub const yonah = Cpu{
31963196 .name = "yonah",
31973197 .llvm_name = "yonah",
3198 .dependencies = featureSet(&[_]Feature{
3198 .features = featureSet(&[_]Feature{
31993199 .cmov,
32003200 .cx8,
32013201 .fxsr,
......@@ -3211,8 +3211,8 @@ pub const cpu = struct {
32113211 pub const znver1 = Cpu{
32123212 .name = "znver1",
32133213 .llvm_name = "znver1",
3214 .dependencies = featureSet(&[_]Feature{
3215 .bit64,
3214 .features = featureSet(&[_]Feature{
3215 .@"64bit",
32163216 .adx,
32173217 .sse,
32183218 .aes,
......@@ -3229,7 +3229,7 @@ pub const cpu = struct {
32293229 .fma,
32303230 .fsgsbase,
32313231 .fxsr,
3232 .fast15bytenop,
3232 .fast_15bytenop,
32333233 .fast_bextr,
32343234 .fast_lzcnt,
32353235 .fast_scalar_shift_masks,
......@@ -3258,8 +3258,8 @@ pub const cpu = struct {
32583258 pub const znver2 = Cpu{
32593259 .name = "znver2",
32603260 .llvm_name = "znver2",
3261 .dependencies = featureSet(&[_]Feature{
3262 .bit64,
3261 .features = featureSet(&[_]Feature{
3262 .@"64bit",
32633263 .adx,
32643264 .sse,
32653265 .aes,
......@@ -3277,7 +3277,7 @@ pub const cpu = struct {
32773277 .fma,
32783278 .fsgsbase,
32793279 .fxsr,
3280 .fast15bytenop,
3280 .fast_15bytenop,
32813281 .fast_bextr,
32823282 .fast_lzcnt,
32833283 .fast_scalar_shift_masks,
......@@ -3341,10 +3341,10 @@ pub const all_cpus = &[_]*const Cpu{
33413341 &cpu.goldmont,
33423342 &cpu.goldmont_plus,
33433343 &cpu.haswell,
3344 &cpu.i386,
3345 &cpu.i486,
3346 &cpu.i586,
3347 &cpu.i686,
3344 &cpu._i386,
3345 &cpu._i486,
3346 &cpu._i586,
3347 &cpu._i686,
33483348 &cpu.icelake_client,
33493349 &cpu.icelake_server,
33503350 &cpu.ivybridge,
src-self-hosted/main.zig+1-1
......@@ -791,7 +791,7 @@ async fn fmtPath(fmt: *Fmt, file_path_ref: []const u8, check_mode: bool) FmtErro
791791
792792// cmd:targets /////////////////////////////////////////////////////////////////////////////////////
793793
794fn cmdTargets(allocator: *Allocator, args: []const []const u8) !void {
794pub fn cmdTargets(allocator: *Allocator, args: []const []const u8) !void {
795795 try stdout.write("Architectures:\n");
796796 {
797797 comptime var i: usize = 0;
src-self-hosted/stage1.zig+54-110
......@@ -84,6 +84,11 @@ const Error = extern enum {
8484 NotLazy,
8585 IsAsync,
8686 ImportOutsidePkgPath,
87 UnknownCpu,
88 UnknownSubArchitecture,
89 UnknownCpuFeature,
90 InvalidCpuFeatures,
91 InvalidLlvmCpuFeaturesFormat,
8792};
8893
8994const FILE = std.c.FILE;
......@@ -533,99 +538,20 @@ export fn stage2_progress_update_node(node: *std.Progress.Node, done_count: usiz
533538}
534539
535540// ABI warning
536export fn stage2_list_features_for_arch(arch_name_ptr: [*]const u8, arch_name_len: usize, show_dependencies: bool) void {
537 printFeaturesForArch(arch_name_ptr[0..arch_name_len], show_dependencies) catch |err| {
538 std.debug.warn("Failed to list features: {}\n", .{@errorName(err)});
541export fn stage2_cmd_targets() c_int {
542 self_hosted_main.cmdTargets(std.heap.c_allocator, &[0][]u8{}) catch |err| {
543 std.debug.warn("unable to list targets: {}\n", .{@errorName(err)});
544 return -1;
539545 };
540}
541
542fn printFeaturesForArch(arch_name: []const u8, show_dependencies: bool) !void {
543 const stdout_stream = &std.io.getStdOut().outStream().stream;
544
545 const arch = Target.parseArchSub(arch_name) catch {
546 std.debug.warn("Failed to parse arch '{}'\nInvoke 'zig targets' for a list of valid architectures\n", .{arch_name});
547 return;
548 };
549
550 try stdout_stream.print("Available features for {}:\n", .{@tagName(arch)});
551
552 const features = arch.allFeaturesList();
553
554 var longest_len: usize = 0;
555 for (features) |feature| {
556 if (feature.name.len > longest_len) {
557 longest_len = feature.name.len;
558 }
559 }
560
561 for (features) |feature| {
562 try stdout_stream.print(" {}", .{feature.name});
563
564 var i: usize = 0;
565 while (i < longest_len - feature.name.len) : (i += 1) {
566 try stdout_stream.write(" ");
567 }
568
569 try stdout_stream.print(" - {}\n", .{feature.description});
570
571 if (show_dependencies and feature.dependencies != 0) {
572 for (feature.dependencies) |dependency| {
573 try stdout_stream.print(" {}\n", .{dependency.name});
574 }
575 }
576 }
577}
578
579// ABI warning
580export fn stage2_list_cpus_for_arch(arch_name_ptr: [*]const u8, arch_name_len: usize, show_dependencies: bool) void {
581 printCpusForArch(arch_name_ptr[0..arch_name_len], show_dependencies) catch |err| {
582 std.debug.warn("Failed to list features: {}\n", .{@errorName(err)});
583 };
584}
585
586fn printCpusForArch(arch_name: []const u8, show_dependencies: bool) !void {
587 const stdout_stream = &std.io.getStdOut().outStream().stream;
588
589 const arch = Target.parseArchTag(arch_name) catch {
590 std.debug.warn("Failed to parse arch '{}'\nInvoke 'zig targets' for a list of valid architectures\n", .{arch_name});
591 return;
592 };
593
594 const cpus = std.target.getCpusForArch(arch);
595
596 try stdout_stream.print("Available cpus for {}:\n", .{@tagName(arch)});
597
598 var longest_len: usize = 0;
599 for (cpus) |cpu| {
600 if (cpu.name.len > longest_len) {
601 longest_len = cpu.name.len;
602 }
603 }
604
605 for (cpus) |cpu| {
606 try stdout_stream.print(" {}", .{cpu.name});
607
608 var i: usize = 0;
609 while (i < longest_len - cpu.name.len) : (i += 1) {
610 try stdout_stream.write(" ");
611 }
612
613 try stdout_stream.write("\n");
614
615 if (show_dependencies and cpu.dependencies.len > 0) {
616 for (cpu.dependencies) |dependency| {
617 try stdout_stream.print(" {}\n", .{dependency.name});
618 }
619 }
620 }
546 return 0;
621547}
622548
623549const Stage2CpuFeatures = struct {
624550 allocator: *mem.Allocator,
625551 cpu_features: Target.Cross.CpuFeatures,
626552
627 llvm_cpu_name: ?[:0]const u8,
628 llvm_features_str: ?[:0]const u8,
553 llvm_cpu_name: ?[*:0]const u8,
554 llvm_features_str: ?[*:0]const u8,
629555
630556 builtin_str: [:0]const u8,
631557 cache_hash: [:0]const u8,
......@@ -636,10 +562,10 @@ const Stage2CpuFeatures = struct {
636562 const self = try allocator.create(Self);
637563 errdefer allocator.destroy(self);
638564
639 const builtin_str = try std.fmt.allocPrint0(allocator, ".baseline;\n");
565 const builtin_str = try std.fmt.allocPrint0(allocator, ".baseline;\n", .{});
640566 errdefer allocator.free(builtin_str);
641567
642 const cache_hash = try std.fmt.allocPrint0(allocator, "\n\n");
568 const cache_hash = try std.fmt.allocPrint0(allocator, "\n\n", .{});
643569 errdefer allocator.free(cache_hash);
644570
645571 self.* = Self{
......@@ -655,7 +581,7 @@ const Stage2CpuFeatures = struct {
655581
656582 fn createFromLLVM(
657583 allocator: *mem.Allocator,
658 arch: [*:0]const u8,
584 arch_name: [*:0]const u8,
659585 llvm_cpu_name_z: [*:0]const u8,
660586 llvm_cpu_features: [*:0]const u8,
661587 ) !*Self {
......@@ -687,10 +613,11 @@ const Stage2CpuFeatures = struct {
687613 return error.InvalidLlvmCpuFeaturesFormat;
688614 }
689615 for (arch.allFeaturesList()) |feature, index| {
690 if (mem.eql(u8, feature_name, feature.name)) {
616 const this_llvm_name = feature.llvm_name orelse continue;
617 if (mem.eql(u8, llvm_feat, this_llvm_name)) {
691618 switch (op) {
692 .add => set |= 1 << index,
693 .sub => set &= ~@as(Target.Cpu.Feature.Set, 1 << index),
619 .add => set |= @as(Target.Cpu.Feature.Set, 1) << @intCast(u7, index),
620 .sub => set &= ~@as(Target.Cpu.Feature.Set, 1) << @intCast(u7, index),
694621 }
695622 break;
696623 }
......@@ -703,21 +630,19 @@ const Stage2CpuFeatures = struct {
703630 const self = try allocator.create(Self);
704631 errdefer allocator.destroy(self);
705632
706 const builtin_str = try std.fmt.allocPrint0(
707 allocator,
708 "CpuFeatures{{ .cpu = &Arch.{}.cpu.{} }};\n",
633 const builtin_str = try std.fmt.allocPrint0(allocator, "CpuFeatures{{ .cpu = &Target.{}.cpu.{} }};\n", .{
709634 arch.genericName(),
710635 cpu.name,
711 );
636 });
712637 errdefer allocator.free(builtin_str);
713638
714 const cache_hash = try std.fmt.allocPrint0(allocator, "{}\n{x}", cpu.name, cpu.features);
639 const cache_hash = try std.fmt.allocPrint0(allocator, "{}\n{x}", .{ cpu.name, cpu.features });
715640 errdefer allocator.free(cache_hash);
716641
717642 self.* = Self{
718643 .allocator = allocator,
719644 .cpu_features = .{ .cpu = cpu },
720 .llvm_cpu_name = cpu.llvm_name,
645 .llvm_cpu_name = if (cpu.llvm_name) |n| n.ptr else null,
721646 .llvm_features_str = null,
722647 .builtin_str = builtin_str,
723648 .cache_hash = cache_hash,
......@@ -728,20 +653,22 @@ const Stage2CpuFeatures = struct {
728653 fn createFromCpuFeatures(
729654 allocator: *mem.Allocator,
730655 arch: Target.Arch,
731 features: Target.Cpu.Feature.Set,
656 feature_set: Target.Cpu.Feature.Set,
732657 ) !*Self {
733658 const self = try allocator.create(Self);
734659 errdefer allocator.destroy(self);
735660
736 const cache_hash = try std.fmt.allocPrint0(allocator, "\n{x}", features);
661 const cache_hash = try std.fmt.allocPrint0(allocator, "\n{x}", .{feature_set});
737662 errdefer allocator.free(cache_hash);
738663
739664 const generic_arch_name = arch.genericName();
740665 var builtin_str_buffer = try std.Buffer.allocPrint(
741666 allocator,
742 "CpuFeatures{{ .features = Arch.{}.featureSet(&[_]Arch.{}.Feature{{\n",
743 generic_arch_name,
744 generic_arch_name,
667 \\CpuFeatures{{
668 \\ .features = Target.{}.featureSet(&[_]Target.{}.Feature{{
669 \\
670 ,
671 .{ generic_arch_name, generic_arch_name },
745672 );
746673 defer builtin_str_buffer.deinit();
747674
......@@ -750,7 +677,8 @@ const Stage2CpuFeatures = struct {
750677
751678 // First, disable all features.
752679 // This way, we only get the ones the user requests.
753 for (arch.allFeatures()) |feature| {
680 const all_features = arch.allFeaturesList();
681 for (all_features) |feature| {
754682 if (feature.llvm_name) |llvm_name| {
755683 try llvm_features_buffer.append("-");
756684 try llvm_features_buffer.append(llvm_name);
......@@ -758,14 +686,16 @@ const Stage2CpuFeatures = struct {
758686 }
759687 }
760688
761 for (features) |feature| {
689 for (all_features) |feature, index| {
690 if (!Target.Cpu.Feature.isEnabled(feature_set, @intCast(u7, index))) continue;
691
762692 if (feature.llvm_name) |llvm_name| {
763693 try llvm_features_buffer.append("+");
764694 try llvm_features_buffer.append(llvm_name);
765695 try llvm_features_buffer.append(",");
766696 }
767697
768 try builtin_str_buffer.append(" .");
698 try builtin_str_buffer.append(" .");
769699 try builtin_str_buffer.append(feature.name);
770700 try builtin_str_buffer.append(",\n");
771701 }
......@@ -774,13 +704,17 @@ const Stage2CpuFeatures = struct {
774704 llvm_features_buffer.shrink(llvm_features_buffer.len() - 1);
775705 }
776706
777 try builtin_str_buffer.append("})};\n");
707 try builtin_str_buffer.append(
708 \\ }),
709 \\};
710 \\
711 );
778712
779713 self.* = Self{
780714 .allocator = allocator,
781 .cpu_features = .{ .features = features },
715 .cpu_features = .{ .features = feature_set },
782716 .llvm_cpu_name = null,
783 .llvm_features_str = llvm_features_buffer.toOwnedSlice(),
717 .llvm_features_str = llvm_features_buffer.toOwnedSlice().ptr,
784718 .builtin_str = builtin_str_buffer.toOwnedSlice(),
785719 .cache_hash = cache_hash,
786720 };
......@@ -790,7 +724,7 @@ const Stage2CpuFeatures = struct {
790724 fn destroy(self: *Self) void {
791725 self.allocator.free(self.cache_hash);
792726 self.allocator.free(self.builtin_str);
793 if (self.llvm_features_str) |llvm_features_str| self.allocator.free(llvm_features_str);
727 // TODO if (self.llvm_features_str) |llvm_features_str| self.allocator.free(llvm_features_str);
794728 self.allocator.destroy(self);
795729 }
796730};
......@@ -803,6 +737,9 @@ export fn stage2_cpu_features_parse_cpu(
803737) Error {
804738 result.* = parseCpu(arch_name, cpu_name) catch |err| switch (err) {
805739 error.OutOfMemory => return .OutOfMemory,
740 error.UnknownCpu => return .UnknownCpu,
741 error.UnknownArchitecture => return .UnknownArchitecture,
742 error.UnknownSubArchitecture => return .UnknownSubArchitecture,
806743 };
807744 return .None;
808745}
......@@ -821,6 +758,10 @@ export fn stage2_cpu_features_parse_features(
821758) Error {
822759 result.* = parseFeatures(arch_name, features_text) catch |err| switch (err) {
823760 error.OutOfMemory => return .OutOfMemory,
761 error.UnknownCpuFeature => return .UnknownCpuFeature,
762 error.InvalidCpuFeatures => return .InvalidCpuFeatures,
763 error.UnknownArchitecture => return .UnknownArchitecture,
764 error.UnknownSubArchitecture => return .UnknownSubArchitecture,
824765 };
825766 return .None;
826767}
......@@ -853,6 +794,9 @@ export fn stage2_cpu_features_llvm(
853794 llvm_cpu_features,
854795 ) catch |err| switch (err) {
855796 error.OutOfMemory => return .OutOfMemory,
797 error.UnknownArchitecture => return .UnknownArchitecture,
798 error.UnknownSubArchitecture => return .UnknownSubArchitecture,
799 error.InvalidLlvmCpuFeaturesFormat => return .InvalidLlvmCpuFeaturesFormat,
856800 };
857801 return .None;
858802}
src/error.cpp+5
......@@ -58,6 +58,11 @@ const char *err_str(Error err) {
5858 case ErrorNotLazy: return "not lazy";
5959 case ErrorIsAsync: return "is async";
6060 case ErrorImportOutsidePkgPath: return "import of file outside package path";
61 case ErrorUnknownCpu: return "unknown CPU";
62 case ErrorUnknownSubArchitecture: return "unknown sub-architecture";
63 case ErrorUnknownCpuFeature: return "unknown CPU feature";
64 case ErrorInvalidCpuFeatures: return "invalid CPU features";
65 case ErrorInvalidLlvmCpuFeaturesFormat: return "invalid LLVM CPU features format";
6166 }
6267 return "(invalid error)";
6368}
src/main.cpp+1-112
......@@ -131,11 +131,6 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
131131 " --test-name-prefix [text] add prefix to all tests\n"
132132 " --test-cmd [arg] specify test execution command one arg at a time\n"
133133 " --test-cmd-bin appends test binary path to test cmd args\n"
134 "\n"
135 "Targets Options:\n"
136 " --list-features [arch] list available features for the given architecture\n"
137 " --list-cpus [arch] list available cpus for the given architecture\n"
138 " --show-dependencies list feature dependencies for each entry from --list-{features,cpus}\n"
139134 , arg0);
140135 return return_code;
141136}
......@@ -160,88 +155,6 @@ static int print_libc_usage(const char *arg0, FILE *file, int return_code) {
160155 return return_code;
161156}
162157
163static bool arch_available_in_llvm(ZigLLVM_ArchType arch) {
164 LLVMTargetRef target_ref;
165 char *err_msg = nullptr;
166 char triple_string[128];
167 sprintf(triple_string, "%s-unknown-unknown-unknown", ZigLLVMGetArchTypeName(arch));
168 return !LLVMGetTargetFromTriple(triple_string, &target_ref, &err_msg);
169}
170
171static int print_target_list(FILE *f) {
172 ZigTarget native;
173 get_native_target(&native);
174
175 fprintf(f, "Architectures:\n");
176 size_t arch_count = target_arch_count();
177 for (size_t arch_i = 0; arch_i < arch_count; arch_i += 1) {
178 ZigLLVM_ArchType arch = target_arch_enum(arch_i);
179 if (!arch_available_in_llvm(arch))
180 continue;
181 const char *arch_name = target_arch_name(arch);
182 SubArchList sub_arch_list = target_subarch_list(arch);
183 size_t sub_count = target_subarch_count(sub_arch_list);
184 const char *arch_native_str = (native.arch == arch) ? " (native)" : "";
185 fprintf(f, " %s%s\n", arch_name, arch_native_str);
186 for (size_t sub_i = 0; sub_i < sub_count; sub_i += 1) {
187 ZigLLVM_SubArchType sub = target_subarch_enum(sub_arch_list, sub_i);
188 const char *sub_name = target_subarch_name(sub);
189 const char *sub_native_str = (native.arch == arch && native.sub_arch == sub) ? " (native)" : "";
190 fprintf(f, " %s%s\n", sub_name, sub_native_str);
191 }
192 }
193
194 fprintf(f, "\nOperating Systems:\n");
195 size_t os_count = target_os_count();
196 for (size_t i = 0; i < os_count; i += 1) {
197 Os os_type = target_os_enum(i);
198 const char *native_str = (native.os == os_type) ? " (native)" : "";
199 fprintf(f, " %s%s\n", target_os_name(os_type), native_str);
200 }
201
202 fprintf(f, "\nC ABIs:\n");
203 size_t abi_count = target_abi_count();
204 for (size_t i = 0; i < abi_count; i += 1) {
205 ZigLLVM_EnvironmentType abi = target_abi_enum(i);
206 const char *native_str = (native.abi == abi) ? " (native)" : "";
207 fprintf(f, " %s%s\n", target_abi_name(abi), native_str);
208 }
209
210 fprintf(f, "\nAvailable libcs:\n");
211 size_t libc_count = target_libc_count();
212 for (size_t i = 0; i < libc_count; i += 1) {
213 ZigTarget libc_target;
214 target_libc_enum(i, &libc_target);
215 bool is_native = native.arch == libc_target.arch &&
216 native.os == libc_target.os &&
217 native.abi == libc_target.abi;
218 const char *native_str = is_native ? " (native)" : "";
219 fprintf(f, " %s-%s-%s%s\n", target_arch_name(libc_target.arch),
220 target_os_name(libc_target.os), target_abi_name(libc_target.abi), native_str);
221 }
222
223 fprintf(f, "\nAvailable glibc versions:\n");
224 ZigGLibCAbi *glibc_abi;
225 Error err;
226 if ((err = glibc_load_metadata(&glibc_abi, get_zig_lib_dir(), true))) {
227 return EXIT_FAILURE;
228 }
229 for (size_t i = 0; i < glibc_abi->all_versions.length; i += 1) {
230 ZigGLibCVersion *this_ver = &glibc_abi->all_versions.at(i);
231 bool is_native = native.glibc_version != nullptr &&
232 native.glibc_version->major == this_ver->major &&
233 native.glibc_version->minor == this_ver->minor &&
234 native.glibc_version->patch == this_ver->patch;
235 const char *native_str = is_native ? " (native)" : "";
236 if (this_ver->patch == 0) {
237 fprintf(f, " %d.%d%s\n", this_ver->major, this_ver->minor, native_str);
238 } else {
239 fprintf(f, " %d.%d.%d%s\n", this_ver->major, this_ver->minor, this_ver->patch, native_str);
240 }
241 }
242 return EXIT_SUCCESS;
243}
244
245158enum Cmd {
246159 CmdNone,
247160 CmdBuild,
......@@ -538,10 +451,6 @@ int main(int argc, char **argv) {
538451 const char *cpu = nullptr;
539452 const char *features = nullptr;
540453
541 const char *targets_list_features_arch = nullptr;
542 const char *targets_list_cpus_arch = nullptr;
543 bool targets_show_dependencies = false;
544
545454 ZigList<const char *> llvm_argv = {0};
546455 llvm_argv.append("zig (LLVM option parsing)");
547456
......@@ -792,8 +701,6 @@ int main(int argc, char **argv) {
792701 cur_pkg = cur_pkg->parent;
793702 } else if (strcmp(arg, "-ffunction-sections") == 0) {
794703 function_sections = true;
795 } else if (strcmp(arg, "--show-dependencies") == 0) {
796 targets_show_dependencies = true;
797704 } else if (i + 1 >= argc) {
798705 fprintf(stderr, "Expected another argument after %s\n", arg);
799706 return print_error_usage(arg0);
......@@ -951,10 +858,6 @@ int main(int argc, char **argv) {
951858 , argv[i]);
952859 return EXIT_FAILURE;
953860 }
954 } else if (strcmp(arg, "--list-features") == 0) {
955 targets_list_features_arch = argv[i];
956 } else if (strcmp(arg, "--list-cpus") == 0) {
957 targets_list_cpus_arch = argv[i];
958861 } else if (strcmp(arg, "-target-cpu") == 0) {
959862 cpu = argv[i];
960863 } else if (strcmp(arg, "-target-feature") == 0) {
......@@ -1468,21 +1371,7 @@ int main(int argc, char **argv) {
14681371 return main_exit(root_progress_node, EXIT_SUCCESS);
14691372 }
14701373 case CmdTargets:
1471 if (targets_list_features_arch != nullptr) {
1472 stage2_list_features_for_arch(
1473 targets_list_features_arch,
1474 strlen(targets_list_features_arch),
1475 targets_show_dependencies);
1476 return 0;
1477 } else if (targets_list_cpus_arch != nullptr) {
1478 stage2_list_cpus_for_arch(
1479 targets_list_cpus_arch,
1480 strlen(targets_list_cpus_arch),
1481 targets_show_dependencies);
1482 return 0;
1483 } else {
1484 return print_target_list(stdout);
1485 }
1374 return stage2_cmd_targets();
14861375 case CmdNone:
14871376 return print_full_usage(arg0, stderr, EXIT_FAILURE);
14881377 }
src/userland.cpp+5-10
......@@ -89,16 +89,6 @@ void stage2_progress_complete_one(Stage2ProgressNode *node) {}
8989void stage2_progress_disable_tty(Stage2Progress *progress) {}
9090void stage2_progress_update_node(Stage2ProgressNode *node, size_t completed_count, size_t estimated_total_items){}
9191
92void stage2_list_features_for_arch(const char *arch_name_ptr, size_t arch_name_len, bool show_subfeatures) {
93 const char *msg = "stage0 called stage2_list_features_for_arch";
94 stage2_panic(msg, strlen(msg));
95}
96
97void stage2_list_cpus_for_arch(const char *arch_name_ptr, size_t arch_name_len, bool show_subfeatures) {
98 const char *msg = "stage0 called stage2_list_cpus_for_arch";
99 stage2_panic(msg, strlen(msg));
100}
101
10292struct Stage2CpuFeatures {
10393 const char *llvm_cpu_name;
10494 const char *llvm_cpu_features;
......@@ -150,3 +140,8 @@ void stage2_cpu_features_get_builtin_str(const Stage2CpuFeatures *cpu_features,
150140 *ptr = cpu_features->builtin_str;
151141 *len = strlen(cpu_features->builtin_str);
152142}
143
144int stage2_cmd_targets(void) {
145 const char *msg = "stage0 called stage2_cmd_targets";
146 stage2_panic(msg, strlen(msg));
147}
src/userland.h+9-6
......@@ -78,6 +78,11 @@ enum Error {
7878 ErrorNotLazy,
7979 ErrorIsAsync,
8080 ErrorImportOutsidePkgPath,
81 ErrorUnknownCpu,
82 ErrorUnknownSubArchitecture,
83 ErrorUnknownCpuFeature,
84 ErrorInvalidCpuFeatures,
85 ErrorInvalidLlvmCpuFeaturesFormat,
8186};
8287
8388// ABI warning
......@@ -174,12 +179,6 @@ ZIG_EXTERN_C void stage2_progress_complete_one(Stage2ProgressNode *node);
174179ZIG_EXTERN_C void stage2_progress_update_node(Stage2ProgressNode *node,
175180 size_t completed_count, size_t estimated_total_items);
176181
177// ABI warning
178ZIG_EXTERN_C void stage2_list_features_for_arch(const char *arch_name_ptr, size_t arch_name_len, bool show_subfeatures);
179
180// ABI warning
181ZIG_EXTERN_C void stage2_list_cpus_for_arch(const char *arch_name_ptr, size_t arch_name_len, bool show_subfeatures);
182
183182// ABI warning
184183struct Stage2CpuFeatures;
185184
......@@ -212,4 +211,8 @@ ZIG_EXTERN_C void stage2_cpu_features_get_builtin_str(const struct Stage2CpuFeat
212211ZIG_EXTERN_C void stage2_cpu_features_get_cache_hash(const struct Stage2CpuFeatures *cpu_features,
213212 const char **ptr, size_t *len);
214213
214// ABI warning
215ZIG_EXTERN_C int stage2_cmd_targets(void);
216
217
215218#endif