Skip to content

Commit

Permalink
std: Stabilize wasm simd intrinsics
Browse files Browse the repository at this point in the history
This commit performs two changes to stabilize Rust support for
WebAssembly simd intrinsics:

* The stdarch submodule is updated to pull in rust-lang/stdarch#1179.
* The `wasm_target_feature` feature gate requirement for the `simd128`
  feature has been removed, stabilizing the name `simd128`.

This should conclude the FCP started on #74372 and...

Closes #74372
  • Loading branch information
alexcrichton committed Jun 11, 2021
1 parent 0279cb1 commit e05bb26
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const RISCV_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
];

const WASM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
("simd128", Some(sym::wasm_target_feature)),
("simd128", None),
("atomics", Some(sym::wasm_target_feature)),
("nontrapping-fptoint", Some(sym::wasm_target_feature)),
];
Expand Down
1 change: 1 addition & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
#![feature(no_niche)] // rust-lang/rust#68303
#![feature(no_coverage)] // rust-lang/rust#84605
#![feature(int_error_matching)]
#![cfg_attr(bootstrap, feature(target_feature_11))]
#![deny(unsafe_op_in_unsafe_fn)]
#![deny(or_patterns_back_compat)]

Expand Down
2 changes: 0 additions & 2 deletions src/test/rustdoc-ui/wasm-safe.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// check-pass

#![feature(wasm_target_feature)]

#[cfg(any(target_arch = "wasm32", doc))]
#[target_feature(enable = "simd128")]
pub fn foo() {}
2 changes: 0 additions & 2 deletions src/test/ui/simd/wasm-simd-indirect.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// build-pass

#![cfg_attr(target_arch = "wasm32", feature(wasm_simd, wasm_target_feature))]

#[cfg(target_arch = "wasm32")]
fn main() {
unsafe {
Expand Down

0 comments on commit e05bb26

Please sign in to comment.