Skip to content

Commit b141669

Browse files
committed
std.Target: Use mvp as the generic CPU model for wasm32/wasm64.
As discussed in ziglang#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 99fabba commit b141669

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/std/Target.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ pub const Cpu = struct {
19581958
.x86_64 => &x86.cpu.x86_64,
19591959
.nvptx, .nvptx64 => &nvptx.cpu.sm_20,
19601960
.ve => &ve.cpu.generic,
1961-
.wasm32, .wasm64 => &wasm.cpu.generic,
1961+
.wasm32, .wasm64 => &wasm.cpu.mvp,
19621962
.xcore => &xcore.cpu.generic,
19631963
.xtensa => &xtensa.cpu.generic,
19641964

@@ -2012,6 +2012,7 @@ pub const Cpu = struct {
20122012
else => generic(arch),
20132013
},
20142014
.xcore => &xcore.cpu.xs1b_generic,
2015+
.wasm32, .wasm64 => &wasm.cpu.generic,
20152016

20162017
else => generic(arch),
20172018
};

0 commit comments

Comments
 (0)