authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-29 01:22:56+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-22 03:01:05+01:00
log206373ca61ec6803e979aad9491e1da16cbf94b6
treed0b98eb1d128c8bb679d84f03b199bca9a3fddac
parente800ea0fdd4ecbe2e28867550a8c36715f3c5ea9
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Use mvp as the generic CPU model for wasm32/wasm64.

As discussed in #21818, generic is a poor baseline model because that model is a moving target in LLVM. Instead, use mvp, which has no features enabled.

1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/Target.zig+2-1
...@@ -1958,7 +1958,7 @@ pub const Cpu = struct {...@@ -1958,7 +1958,7 @@ pub const Cpu = struct {
1958 .x86_64 => &x86.cpu.x86_64,1958 .x86_64 => &x86.cpu.x86_64,
1959 .nvptx, .nvptx64 => &nvptx.cpu.sm_20,1959 .nvptx, .nvptx64 => &nvptx.cpu.sm_20,
1960 .ve => &ve.cpu.generic,1960 .ve => &ve.cpu.generic,
1961 .wasm32, .wasm64 => &wasm.cpu.generic,1961 .wasm32, .wasm64 => &wasm.cpu.mvp,
1962 .xcore => &xcore.cpu.generic,1962 .xcore => &xcore.cpu.generic,
1963 .xtensa => &xtensa.cpu.generic,1963 .xtensa => &xtensa.cpu.generic,
19641964
...@@ -2012,6 +2012,7 @@ pub const Cpu = struct {...@@ -2012,6 +2012,7 @@ pub const Cpu = struct {
2012 else => generic(arch),2012 else => generic(arch),
2013 },2013 },
2014 .xcore => &xcore.cpu.xs1b_generic,2014 .xcore => &xcore.cpu.xs1b_generic,
2015 .wasm32, .wasm64 => &wasm.cpu.generic,
20152016
2016 else => generic(arch),2017 else => generic(arch),
2017 };2018 };