Commit 206373ca61

Alex Rønne Petersen <alex@alexrp.com>
2024-11-29 01:22:56
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 parent e800ea0
Changed files (1)
lib
lib/std/Target.zig
@@ -1958,7 +1958,7 @@ pub const Cpu = struct {
                 .x86_64 => &x86.cpu.x86_64,
                 .nvptx, .nvptx64 => &nvptx.cpu.sm_20,
                 .ve => &ve.cpu.generic,
-                .wasm32, .wasm64 => &wasm.cpu.generic,
+                .wasm32, .wasm64 => &wasm.cpu.mvp,
                 .xcore => &xcore.cpu.generic,
                 .xtensa => &xtensa.cpu.generic,
 
@@ -2012,6 +2012,7 @@ pub const Cpu = struct {
                     else => generic(arch),
                 },
                 .xcore => &xcore.cpu.xs1b_generic,
+                .wasm32, .wasm64 => &wasm.cpu.generic,
 
                 else => generic(arch),
             };