Skip to content

Commit 2cb8ba7

Browse files
committed
wasm: Mark simd intrinsics as stable
This is a follow-up from rust-lang/rust#74372 which has finished FCP for the stabilization of wasm intrinsics. This marks them all stable, as-is and additionally marks the functions which create integer vectors as `const`-stable as well. The only remaining unstable bits are that `f32x4` and `f64x2` are `const`-unstable. Mostly just because I couldn't figure out how to make them `const`-stable.
1 parent 9e7648f commit 2cb8ba7

File tree

4 files changed

+368
-24
lines changed

4 files changed

+368
-24
lines changed

Diff for: crates/core_arch/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
bench_black_box
4040
)]
4141
#![cfg_attr(test, feature(test, abi_vectorcall))]
42-
#![cfg_attr(all(test, target_arch = "wasm32"), feature(wasm_simd))]
42+
#![cfg_attr(target_arch = "wasm32", feature(wasm_simd_const))]
4343
#![deny(clippy::missing_inline_in_public_items)]
4444
#![allow(
4545
clippy::inline_always,

Diff for: crates/core_arch/src/mod.rs

+6-14
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub mod arch {
6464
/// proposals such as [atomics] and [simd].
6565
///
6666
/// Intrinsics in the `wasm32` module are modeled after the WebAssembly
67-
/// instructions that they represent. All functions are named after the
67+
/// instructions that they represent. Most functions are named after the
6868
/// instruction they intend to correspond to, and the arguments/results
6969
/// correspond to the type signature of the instruction itself. Stable
7070
/// WebAssembly instructions are [documented online][instrdoc].
@@ -104,19 +104,11 @@ pub mod arch {
104104
///
105105
/// ## SIMD
106106
///
107-
/// The [simd proposal][simd] for WebAssembly adds a new `v128` type for a
108-
/// 128-bit SIMD register. It also adds a large array of instructions to
109-
/// operate on the `v128` type to perform data processing. The SIMD proposal
110-
/// at the time of this writing is in [phase 4] which means that it's in the
111-
/// standardization phase. It's expected that once some testing on nightly
112-
/// has happened a stabilization proposal will be made for the Rust
113-
/// intrinsics. If you notice anything awry please feel free to [open an
114-
/// issue](https://github.com/rust-lang/stdarch/issues/new).
115-
///
116-
/// [phase 4]: https://github.com/webassembly/proposals
117-
///
118-
/// Using SIMD is intended to be similar to as you would on `x86_64`, for
119-
/// example. You'd write a function such as:
107+
/// The [simd proposal][simd] for WebAssembly added a new `v128` type for a
108+
/// 128-bit SIMD register. It also added a large array of instructions to
109+
/// operate on the `v128` type to perform data processing. Using SIMD on
110+
/// wasm is intended to be similar to as you would on `x86_64`, for example.
111+
/// You'd write a function such as:
120112
///
121113
/// ```rust,ignore
122114
/// #[cfg(target_arch = "wasm32")]

0 commit comments

Comments
 (0)