Skip to content

Commit 36f188b

Browse files
committed
wasm32: Add relaxed simd instructions
This commit adds intrinsics to the `wasm32` to support the [relaxed SIMD proposal][proposal]. These are added with the same naming conventions of existing simd-related intrinsics for wasm which is similar to the instruction name but matches sign in a few places. This additionally updates Wasmtime to execute tests with support for the relaxed simd proposal. No release has been made yet so this uses the `dev` release, and I can make a PR in April when the support in Wasmtime has been released to an official release. The `wasmprinter` crate is also updated to understand these instruction opcodes as well. Documentation has been added for all intrinsics, but tests have only been added for some of them so far. I hope to follow-up later with more tests. [proposal]: https://github.com/WebAssembly/relaxed-simd
1 parent a428958 commit 36f188b

File tree

5 files changed

+458
-7
lines changed

5 files changed

+458
-7
lines changed

ci/docker/wasm32-wasi/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
77
xz-utils \
88
clang
99

10-
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v0.29.0/wasmtime-v0.29.0-x86_64-linux.tar.xz | tar xJf -
11-
ENV PATH=$PATH:/wasmtime-v0.29.0-x86_64-linux
10+
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-$(arch)-linux.tar.xz | tar xJf -
11+
ENV PATH=$PATH:/wasmtime-dev-aarch64-linux
1212

1313
ENV CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime \
14-
--enable-simd \
15-
--enable-threads \
14+
--wasm-features=threads,relaxed-simd \
1615
--mapdir .::/checkout/target/wasm32-wasi/release/deps \
1716
--"

crates/core_arch/src/wasm32/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ pub use self::atomic::*;
99
mod simd128;
1010
pub use self::simd128::*;
1111

12+
mod relaxed_simd;
13+
pub use self::relaxed_simd::*;
14+
1215
mod memory;
1316
pub use self::memory::*;
1417

0 commit comments

Comments
 (0)