authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-17 02:03:02+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-26 21:59:59+02:00
logea987faa85ea57db89167a220853e0c0936c7d43
tree5a09895a79c847ff958cc3b9c6f3d80ef75e0c8b
parente26b64a87dd4170a46aec317e958ee617bc26e8d
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Use explicit baseline CPU models for bpf, m68k, msp430, and xcore.

This makes no difference presently, but if LLVM ever starts modeling features for these, we would not get them by default for our baseline if we use the generic model.

1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/Target.zig+4
...@@ -1856,12 +1856,15 @@ pub const Cpu = struct {...@@ -1856,12 +1856,15 @@ pub const Cpu = struct {
1856 else => generic(arch),1856 else => generic(arch),
1857 },1857 },
1858 .avr => &avr.cpu.avr2,1858 .avr => &avr.cpu.avr2,
1859 .bpfel, .bpfeb => &bpf.cpu.v1,
1859 .csky => &csky.cpu.ck810, // gcc/clang do not have a generic csky model.1860 .csky => &csky.cpu.ck810, // gcc/clang do not have a generic csky model.
1860 .hexagon => &hexagon.cpu.hexagonv60, // gcc/clang do not have a generic hexagon model.1861 .hexagon => &hexagon.cpu.hexagonv60, // gcc/clang do not have a generic hexagon model.
1861 .lanai => &lanai.cpu.v11, // clang does not have a generic lanai model.1862 .lanai => &lanai.cpu.v11, // clang does not have a generic lanai model.
1862 .loongarch64 => &loongarch.cpu.loongarch64,1863 .loongarch64 => &loongarch.cpu.loongarch64,
1864 .m68k => &m68k.cpu.M68000,
1863 .mips, .mipsel => &mips.cpu.mips32r2,1865 .mips, .mipsel => &mips.cpu.mips32r2,
1864 .mips64, .mips64el => &mips.cpu.mips64r2,1866 .mips64, .mips64el => &mips.cpu.mips64r2,
1867 .msp430 => &msp430.cpu.msp430,
1865 .nvptx, .nvptx64 => &nvptx.cpu.sm_52,1868 .nvptx, .nvptx64 => &nvptx.cpu.sm_52,
1866 .powerpc64le => &powerpc.cpu.ppc64le,1869 .powerpc64le => &powerpc.cpu.ppc64le,
1867 .riscv32 => &riscv.cpu.baseline_rv32,1870 .riscv32 => &riscv.cpu.baseline_rv32,
...@@ -1869,6 +1872,7 @@ pub const Cpu = struct {...@@ -1869,6 +1872,7 @@ pub const Cpu = struct {
1869 .s390x => &s390x.cpu.arch8, // gcc/clang do not have a generic s390x model.1872 .s390x => &s390x.cpu.arch8, // gcc/clang do not have a generic s390x model.
1870 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.1873 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
1871 .x86 => &x86.cpu.pentium4,1874 .x86 => &x86.cpu.pentium4,
1875 .xcore => &xcore.cpu.xs1b_generic,
18721876
1873 else => generic(arch),1877 else => generic(arch),
1874 };1878 };