Skip to content

Commit

Permalink
Rewrite simd128 and wasm support
Browse files Browse the repository at this point in the history
* Update representation of `v128`
* Rename everything with new naming convention of underscores and no
  modules/impls
* Remove no longer necessary `wasm_simd128` feature
* Remove `#[target_feature]` attributes (use `#[cfg]` instead)
* Update `assert_instr` tests
* Update some implementations as LLVM has evolved
* Allow some more esoteric syntax in `#[assert_instr]`
* Adjust the safety of APIs where appropriate
* Remove macros in favor of hand-coded implementations
* Comment out the tests for now as there's no known runtime for these
  yet
  • Loading branch information
alexcrichton committed Dec 13, 2018
1 parent e3cdea8 commit 66d1c09
Show file tree
Hide file tree
Showing 11 changed files with 2,433 additions and 1,423 deletions.
9 changes: 7 additions & 2 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ case ${TARGET} in
cargo_test "--release"
;;
wasm32-unknown-unknown*)
# export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
cargo_test "--release --features=wasm_simd128"
# There's no node or other runtime which supports the most recent SIMD
# proposal, but hopefully that's coming soon! For now just test that we
# can codegen with no LLVM faults, and we'll remove `--no-run` at a
# later date.
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
export RUSTFLAGS="${RUSTFLAGS} -Cllvm-args=-wasm-enable-unimplemented-simd"
cargo_test "--release --no-run"
;;
*)
;;
Expand Down
16 changes: 5 additions & 11 deletions coresimd/wasm32/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
//! WASM32 intrinsics
#![allow(deprecated)]

#[macro_use]
#[cfg(all(not(test), feature = "wasm_simd128"))]
mod simd128;

#[cfg(all(test, feature = "wasm_simd128"))]
pub mod simd128;
#[cfg(all(test, feature = "wasm_simd128"))]
pub use self::simd128::*;

#[cfg(test)]
use stdsimd_test::assert_instr;
#[cfg(test)]
Expand All @@ -21,6 +10,11 @@ mod atomic;
#[cfg(any(target_feature = "atomics", dox))]
pub use self::atomic::*;

#[cfg(any(target_feature = "simd128", dox))]
mod simd128;
#[cfg(any(target_feature = "simd128", dox))]
pub use self::simd128::*;

mod memory;
pub use self::memory::*;

Expand Down
Loading

0 comments on commit 66d1c09

Please sign in to comment.