Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winch(x64): Call indirect #7100

Merged
merged 4 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,17 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
// We ignore tests that assert for traps on windows, given
// that Winch doesn't encode unwind information for Windows, yet.
if strategy == "Winch" {
if testsuite == "misc_testsuite" {
// The misc/call_indirect is fully supported by Winch.
if testname == "call_indirect" {
return false;
}
}
if testsuite != "winch" {
return true;
}

let assert_trap = ["i32", "i64"].contains(&testname);
let assert_trap = ["i32", "i64", "call_indirect"].contains(&testname);

if assert_trap && env::var("CARGO_CFG_TARGET_OS").unwrap().as_str() == "windows" {
return true;
Expand Down
2 changes: 1 addition & 1 deletion crates/winch/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl wasmtime_environ::Compiler for Compiler {
let mut validator = validator.into_validator(self.take_allocations());
let buffer = self
.isa
.compile_function(ty, &body, &translation, &mut validator)
.compile_function(ty, types, &body, &translation, &mut validator)
.map_err(|e| CompileError::Codegen(format!("{e:?}")));
self.save_allocations(validator.into_allocations());
let buffer = buffer?;
Expand Down
3 changes: 2 additions & 1 deletion fuzz/fuzz_targets/differential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ fn winch_supports_module(module: &[u8]) -> bool {
| F32Abs { .. }
| F64Abs { .. }
| F32Neg { .. }
| F64Neg { .. } => {}
| F64Neg { .. }
| CallIndirect { .. } => {}
_ => {
supported = false;
break 'main;
Expand Down
Loading
Loading