Skip to content

Commit

Permalink
wasm: Mark simd intrinsics as stable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Jun 10, 2021
1 parent 9e7648f commit 1bce92d
Show file tree
Hide file tree
Showing 4 changed files with 373 additions and 25 deletions.
2 changes: 1 addition & 1 deletion crates/core_arch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
bench_black_box
)]
#![cfg_attr(test, feature(test, abi_vectorcall))]
#![cfg_attr(all(test, target_arch = "wasm32"), feature(wasm_simd))]
#![cfg_attr(target_arch = "wasm32", feature(wasm_simd_const))]
#![deny(clippy::missing_inline_in_public_items)]
#![allow(
clippy::inline_always,
Expand Down
20 changes: 6 additions & 14 deletions crates/core_arch/src/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub mod arch {
/// proposals such as [atomics] and [simd].
///
/// Intrinsics in the `wasm32` module are modeled after the WebAssembly
/// instructions that they represent. All functions are named after the
/// instructions that they represent. Most functions are named after the
/// instruction they intend to correspond to, and the arguments/results
/// correspond to the type signature of the instruction itself. Stable
/// WebAssembly instructions are [documented online][instrdoc].
Expand Down Expand Up @@ -104,19 +104,11 @@ pub mod arch {
///
/// ## SIMD
///
/// The [simd proposal][simd] for WebAssembly adds a new `v128` type for a
/// 128-bit SIMD register. It also adds a large array of instructions to
/// operate on the `v128` type to perform data processing. The SIMD proposal
/// at the time of this writing is in [phase 4] which means that it's in the
/// standardization phase. It's expected that once some testing on nightly
/// has happened a stabilization proposal will be made for the Rust
/// intrinsics. If you notice anything awry please feel free to [open an
/// issue](https://github.com/rust-lang/stdarch/issues/new).
///
/// [phase 4]: https://github.com/webassembly/proposals
///
/// Using SIMD is intended to be similar to as you would on `x86_64`, for
/// example. You'd write a function such as:
/// The [simd proposal][simd] for WebAssembly added a new `v128` type for a
/// 128-bit SIMD register. It also added a large array of instructions to
/// operate on the `v128` type to perform data processing. Using SIMD on
/// wasm is intended to be similar to as you would on `x86_64`, for example.
/// You'd write a function such as:
///
/// ```rust,ignore
/// #[cfg(target_arch = "wasm32")]
Expand Down
Loading

0 comments on commit 1bce92d

Please sign in to comment.