From a89e080429e365ab1b6c37ed6de1154700e28566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Cabrera?= Date: Wed, 20 Mar 2024 13:57:40 -0400 Subject: [PATCH] winch: Enable `memory64` in Winch Closes: https://github.com/bytecodealliance/wasmtime/issues/8089 This commit unlocks support for the `memory64` proposal in Winch. After all the fixes to heap handling, all the spec and misc tests are passing, which is a good indication regarding the support for this proposal. I'll like to merge this change after: https://github.com/bytecodealliance/wasmtime/pull/8156. --- build.rs | 4 ++++ crates/fuzzing/src/generators/config.rs | 1 - winch/codegen/src/codegen/env.rs | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 262b40838fcf..d0b42afe2894 100644 --- a/build.rs +++ b/build.rs @@ -241,6 +241,10 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { return denylist || ref_types || simd; } + if testsuite == "memory64" { + return testname.starts_with("simd") || testname.starts_with("threads"); + } + if testsuite != "winch" { return true; } diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rs index 7c47300c4f13..d03ad5ba4eb1 100644 --- a/crates/fuzzing/src/generators/config.rs +++ b/crates/fuzzing/src/generators/config.rs @@ -326,7 +326,6 @@ impl Config { pub fn disable_unimplemented_winch_proposals(&mut self) { self.module_config.config.simd_enabled = false; self.module_config.config.relaxed_simd_enabled = false; - self.module_config.config.memory64_enabled = false; self.module_config.config.gc_enabled = false; self.module_config.config.threads_enabled = false; self.module_config.config.tail_call_enabled = false; diff --git a/winch/codegen/src/codegen/env.rs b/winch/codegen/src/codegen/env.rs index 978d16561659..53e82fa46c72 100644 --- a/winch/codegen/src/codegen/env.rs +++ b/winch/codegen/src/codegen/env.rs @@ -328,8 +328,7 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { current_length_offset, style, ty: if plan.memory.memory64 { - // TODO: Add support for 64-bit memories. - unimplemented!("memory64") + WasmValType::I64 } else { WasmValType::I32 },