From e26b64a87dd4170a46aec317e958ee617bc26e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 17 Oct 2024 01:59:53 +0200 Subject: [PATCH] std.Target: Use mips32r2/mips64r2 as the baseline CPU models for mips/mips64. This matches Clang's defaults. That also means these CPU models tend to get more testing, so they're a safer baseline choice. Anecdotally, the oldest MIPS hardware that I've seen anyone run Zig on was also r2. --- lib/std/Target.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index c60c6fee97..63bac88331 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -1860,6 +1860,8 @@ pub const Cpu = struct { .hexagon => &hexagon.cpu.hexagonv60, // gcc/clang do not have a generic hexagon model. .lanai => &lanai.cpu.v11, // clang does not have a generic lanai model. .loongarch64 => &loongarch.cpu.loongarch64, + .mips, .mipsel => &mips.cpu.mips32r2, + .mips64, .mips64el => &mips.cpu.mips64r2, .nvptx, .nvptx64 => &nvptx.cpu.sm_52, .powerpc64le => &powerpc.cpu.ppc64le, .riscv32 => &riscv.cpu.baseline_rv32,