about summary refs log tree commit diff
path: root/library/stdarch
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-01-21 16:59:10 +0100
committergnzlbg <gnzlbg@users.noreply.github.com>2019-01-22 17:04:25 +0100
commit11c624e488663f4f7554d1f92a072c7caee3908e (patch)
tree0523ed5fac723731d10ef7110a0c36923cb545a2 /library/stdarch
parent3ca14c6fecdf36ad5c5beca759d2ed7f6a0e1e5f (diff)
downloadrust-11c624e488663f4f7554d1f92a072c7caee3908e.tar.gz
rust-11c624e488663f4f7554d1f92a072c7caee3908e.zip
Refactor stdsimd
This commit:

* renames `coresimd` to `core_arch` and `stdsimd` to `std_detect`

* `std_detect` does no longer depend on `core_arch` - it is a freestanding
  `no_std` library that only depends on `core` - it is renamed to `std_detect`

* moves the top-level coresimd and stdsimd directories into the appropriate
  crates/... directories - this simplifies creating crate.io releases of these crates

* moves the top-level `coresimd` and `stdsimd` sub-directories into their
  corresponding crates in `crates/{core_arch, std_detect}`.
Diffstat (limited to 'library/stdarch')
-rw-r--r--library/stdarch/Cargo.toml4
-rw-r--r--library/stdarch/README.md8
-rwxr-xr-xlibrary/stdarch/ci/dox.sh11
-rwxr-xr-xlibrary/stdarch/ci/run.sh12
-rw-r--r--library/stdarch/coresimd/mod.rs184
-rw-r--r--library/stdarch/crates/core_arch/Cargo.toml (renamed from library/stdarch/crates/coresimd/Cargo.toml)8
-rw-r--r--library/stdarch/crates/core_arch/build.rs (renamed from library/stdarch/crates/coresimd/build.rs)0
-rwxr-xr-xlibrary/stdarch/crates/core_arch/foo.wasm (renamed from library/stdarch/crates/coresimd/foo.wasm)bin252 -> 252 bytes
-rw-r--r--library/stdarch/crates/core_arch/src/aarch64/crc.rs (renamed from library/stdarch/coresimd/aarch64/crc.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/aarch64/crypto.rs (renamed from library/stdarch/coresimd/aarch64/crypto.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/aarch64/mod.rs (renamed from library/stdarch/coresimd/aarch64/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/aarch64/neon.rs (renamed from library/stdarch/coresimd/aarch64/neon.rs)20
-rw-r--r--library/stdarch/crates/core_arch/src/aarch64/v8.rs (renamed from library/stdarch/coresimd/aarch64/v8.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/arm/armclang.rs (renamed from library/stdarch/coresimd/arm/armclang.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/arm/cmsis.rs (renamed from library/stdarch/coresimd/arm/cmsis.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/arm/dsp.rs (renamed from library/stdarch/coresimd/arm/dsp.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/arm/mod.rs (renamed from library/stdarch/coresimd/arm/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/arm/neon.rs (renamed from library/stdarch/coresimd/arm/neon.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/arm/table_lookup_tests.rs (renamed from library/stdarch/coresimd/arm/table_lookup_tests.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/arm/v6.rs (renamed from library/stdarch/coresimd/arm/v6.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/arm/v7.rs (renamed from library/stdarch/coresimd/arm/v7.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/lib.rs (renamed from library/stdarch/crates/coresimd/src/lib.rs)16
-rw-r--r--library/stdarch/crates/core_arch/src/macros.rs (renamed from library/stdarch/coresimd/macros.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/mips/mod.rs (renamed from library/stdarch/coresimd/mips/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/mips/msa.rs (renamed from library/stdarch/coresimd/mips/msa.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/mod.rs (renamed from library/stdarch/stdsimd/mod.rs)243
-rw-r--r--library/stdarch/crates/core_arch/src/nvptx/mod.rs (renamed from library/stdarch/coresimd/nvptx/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/powerpc/altivec.rs (renamed from library/stdarch/coresimd/powerpc/altivec.rs)10
-rw-r--r--library/stdarch/crates/core_arch/src/powerpc/mod.rs (renamed from library/stdarch/coresimd/powerpc/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/powerpc/vsx.rs (renamed from library/stdarch/coresimd/powerpc/vsx.rs)10
-rw-r--r--library/stdarch/crates/core_arch/src/powerpc64/mod.rs (renamed from library/stdarch/coresimd/powerpc64/mod.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/simd.rs (renamed from library/stdarch/coresimd/simd.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/simd_llvm.rs (renamed from library/stdarch/coresimd/simd_llvm.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/v64.rs (renamed from library/stdarch/coresimd/v64.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/wasm32/atomic.rs (renamed from library/stdarch/coresimd/wasm32/atomic.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/wasm32/memory.rs (renamed from library/stdarch/coresimd/wasm32/memory.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/wasm32/mod.rs (renamed from library/stdarch/coresimd/wasm32/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/wasm32/simd128.rs (renamed from library/stdarch/coresimd/wasm32/simd128.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86/abm.rs (renamed from library/stdarch/coresimd/x86/abm.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/adx.rs (renamed from library/stdarch/coresimd/x86/adx.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86/aes.rs (renamed from library/stdarch/coresimd/x86/aes.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86/avx.rs (renamed from library/stdarch/coresimd/x86/avx.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/x86/avx2.rs (renamed from library/stdarch/coresimd/x86/avx2.rs)26
-rw-r--r--library/stdarch/crates/core_arch/src/x86/avx512f.rs (renamed from library/stdarch/coresimd/x86/avx512f.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/x86/bmi1.rs (renamed from library/stdarch/coresimd/x86/bmi1.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/bmi2.rs (renamed from library/stdarch/coresimd/x86/bmi2.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/bswap.rs (renamed from library/stdarch/coresimd/x86/bswap.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86/cpuid.rs (renamed from library/stdarch/coresimd/x86/cpuid.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/eflags.rs (renamed from library/stdarch/coresimd/x86/eflags.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/fma.rs (renamed from library/stdarch/coresimd/x86/fma.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86/fxsr.rs (renamed from library/stdarch/coresimd/x86/fxsr.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/macros.rs (renamed from library/stdarch/coresimd/x86/macros.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86/mmx.rs (renamed from library/stdarch/coresimd/x86/mmx.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86/mod.rs (renamed from library/stdarch/coresimd/x86/mod.rs)69
-rw-r--r--library/stdarch/crates/core_arch/src/x86/pclmulqdq.rs (renamed from library/stdarch/coresimd/x86/pclmulqdq.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86/rdrand.rs (renamed from library/stdarch/coresimd/x86/rdrand.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86/rdtsc.rs (renamed from library/stdarch/coresimd/x86/rdtsc.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sha.rs (renamed from library/stdarch/coresimd/x86/sha.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse.rs (renamed from library/stdarch/coresimd/x86/sse.rs)75
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse2.rs (renamed from library/stdarch/coresimd/x86/sse2.rs)10
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse3.rs (renamed from library/stdarch/coresimd/x86/sse3.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse41.rs (renamed from library/stdarch/coresimd/x86/sse41.rs)16
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse42.rs (renamed from library/stdarch/coresimd/x86/sse42.rs)18
-rw-r--r--library/stdarch/crates/core_arch/src/x86/sse4a.rs (renamed from library/stdarch/coresimd/x86/sse4a.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86/ssse3.rs (renamed from library/stdarch/coresimd/x86/ssse3.rs)8
-rw-r--r--library/stdarch/crates/core_arch/src/x86/tbm.rs (renamed from library/stdarch/coresimd/x86/tbm.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86/test.rs (renamed from library/stdarch/coresimd/x86/test.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86/xsave.rs (renamed from library/stdarch/coresimd/x86/xsave.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/abm.rs (renamed from library/stdarch/coresimd/x86_64/abm.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/adx.rs (renamed from library/stdarch/coresimd/x86_64/adx.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/avx.rs (renamed from library/stdarch/coresimd/x86_64/avx.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/avx2.rs (renamed from library/stdarch/coresimd/x86_64/avx2.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/bmi.rs (renamed from library/stdarch/coresimd/x86_64/bmi.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/bmi2.rs (renamed from library/stdarch/coresimd/x86_64/bmi2.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/bswap.rs (renamed from library/stdarch/coresimd/x86_64/bswap.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/cmpxchg16b.rs (renamed from library/stdarch/coresimd/x86_64/cmpxchg16b.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/fxsr.rs (renamed from library/stdarch/coresimd/x86_64/fxsr.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/mod.rs (renamed from library/stdarch/coresimd/x86_64/mod.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/rdrand.rs (renamed from library/stdarch/coresimd/x86_64/rdrand.rs)0
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/sse.rs (renamed from library/stdarch/coresimd/x86_64/sse.rs)4
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/sse2.rs (renamed from library/stdarch/coresimd/x86_64/sse2.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/sse41.rs (renamed from library/stdarch/coresimd/x86_64/sse41.rs)6
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/sse42.rs (renamed from library/stdarch/coresimd/x86_64/sse42.rs)2
-rw-r--r--library/stdarch/crates/core_arch/src/x86_64/xsave.rs (renamed from library/stdarch/coresimd/x86_64/xsave.rs)2
-rw-r--r--library/stdarch/crates/core_arch/tests/cpu-detection.rs (renamed from library/stdarch/crates/coresimd/tests/cpu-detection.rs)2
-rw-r--r--library/stdarch/crates/std_detect/Cargo.toml (renamed from library/stdarch/crates/stdsimd/Cargo.toml)25
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/aarch64.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/aarch64.rs)24
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/arm.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/arm.rs)4
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/mips.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/mips.rs)2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/mips64.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/mips64.rs)2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/powerpc.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/powerpc.rs)6
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/powerpc64.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/powerpc64.rs)6
-rw-r--r--library/stdarch/crates/std_detect/src/detect/arch/x86.rs (renamed from library/stdarch/stdsimd/arch/detect/arch/x86.rs)164
-rw-r--r--library/stdarch/crates/std_detect/src/detect/bit.rs (renamed from library/stdarch/stdsimd/arch/detect/bit.rs)0
-rw-r--r--library/stdarch/crates/std_detect/src/detect/cache.rs (renamed from library/stdarch/stdsimd/arch/detect/cache.rs)3
-rw-r--r--library/stdarch/crates/std_detect/src/detect/error_macros.rs (renamed from library/stdarch/stdsimd/arch/detect/error_macros.rs)0
-rw-r--r--library/stdarch/crates/std_detect/src/detect/mod.rs (renamed from library/stdarch/stdsimd/arch/detect/mod.rs)2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/aarch64.rs (renamed from library/stdarch/stdsimd/arch/detect/os/aarch64.rs)3
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/freebsd/aarch64.rs (renamed from library/stdarch/stdsimd/arch/detect/os/freebsd/aarch64.rs)3
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/freebsd/mod.rs (renamed from library/stdarch/stdsimd/arch/detect/os/freebsd/mod.rs)0
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/aarch64.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/aarch64.rs)7
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/arm.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/arm.rs)7
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/auxvec.rs)26
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/cpuinfo.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/cpuinfo.rs)5
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/mips.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/mips.rs)4
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/mod.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/mod.rs)2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/linux/powerpc.rs (renamed from library/stdarch/stdsimd/arch/detect/os/linux/powerpc.rs)6
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/other.rs (renamed from library/stdarch/stdsimd/arch/detect/os/other.rs)2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/x86.rs (renamed from library/stdarch/stdsimd/arch/detect/os/x86.rs)11
-rw-r--r--library/stdarch/crates/std_detect/src/detect/test_data/linux-rpi3.auxv (renamed from library/stdarch/stdsimd/arch/detect/test_data/linux-rpi3.auxv)bin160 -> 160 bytes
-rw-r--r--library/stdarch/crates/std_detect/src/detect/test_data/linux-x64-i7-6850k.auxv (renamed from library/stdarch/stdsimd/arch/detect/test_data/linux-x64-i7-6850k.auxv)bin304 -> 304 bytes
-rw-r--r--library/stdarch/crates/std_detect/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv (renamed from library/stdarch/stdsimd/arch/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv)bin160 -> 160 bytes
-rw-r--r--library/stdarch/crates/std_detect/src/lib.rs37
-rw-r--r--library/stdarch/crates/std_detect/src/mod.rs5
-rw-r--r--library/stdarch/crates/std_detect/tests/cpu-detection.rs (renamed from library/stdarch/crates/stdsimd/tests/cpu-detection.rs)2
-rw-r--r--library/stdarch/crates/stdsimd-verify/build.rs10
-rw-r--r--library/stdarch/crates/stdsimd-verify/src/lib.rs4
-rw-r--r--library/stdarch/crates/stdsimd/src/lib.rs41
-rw-r--r--library/stdarch/examples/Cargo.toml27
-rw-r--r--library/stdarch/examples/hex.rs18
-rw-r--r--library/stdarch/examples/wasm.rs4
121 files changed, 566 insertions, 818 deletions
diff --git a/library/stdarch/Cargo.toml b/library/stdarch/Cargo.toml
index 98c4cd5e4ba..e97bf7f3632 100644
--- a/library/stdarch/Cargo.toml
+++ b/library/stdarch/Cargo.toml
@@ -1,7 +1,9 @@
 [workspace]
 members = [
   "crates/stdsimd-verify",
-  "crates/stdsimd",
+  "crates/core_arch",
+  "crates/std_detect",
+  "examples/"
 ]
 exclude = [
   "crates/wasm-assert-instr-tests"
diff --git a/library/stdarch/README.md b/library/stdarch/README.md
index e56d4ded7a1..1341369245f 100644
--- a/library/stdarch/README.md
+++ b/library/stdarch/README.md
@@ -11,8 +11,9 @@ and `libstd`.
 The easiest way to use it is just to import it via `use std::arch`. 
 
 The `std::arch` component for `x86` is available in stable Rust. The `std::arch`
-components for other architectures and the `std::simd` component require nightly
-Rust.
+components for other architectures requires nightly Rust. The `std::simd`
+component now lives in the
+[`packed_simd`](https://github.com/rust-lang-nursery/packed_simd) crate.
 
 Using `stdsimd` master branch is not recommended. It requires nightly Rust, it
 only works with particular Rust nightly versions, and it can (and does) break
@@ -21,7 +22,8 @@ often. If you need to use `stdsimd` master branch, you can add it to your
 
 ```toml
 #[dependencies]
-stdsimd = { git = "https://github.com/rust-lang-nursery/stdsimd.git" }
+core_arch = { git = "https://github.com/rust-lang-nursery/stdsimd.git" }
+std_detect = { git = "https://github.com/rust-lang-nursery/stdsimd.git" }
 ```
 
 # Documentation
diff --git a/library/stdarch/ci/dox.sh b/library/stdarch/ci/dox.sh
index e7e8a740a9a..1951a7b41b8 100755
--- a/library/stdarch/ci/dox.sh
+++ b/library/stdarch/ci/dox.sh
@@ -22,15 +22,16 @@ dox() {
   rm -rf "target/doc/${arch}"
   mkdir "target/doc/${arch}"
 
-  cargo build --verbose --target "${target}" --manifest-path crates/stdsimd/Cargo.toml
+  cargo build --verbose --target "${target}" --manifest-path crates/core_arch/Cargo.toml
+  cargo build --verbose --target "${target}" --manifest-path crates/std_detect/Cargo.toml
 
   rustdoc --verbose --target "${target}" \
-          -o "target/doc/${arch}" crates/coresimd/src/lib.rs \
-          --crate-name coresimd \
+          -o "target/doc/${arch}" crates/core_arch/src/lib.rs \
+          --crate-name core_arch \
           --library-path "target/${target}/debug/deps"
   rustdoc --verbose --target "${target}" \
-          -o "target/doc/${arch}" crates/stdsimd/src/lib.rs \
-          --crate-name stdsimd \
+          -o "target/doc/${arch}" crates/std_detect/src/lib.rs \
+          --crate-name std_detect \
           --library-path "target/${target}/debug/deps" \
           --extern cfg_if="$(ls target/"${target}"/debug/deps/libcfg_if-*.rlib)" \
           --extern libc="$(ls target/"${target}"/debug/deps/liblibc-*.rlib)"
diff --git a/library/stdarch/ci/run.sh b/library/stdarch/ci/run.sh
index e4ba2b9d2d2..d12662ed83f 100755
--- a/library/stdarch/ci/run.sh
+++ b/library/stdarch/ci/run.sh
@@ -60,9 +60,9 @@ cargo_test() {
     cmd="$cmd ${subcmd} --target=$TARGET $1"
     if [ "$NOSTD" = "1" ]
     then
-        cmd="$cmd -p coresimd"
+        cmd="$cmd -p core_arch"
     else
-        cmd="$cmd -p coresimd -p stdsimd"
+        cmd="$cmd -p core_arch -p std_detect -p stdsimd_examples"
     fi
     cmd="$cmd -- $2"
     if [ "$NORUN" != "1" ]
@@ -109,4 +109,12 @@ case ${TARGET} in
         ;;
     *)
         ;;
+
 esac
+
+# Test examples
+(
+    cd examples
+    cargo test
+    echo test | cargo run --release hex
+)
diff --git a/library/stdarch/coresimd/mod.rs b/library/stdarch/coresimd/mod.rs
deleted file mode 100644
index 62ffa42f726..00000000000
--- a/library/stdarch/coresimd/mod.rs
+++ /dev/null
@@ -1,184 +0,0 @@
-//! `coresimd`
-
-#[macro_use]
-mod macros;
-
-mod simd;
-
-/// Platform dependent vendor intrinsics.
-///
-/// This documentation is for the version of this module in the `coresimd`
-/// crate, but you probably want to use the [`stdsimd` crate][stdsimd] which
-/// should have more complete documentation.
-///
-/// [stdsimd]: https://rust-lang-nursery.github.io/stdsimd/x86_64/stdsimd/arch/index.html
-///
-/// Also note that while this module may appear to contains the intrinsics for
-/// only one platform it actually contains intrinsics for multiple platforms
-/// compiled in conditionally. For other platforms of stdsimd see:
-///
-/// * [`x86`]
-/// * [`x86_64`]
-/// * [`arm`]
-/// * [`aarch64`]
-/// * [`mips`]
-/// * [`mips64`]
-/// * [`PowerPC`]
-/// * [`PowerPC64`]
-/// * [`NVPTX`]
-/// * [`wasm32`]
-///
-/// [`x86`]: https://rust-lang-nursery.github.io/stdsimd/x86/stdsimd/arch/index.html
-/// [`x86_64`]: https://rust-lang-nursery.github.io/stdsimd/x86_64/stdsimd/arch/index.html
-/// [`arm`]: https://rust-lang-nursery.github.io/stdsimd/arm/stdsimd/arch/index.html
-/// [`aarch64`]: https://rust-lang-nursery.github.io/stdsimd/aarch64/stdsimd/arch/index.html
-/// [`mips`]: https://rust-lang-nursery.github.io/stdsimd/mips/stdsimd/arch/index.html
-/// [`mips64`]: https://rust-lang-nursery.github.io/stdsimd/mips64/stdsimd/arch/index.html
-/// [`PowerPC`]: https://rust-lang-nursery.github.io/stdsimd/powerpc/stdsimd/arch/index.html
-/// [`PowerPC64`]: https://rust-lang-nursery.github.io/stdsimd/powerpc64/stdsimd/arch/index.html
-/// [`NVPTX`]: https://rust-lang-nursery.github.io/stdsimd/nvptx/stdsimd/arch/index.html
-/// [`wasm32`]: https://rust-lang-nursery.github.io/stdsimd/wasm32/stdsimd/arch/index.html
-#[stable(feature = "simd_arch", since = "1.27.0")]
-pub mod arch {
-    /// Platform-specific intrinsics for the `x86` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "x86", dox))]
-    #[doc(cfg(target_arch = "x86"))]
-    #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub mod x86 {
-        #[stable(feature = "simd_x86", since = "1.27.0")]
-        pub use coresimd::x86::*;
-    }
-
-    /// Platform-specific intrinsics for the `x86_64` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "x86_64", dox))]
-    #[doc(cfg(target_arch = "x86_64"))]
-    #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub mod x86_64 {
-        #[stable(feature = "simd_x86", since = "1.27.0")]
-        pub use coresimd::x86::*;
-        #[stable(feature = "simd_x86", since = "1.27.0")]
-        pub use coresimd::x86_64::*;
-    }
-
-    /// Platform-specific intrinsics for the `arm` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "arm", dox))]
-    #[doc(cfg(target_arch = "arm"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod arm {
-        pub use coresimd::arm::*;
-    }
-
-    /// Platform-specific intrinsics for the `aarch64` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "aarch64", dox))]
-    #[doc(cfg(target_arch = "aarch64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod aarch64 {
-        pub use coresimd::aarch64::*;
-        pub use coresimd::arm::*;
-    }
-
-    /// Platform-specific intrinsics for the `wasm32` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "wasm32", dox))]
-    #[doc(cfg(target_arch = "wasm32"))]
-    #[stable(feature = "simd_wasm32", since = "1.33.0")]
-    pub mod wasm32 {
-        #[stable(feature = "simd_wasm32", since = "1.33.0")]
-        pub use coresimd::wasm32::*;
-    }
-
-    /// Platform-specific intrinsics for the `mips` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "mips", dox))]
-    #[doc(cfg(target_arch = "mips"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod mips {
-        pub use coresimd::mips::*;
-    }
-
-    /// Platform-specific intrinsics for the `mips64` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "mips64", dox))]
-    #[doc(cfg(target_arch = "mips64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod mips64 {
-        pub use coresimd::mips::*;
-    }
-
-    /// Platform-specific intrinsics for the `PowerPC` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "powerpc", dox))]
-    #[doc(cfg(target_arch = "powerpc"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod powerpc {
-        pub use coresimd::powerpc::*;
-    }
-
-    /// Platform-specific intrinsics for the `PowerPC64` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "powerpc64", dox))]
-    #[doc(cfg(target_arch = "powerpc64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod powerpc64 {
-        pub use coresimd::powerpc64::*;
-    }
-
-    /// Platform-specific intrinsics for the `NVPTX` platform.
-    ///
-    /// See the [module documentation](../index.html) for more details.
-    #[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
-    #[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod nvptx {
-        pub use coresimd::nvptx::*;
-    }
-}
-
-mod simd_llvm;
-
-#[cfg(any(target_arch = "x86", target_arch = "x86_64", dox))]
-#[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))]
-mod x86;
-#[cfg(any(target_arch = "x86_64", dox))]
-#[doc(cfg(target_arch = "x86_64"))]
-mod x86_64;
-
-#[cfg(any(target_arch = "aarch64", dox))]
-#[doc(cfg(target_arch = "aarch64"))]
-mod aarch64;
-#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
-#[doc(cfg(any(target_arch = "arm", target_arch = "aarch64")))]
-mod arm;
-
-#[cfg(any(target_arch = "wasm32", dox))]
-#[doc(cfg(target_arch = "wasm32"))]
-mod wasm32;
-
-#[cfg(any(target_arch = "mips", target_arch = "mips64", dox))]
-#[doc(cfg(any(target_arch = "mips", target_arch = "mips64")))]
-mod mips;
-
-#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64", dox))]
-#[doc(cfg(any(target_arch = "powerpc", target_arch = "powerpc64")))]
-mod powerpc;
-
-#[cfg(any(target_arch = "powerpc64", dox))]
-#[doc(cfg(target_arch = "powerpc64"))]
-mod powerpc64;
-
-#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
-#[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
-mod nvptx;
diff --git a/library/stdarch/crates/coresimd/Cargo.toml b/library/stdarch/crates/core_arch/Cargo.toml
index d96672baf29..09bf17bc611 100644
--- a/library/stdarch/crates/coresimd/Cargo.toml
+++ b/library/stdarch/crates/core_arch/Cargo.toml
@@ -1,5 +1,5 @@
 [package]
-name = "coresimd"
+name = "core_arch"
 version = "0.1.3"
 authors = [
     "Alex Crichton <alex@alexcrichton.com>",
@@ -7,11 +7,11 @@ authors = [
     "Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>",
 ]
 description = "SIMD support in Rust's core library."
-documentation = "https://docs.rs/stdsimd"
+documentation = "https://docs.rs/core_arch"
 homepage = "https://github.com/rust-lang-nursery/stdsimd"
 repository = "https://github.com/rust-lang-nursery/stdsimd"
 readme = "README.md"
-keywords = ["core", "simd", "intrinsics"]
+keywords = ["core", "simd", "arch", "intrinsics"]
 categories = ["hardware-support", "no-std"]
 license = "MIT/Apache-2.0"
 
@@ -24,7 +24,7 @@ maintenance = { status = "experimental" }
 
 [dev-dependencies]
 stdsimd-test = { version = "0.*", path = "../stdsimd-test" }
-stdsimd = { version = "0.1.3", path = "../stdsimd" }
+std_detect = { version = "0.1.3", path = "../std_detect" }
 
 [target.wasm32-unknown-unknown.dev-dependencies]
 wasm-bindgen-test = "=0.2.19"
diff --git a/library/stdarch/crates/coresimd/build.rs b/library/stdarch/crates/core_arch/build.rs
index f497e1830ee..f497e1830ee 100644
--- a/library/stdarch/crates/coresimd/build.rs
+++ b/library/stdarch/crates/core_arch/build.rs
diff --git a/library/stdarch/crates/coresimd/foo.wasm b/library/stdarch/crates/core_arch/foo.wasm
index 34e11336649..34e11336649 100755
--- a/library/stdarch/crates/coresimd/foo.wasm
+++ b/library/stdarch/crates/core_arch/foo.wasm
Binary files differdiff --git a/library/stdarch/coresimd/aarch64/crc.rs b/library/stdarch/crates/core_arch/src/aarch64/crc.rs
index 6d6e2991480..f43b163678a 100644
--- a/library/stdarch/coresimd/aarch64/crc.rs
+++ b/library/stdarch/crates/core_arch/src/aarch64/crc.rs
@@ -87,8 +87,8 @@ pub unsafe fn __crc32cd(crc: u32, data: u64) -> u32 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::aarch64::*;
-    use coresimd::simd::*;
+    use core_arch::aarch64::*;
+    use core_arch::simd::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/aarch64/crypto.rs b/library/stdarch/crates/core_arch/src/aarch64/crypto.rs
index 940470cc991..1676d37901a 100644
--- a/library/stdarch/coresimd/aarch64/crypto.rs
+++ b/library/stdarch/crates/core_arch/src/aarch64/crypto.rs
@@ -1,5 +1,5 @@
-use coresimd::arm::uint32x4_t;
-use coresimd::arm::uint8x16_t;
+use core_arch::arm::uint32x4_t;
+use core_arch::arm::uint8x16_t;
 
 #[allow(improper_ctypes)]
 extern "C" {
@@ -164,8 +164,8 @@ pub unsafe fn vsha256su1q_u32(
 
 #[cfg(test)]
 mod tests {
-    use coresimd::aarch64::*;
-    use coresimd::simd::*;
+    use core_arch::aarch64::*;
+    use core_arch::simd::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/aarch64/mod.rs b/library/stdarch/crates/core_arch/src/aarch64/mod.rs
index d573e2c0b83..d573e2c0b83 100644
--- a/library/stdarch/coresimd/aarch64/mod.rs
+++ b/library/stdarch/crates/core_arch/src/aarch64/mod.rs
diff --git a/library/stdarch/coresimd/aarch64/neon.rs b/library/stdarch/crates/core_arch/src/aarch64/neon.rs
index ac0144f4cd3..0c43810dfa1 100644
--- a/library/stdarch/coresimd/aarch64/neon.rs
+++ b/library/stdarch/crates/core_arch/src/aarch64/neon.rs
@@ -4,8 +4,8 @@
 
 // FIXME: replace neon with asimd
 
-use coresimd::arm::*;
-use coresimd::simd_llvm::*;
+use core_arch::arm::*;
+use core_arch::simd_llvm::*;
 #[cfg(test)]
 use stdsimd_test::assert_instr;
 
@@ -894,7 +894,7 @@ pub unsafe fn vtbl4_p8(a: poly8x8x4_t, b: uint8x8_t) -> poly8x8_t {
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx1_s8(a: int8x8_t, b: int8x8_t, c: int8x8_t) -> int8x8_t {
-    use coresimd::simd::i8x8;
+    use core_arch::simd::i8x8;
     let r = vqtbx1_s8(a, vcombine_s8(b, ::mem::zeroed()), ::mem::transmute(c));
     let m: int8x8_t = simd_lt(c, ::mem::transmute(i8x8::splat(8)));
     simd_select(m, r, a)
@@ -906,7 +906,7 @@ pub unsafe fn vtbx1_s8(a: int8x8_t, b: int8x8_t, c: int8x8_t) -> int8x8_t {
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx1_u8(a: uint8x8_t, b: uint8x8_t, c: uint8x8_t) -> uint8x8_t {
-    use coresimd::simd::u8x8;
+    use core_arch::simd::u8x8;
     let r = vqtbx1_u8(a, vcombine_u8(b, ::mem::zeroed()), c);
     let m: int8x8_t = simd_lt(c, ::mem::transmute(u8x8::splat(8)));
     simd_select(m, r, a)
@@ -918,7 +918,7 @@ pub unsafe fn vtbx1_u8(a: uint8x8_t, b: uint8x8_t, c: uint8x8_t) -> uint8x8_t {
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx1_p8(a: poly8x8_t, b: poly8x8_t, c: uint8x8_t) -> poly8x8_t {
-    use coresimd::simd::u8x8;
+    use core_arch::simd::u8x8;
     let r = vqtbx1_p8(a, vcombine_p8(b, ::mem::zeroed()), c);
     let m: int8x8_t = simd_lt(c, ::mem::transmute(u8x8::splat(8)));
     simd_select(m, r, a)
@@ -957,7 +957,7 @@ pub unsafe fn vtbx2_p8(a: poly8x8_t, b: poly8x8x2_t, c: uint8x8_t) -> poly8x8_t
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx3_s8(a: int8x8_t, b: int8x8x3_t, c: int8x8_t) -> int8x8_t {
-    use coresimd::simd::i8x8;
+    use core_arch::simd::i8x8;
     let r = vqtbx2_s8(
         a,
         int8x16x2_t(vcombine_s8(b.0, b.1), vcombine_s8(b.2, ::mem::zeroed())),
@@ -973,7 +973,7 @@ pub unsafe fn vtbx3_s8(a: int8x8_t, b: int8x8x3_t, c: int8x8_t) -> int8x8_t {
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx3_u8(a: uint8x8_t, b: uint8x8x3_t, c: uint8x8_t) -> uint8x8_t {
-    use coresimd::simd::u8x8;
+    use core_arch::simd::u8x8;
     let r = vqtbx2_u8(
         a,
         uint8x16x2_t(vcombine_u8(b.0, b.1), vcombine_u8(b.2, ::mem::zeroed())),
@@ -989,7 +989,7 @@ pub unsafe fn vtbx3_u8(a: uint8x8_t, b: uint8x8x3_t, c: uint8x8_t) -> uint8x8_t
 #[target_feature(enable = "neon")]
 #[cfg_attr(test, assert_instr(tbx))]
 pub unsafe fn vtbx3_p8(a: poly8x8_t, b: poly8x8x3_t, c: uint8x8_t) -> poly8x8_t {
-    use coresimd::simd::u8x8;
+    use core_arch::simd::u8x8;
     let r = vqtbx2_p8(
         a,
         poly8x16x2_t(vcombine_p8(b.0, b.1), vcombine_p8(b.2, ::mem::zeroed())),
@@ -1576,8 +1576,8 @@ pub unsafe fn vqtbx4q_p8(a: poly8x16_t, t: poly8x16x4_t, idx: uint8x16_t) -> pol
 
 #[cfg(test)]
 mod tests {
-    use coresimd::aarch64::*;
-    use coresimd::simd::*;
+    use core_arch::aarch64::*;
+    use core_arch::simd::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/aarch64/v8.rs b/library/stdarch/crates/core_arch/src/aarch64/v8.rs
index b537df9a3c1..fdc9e78aac4 100644
--- a/library/stdarch/coresimd/aarch64/v8.rs
+++ b/library/stdarch/crates/core_arch/src/aarch64/v8.rs
@@ -52,7 +52,7 @@ pub unsafe fn _cls_u64(x: u64) -> u64 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::aarch64::v8;
+    use core_arch::aarch64::v8;
 
     #[test]
     fn _rev_u64() {
diff --git a/library/stdarch/coresimd/arm/armclang.rs b/library/stdarch/crates/core_arch/src/arm/armclang.rs
index 36a3a2fe9a3..36a3a2fe9a3 100644
--- a/library/stdarch/coresimd/arm/armclang.rs
+++ b/library/stdarch/crates/core_arch/src/arm/armclang.rs
diff --git a/library/stdarch/coresimd/arm/cmsis.rs b/library/stdarch/crates/core_arch/src/arm/cmsis.rs
index bc8509d3e8e..bc8509d3e8e 100644
--- a/library/stdarch/coresimd/arm/cmsis.rs
+++ b/library/stdarch/crates/core_arch/src/arm/cmsis.rs
diff --git a/library/stdarch/coresimd/arm/dsp.rs b/library/stdarch/crates/core_arch/src/arm/dsp.rs
index 7ac4708202e..8385e7ed218 100644
--- a/library/stdarch/coresimd/arm/dsp.rs
+++ b/library/stdarch/crates/core_arch/src/arm/dsp.rs
@@ -392,8 +392,8 @@ pub unsafe fn usad8a(a: int8x4_t, b: int8x4_t, c: u32) -> u32 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arm::*;
-    use coresimd::simd::*;
+    use core_arch::arm::*;
+    use core_arch::simd::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/arm/mod.rs b/library/stdarch/crates/core_arch/src/arm/mod.rs
index 30ff991f8d9..30ff991f8d9 100644
--- a/library/stdarch/coresimd/arm/mod.rs
+++ b/library/stdarch/crates/core_arch/src/arm/mod.rs
diff --git a/library/stdarch/coresimd/arm/neon.rs b/library/stdarch/crates/core_arch/src/arm/neon.rs
index 99f31be8b98..799f2a14ee3 100644
--- a/library/stdarch/coresimd/arm/neon.rs
+++ b/library/stdarch/crates/core_arch/src/arm/neon.rs
@@ -1,6 +1,6 @@
 //! ARMv7 NEON intrinsics
 
-use coresimd::simd_llvm::*;
+use core_arch::simd_llvm::*;
 #[cfg(test)]
 use stdsimd_test::assert_instr;
 
@@ -992,8 +992,8 @@ pub unsafe fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arm::*;
-    use coresimd::simd::*;
+    use core_arch::arm::*;
+    use core_arch::simd::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/arm/table_lookup_tests.rs b/library/stdarch/crates/core_arch/src/arm/table_lookup_tests.rs
index 936fea5b897..4d0c21ee01c 100644
--- a/library/stdarch/coresimd/arm/table_lookup_tests.rs
+++ b/library/stdarch/crates/core_arch/src/arm/table_lookup_tests.rs
@@ -5,12 +5,12 @@
 use super::*;
 
 #[cfg(target_arch = "aarch64")]
-use coresimd::aarch64::*;
+use core_arch::aarch64::*;
 
 #[cfg(target_arch = "arm")]
-use coresimd::arm::*;
+use core_arch::arm::*;
 
-use coresimd::simd::*;
+use core_arch::simd::*;
 use std::mem;
 use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/arm/v6.rs b/library/stdarch/crates/core_arch/src/arm/v6.rs
index e8bc887effd..c24c40f963e 100644
--- a/library/stdarch/coresimd/arm/v6.rs
+++ b/library/stdarch/crates/core_arch/src/arm/v6.rs
@@ -25,7 +25,7 @@ pub unsafe fn _rev_u32(x: u32) -> u32 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arm::v6;
+    use core_arch::arm::v6;
 
     #[test]
     fn _rev_u16() {
diff --git a/library/stdarch/coresimd/arm/v7.rs b/library/stdarch/crates/core_arch/src/arm/v7.rs
index aefd7c7465e..608907ce816 100644
--- a/library/stdarch/coresimd/arm/v7.rs
+++ b/library/stdarch/crates/core_arch/src/arm/v7.rs
@@ -53,7 +53,7 @@ pub unsafe fn _rbit_u32(x: u32) -> u32 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arm::v7;
+    use core_arch::arm::v7;
 
     #[test]
     fn _clz_u8() {
diff --git a/library/stdarch/crates/coresimd/src/lib.rs b/library/stdarch/crates/core_arch/src/lib.rs
index fdb4fb277dc..f179dbde8a9 100644
--- a/library/stdarch/crates/coresimd/src/lib.rs
+++ b/library/stdarch/crates/core_arch/src/lib.rs
@@ -1,10 +1,4 @@
-//! SIMD and vendor intrinsics support library.
-//!
-//! This documentation is for the `coresimd` crate, but you probably want to
-//! use the [`stdsimd` crate][stdsimd] which should have more complete
-//! documentation.
-//!
-//! [stdsimd]: https://rust-lang-nursery.github.io/stdsimd/x86_64/stdsimd/
+//! Architecture-specific intrinsics.
 
 #![cfg_attr(stdsimd_strict, deny(warnings))]
 #![allow(dead_code)]
@@ -85,7 +79,7 @@ extern crate core as _core;
 extern crate std;
 #[cfg(test)]
 #[macro_use]
-extern crate stdsimd;
+extern crate std_detect;
 #[cfg(test)]
 extern crate stdsimd_test;
 #[cfg(test)]
@@ -94,10 +88,10 @@ extern crate test;
 #[cfg(all(test, target_arch = "wasm32"))]
 extern crate wasm_bindgen_test;
 
-#[path = "../../../coresimd/mod.rs"]
-mod coresimd;
+#[path = "mod.rs"]
+mod core_arch;
 
-pub use coresimd::arch;
+pub use core_arch::arch;
 
 #[allow(unused_imports)]
 use _core::clone;
diff --git a/library/stdarch/coresimd/macros.rs b/library/stdarch/crates/core_arch/src/macros.rs
index 74a01be7709..74a01be7709 100644
--- a/library/stdarch/coresimd/macros.rs
+++ b/library/stdarch/crates/core_arch/src/macros.rs
diff --git a/library/stdarch/coresimd/mips/mod.rs b/library/stdarch/crates/core_arch/src/mips/mod.rs
index e305ffa573e..e305ffa573e 100644
--- a/library/stdarch/coresimd/mips/mod.rs
+++ b/library/stdarch/crates/core_arch/src/mips/mod.rs
diff --git a/library/stdarch/coresimd/mips/msa.rs b/library/stdarch/crates/core_arch/src/mips/msa.rs
index 11904508443..6e1d6c3cffa 100644
--- a/library/stdarch/coresimd/mips/msa.rs
+++ b/library/stdarch/crates/core_arch/src/mips/msa.rs
@@ -35,7 +35,7 @@ pub unsafe fn __msa_add_a_b(a: i8x16, b: i8x16) -> i8x16 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::mips64::msa;
+    use core_arch::mips64::msa;
     use simd::*;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/stdsimd/mod.rs b/library/stdarch/crates/core_arch/src/mod.rs
index 7ed8bc5ba8c..f6f986b9579 100644
--- a/library/stdarch/stdsimd/mod.rs
+++ b/library/stdarch/crates/core_arch/src/mod.rs
@@ -1,4 +1,9 @@
-//! `stdsimd`
+//! `core_arch`
+
+#[macro_use]
+mod macros;
+
+mod simd;
 
 /// SIMD and vendor intrinsics module.
 ///
@@ -212,10 +217,10 @@
 /// AVX2 and also for the default platform.
 ///
 /// ```rust
-/// # #![cfg_attr(not(dox),feature(cfg_target_feature, target_feature, stdsimd))]
+/// # #![cfg_attr(not(dox),feature(stdsimd))]
 /// # #[cfg(not(dox))]
-/// # #[macro_use]
-/// # extern crate stdsimd;
+/// # #[macro_use(is_x86_feature_detected)]
+/// # extern crate std_detect;
 ///
 /// fn main() {
 ///     let mut dst = [0];
@@ -253,13 +258,15 @@
 /// we'll be using SSE4.1 features to implement hex encoding.
 ///
 /// ```
-/// # #![cfg_attr(not(dox),feature(cfg_target_feature, target_feature, stdsimd))]
+/// # #![cfg_attr(not(dox),feature(stdsimd))]
 /// # #![cfg_attr(not(dox), no_std)]
 /// # #[cfg(not(dox))]
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
-/// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate core_arch as std;
+/// # #[cfg(not(dox))]
+/// # #[macro_use(is_x86_feature_detected)]
+/// # extern crate std_detect;
 ///
 /// fn main() {
 ///     let mut dst = [0; 32];
@@ -355,167 +362,145 @@
 /// ```
 #[stable(feature = "simd_arch", since = "1.27.0")]
 pub mod arch {
-    #[cfg(all(not(dox), target_arch = "x86"))]
-    #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub use coresimd::arch::x86;
-
-    #[cfg(all(not(dox), target_arch = "x86_64"))]
-    #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub use coresimd::arch::x86_64;
-
-    #[cfg(all(not(dox), target_arch = "arm"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::arm;
-
-    #[cfg(all(not(dox), target_arch = "aarch64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::aarch64;
-
-    #[cfg(all(not(dox), target_arch = "mips"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::mips;
-
-    #[cfg(all(not(dox), target_arch = "mips64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::mips64;
-
-    #[cfg(all(not(dox), target_arch = "powerpc"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::powerpc;
-
-    #[cfg(all(not(dox), target_arch = "powerpc64"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::powerpc64;
-
-    #[cfg(all(not(dox), any(target_arch = "nvptx", target_arch = "nvptx64")))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::nvptx;
-
-    #[cfg(all(not(dox), target_arch = "wasm32"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub use coresimd::arch::wasm32;
-
-    #[doc(hidden)] // unstable implementation detail
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod detect;
-
     /// Platform-specific intrinsics for the `x86` platform.
     ///
-    /// The documentation with the full listing of `x86` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/x86/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "x86", dox))]
     #[doc(cfg(target_arch = "x86"))]
     #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub mod x86 {}
+    pub mod x86 {
+        #[stable(feature = "simd_x86", since = "1.27.0")]
+        pub use core_arch::x86::*;
+    }
 
     /// Platform-specific intrinsics for the `x86_64` platform.
     ///
-    /// The documentation with the full listing of `x86_64` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/x86_64/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "x86_64", dox))]
     #[doc(cfg(target_arch = "x86_64"))]
     #[stable(feature = "simd_x86", since = "1.27.0")]
-    pub mod x86_64 {}
+    pub mod x86_64 {
+        #[stable(feature = "simd_x86", since = "1.27.0")]
+        pub use core_arch::x86::*;
+        #[stable(feature = "simd_x86", since = "1.27.0")]
+        pub use core_arch::x86_64::*;
+    }
 
     /// Platform-specific intrinsics for the `arm` platform.
     ///
-    /// The documentation with the full listing of `arm` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/arm/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "arm", dox))]
     #[doc(cfg(target_arch = "arm"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod arm {}
+    pub mod arm {
+        pub use core_arch::arm::*;
+    }
 
     /// Platform-specific intrinsics for the `aarch64` platform.
     ///
-    /// The documentation with the full listing of `aarch64` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/aarch64/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "aarch64", dox))]
     #[doc(cfg(target_arch = "aarch64"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod aarch64 {}
+    pub mod aarch64 {
+        pub use core_arch::aarch64::*;
+        pub use core_arch::arm::*;
+    }
 
-    /// Platform-specific intrinsics for the `mips` platform.
+    /// Platform-specific intrinsics for the `wasm32` platform.
     ///
-    /// The documentation with the full listing of `mips` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "wasm32", dox))]
+    #[doc(cfg(target_arch = "wasm32"))]
+    #[stable(feature = "simd_wasm32", since = "1.33.0")]
+    pub mod wasm32 {
+        #[stable(feature = "simd_wasm32", since = "1.33.0")]
+        pub use core_arch::wasm32::*;
+    }
+
+    /// Platform-specific intrinsics for the `mips` platform.
     ///
-    /// [libcore]: ../../../core/arch/mips/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "mips", dox))]
     #[doc(cfg(target_arch = "mips"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod mips {}
+    pub mod mips {
+        pub use core_arch::mips::*;
+    }
 
     /// Platform-specific intrinsics for the `mips64` platform.
     ///
-    /// The documentation with the full listing of `mips64` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/mips64/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "mips64", dox))]
     #[doc(cfg(target_arch = "mips64"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod mips64 {}
+    pub mod mips64 {
+        pub use core_arch::mips::*;
+    }
 
-    /// Platform-specific intrinsics for the `powerpc` platform.
-    ///
-    /// The documentation with the full listing of `powerpc` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
+    /// Platform-specific intrinsics for the `PowerPC` platform.
     ///
-    /// [libcore]: ../../../core/arch/powerpc/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "powerpc", dox))]
     #[doc(cfg(target_arch = "powerpc"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod powerpc {}
+    pub mod powerpc {
+        pub use core_arch::powerpc::*;
+    }
 
-    /// Platform-specific intrinsics for the `powerpc64` platform.
+    /// Platform-specific intrinsics for the `PowerPC64` platform.
     ///
-    /// The documentation with the full listing of `powerpc64` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/powerpc64/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "powerpc64", dox))]
     #[doc(cfg(target_arch = "powerpc64"))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod powerpc64 {}
+    pub mod powerpc64 {
+        pub use core_arch::powerpc64::*;
+    }
 
-    /// Platform-specific intrinsics for the `nvptx` platform.
-    ///
-    /// The documentation with the full listing of `nvptx` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
+    /// Platform-specific intrinsics for the `NVPTX` platform.
     ///
-    /// [libcore]: ../../../core/arch/nvptx/index.html
-    #[cfg(dox)]
+    /// See the [module documentation](../index.html) for more details.
+    #[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
     #[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
     #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod nvptx {}
-
-    /// Platform-specific intrinsics for the `wasm32` platform.
-    ///
-    /// The documentation with the full listing of `wasm32` intrinsics is
-    /// available in [libcore], but the module is re-exported here in std
-    /// as well.
-    ///
-    /// [libcore]: ../../../core/arch/wasm32/index.html
-    #[cfg(dox)]
-    #[doc(cfg(target_arch = "wasm32"))]
-    #[unstable(feature = "stdsimd", issue = "27731")]
-    pub mod wasm32 {}
+    pub mod nvptx {
+        pub use core_arch::nvptx::*;
+    }
 }
+
+mod simd_llvm;
+
+#[cfg(any(target_arch = "x86", target_arch = "x86_64", dox))]
+#[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))]
+mod x86;
+#[cfg(any(target_arch = "x86_64", dox))]
+#[doc(cfg(target_arch = "x86_64"))]
+mod x86_64;
+
+#[cfg(any(target_arch = "aarch64", dox))]
+#[doc(cfg(target_arch = "aarch64"))]
+mod aarch64;
+#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
+#[doc(cfg(any(target_arch = "arm", target_arch = "aarch64")))]
+mod arm;
+
+#[cfg(any(target_arch = "wasm32", dox))]
+#[doc(cfg(target_arch = "wasm32"))]
+mod wasm32;
+
+#[cfg(any(target_arch = "mips", target_arch = "mips64", dox))]
+#[doc(cfg(any(target_arch = "mips", target_arch = "mips64")))]
+mod mips;
+
+#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64", dox))]
+#[doc(cfg(any(target_arch = "powerpc", target_arch = "powerpc64")))]
+mod powerpc;
+
+#[cfg(any(target_arch = "powerpc64", dox))]
+#[doc(cfg(target_arch = "powerpc64"))]
+mod powerpc64;
+
+#[cfg(any(target_arch = "nvptx", target_arch = "nvptx64", dox))]
+#[doc(cfg(any(target_arch = "nvptx", target_arch = "nvptx64")))]
+mod nvptx;
diff --git a/library/stdarch/coresimd/nvptx/mod.rs b/library/stdarch/crates/core_arch/src/nvptx/mod.rs
index 0247d2e44e6..0247d2e44e6 100644
--- a/library/stdarch/coresimd/nvptx/mod.rs
+++ b/library/stdarch/crates/core_arch/src/nvptx/mod.rs
diff --git a/library/stdarch/coresimd/powerpc/altivec.rs b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
index bcdd8431040..409b92d9023 100644
--- a/library/stdarch/coresimd/powerpc/altivec.rs
+++ b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
@@ -13,8 +13,8 @@
 
 #![allow(non_camel_case_types)]
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
 
 use mem;
 
@@ -1027,12 +1027,12 @@ pub use self::endian::*;
 #[cfg(test)]
 mod tests {
     #[cfg(target_arch = "powerpc")]
-    use coresimd::arch::powerpc::*;
+    use core_arch::arch::powerpc::*;
 
     #[cfg(target_arch = "powerpc64")]
-    use coresimd::arch::powerpc64::*;
+    use core_arch::arch::powerpc64::*;
 
-    use coresimd::simd::*;
+    use core_arch::simd::*;
     use stdsimd_test::simd_test;
 
     macro_rules! test_vec_perm {
diff --git a/library/stdarch/coresimd/powerpc/mod.rs b/library/stdarch/crates/core_arch/src/powerpc/mod.rs
index c7829d30b73..c7829d30b73 100644
--- a/library/stdarch/coresimd/powerpc/mod.rs
+++ b/library/stdarch/crates/core_arch/src/powerpc/mod.rs
diff --git a/library/stdarch/coresimd/powerpc/vsx.rs b/library/stdarch/crates/core_arch/src/powerpc/vsx.rs
index 56faf07950f..e6d37984071 100644
--- a/library/stdarch/coresimd/powerpc/vsx.rs
+++ b/library/stdarch/crates/core_arch/src/powerpc/vsx.rs
@@ -8,7 +8,7 @@
 
 #![allow(non_camel_case_types)]
 
-use coresimd::simd_llvm::*;
+use core_arch::simd_llvm::*;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -34,7 +34,7 @@ types! {
 
 mod sealed {
     use super::*;
-    use coresimd::simd::*;
+    use core_arch::simd::*;
 
     pub trait VectorPermDI {
         unsafe fn vec_xxpermdi(self, b: Self, dm: u8) -> Self;
@@ -86,12 +86,12 @@ where
 #[cfg(test)]
 mod tests {
     #[cfg(target_arch = "powerpc")]
-    use coresimd::arch::powerpc::*;
+    use core_arch::arch::powerpc::*;
 
     #[cfg(target_arch = "powerpc64")]
-    use coresimd::arch::powerpc64::*;
+    use core_arch::arch::powerpc64::*;
 
-    use coresimd::simd::*;
+    use core_arch::simd::*;
     use stdsimd_test::simd_test;
 
     macro_rules! test_vec_xxpermdi {
diff --git a/library/stdarch/coresimd/powerpc64/mod.rs b/library/stdarch/crates/core_arch/src/powerpc64/mod.rs
index 19148ca3668..2e5c329fc79 100644
--- a/library/stdarch/coresimd/powerpc64/mod.rs
+++ b/library/stdarch/crates/core_arch/src/powerpc64/mod.rs
@@ -5,4 +5,4 @@
 //!
 //! [64-Bit ELF V2 ABI Specification - Power Architecture]: http://openpowerfoundation.org/wp-content/uploads/resources/leabi/leabi-20170510.pdf
 
-pub use coresimd::powerpc::*;
+pub use core_arch::powerpc::*;
diff --git a/library/stdarch/coresimd/simd.rs b/library/stdarch/crates/core_arch/src/simd.rs
index 144050f01ea..468b1e380bd 100644
--- a/library/stdarch/coresimd/simd.rs
+++ b/library/stdarch/crates/core_arch/src/simd.rs
@@ -27,7 +27,7 @@ macro_rules! simd_ty {
             #[inline]
             pub(crate) fn extract(self, index: usize) -> $ety {
                 unsafe {
-                    ::coresimd::simd_llvm::simd_extract(self, index as u32)
+                    ::core_arch::simd_llvm::simd_extract(self, index as u32)
                 }
             }
         }
@@ -63,7 +63,7 @@ macro_rules! simd_m_ty {
             #[inline]
             pub(crate) fn extract(self, index: usize) -> bool {
                 let r: $ety = unsafe {
-                    ::coresimd::simd_llvm::simd_extract(self, index as u32)
+                    ::core_arch::simd_llvm::simd_extract(self, index as u32)
                 };
                 r != 0
             }
diff --git a/library/stdarch/coresimd/simd_llvm.rs b/library/stdarch/crates/core_arch/src/simd_llvm.rs
index bbc88d3f32d..bbc88d3f32d 100644
--- a/library/stdarch/coresimd/simd_llvm.rs
+++ b/library/stdarch/crates/core_arch/src/simd_llvm.rs
diff --git a/library/stdarch/coresimd/v64.rs b/library/stdarch/crates/core_arch/src/v64.rs
index 04ce0768b7e..724f1fb0c44 100644
--- a/library/stdarch/coresimd/v64.rs
+++ b/library/stdarch/crates/core_arch/src/v64.rs
@@ -2,7 +2,7 @@
 
 use prelude::v1::*;
 
-use coresimd::simd_llvm::*;
+use core_arch::simd_llvm::*;
 
 define_ty_doc! {
     f32x2, f32, f32 |
diff --git a/library/stdarch/coresimd/wasm32/atomic.rs b/library/stdarch/crates/core_arch/src/wasm32/atomic.rs
index 4ebbaa19bd2..4ebbaa19bd2 100644
--- a/library/stdarch/coresimd/wasm32/atomic.rs
+++ b/library/stdarch/crates/core_arch/src/wasm32/atomic.rs
diff --git a/library/stdarch/coresimd/wasm32/memory.rs b/library/stdarch/crates/core_arch/src/wasm32/memory.rs
index 20958071837..20958071837 100644
--- a/library/stdarch/coresimd/wasm32/memory.rs
+++ b/library/stdarch/crates/core_arch/src/wasm32/memory.rs
diff --git a/library/stdarch/coresimd/wasm32/mod.rs b/library/stdarch/crates/core_arch/src/wasm32/mod.rs
index 056dfc60996..056dfc60996 100644
--- a/library/stdarch/coresimd/wasm32/mod.rs
+++ b/library/stdarch/crates/core_arch/src/wasm32/mod.rs
diff --git a/library/stdarch/coresimd/wasm32/simd128.rs b/library/stdarch/crates/core_arch/src/wasm32/simd128.rs
index 9ae24aaa4fd..5723abab696 100644
--- a/library/stdarch/coresimd/wasm32/simd128.rs
+++ b/library/stdarch/crates/core_arch/src/wasm32/simd128.rs
@@ -5,8 +5,8 @@
 
 #![allow(non_camel_case_types)]
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
 use marker::Sized;
 use mem;
 use ptr;
diff --git a/library/stdarch/coresimd/x86/abm.rs b/library/stdarch/crates/core_arch/src/x86/abm.rs
index 51157ab7739..b763902211b 100644
--- a/library/stdarch/coresimd/x86/abm.rs
+++ b/library/stdarch/crates/core_arch/src/x86/abm.rs
@@ -48,7 +48,7 @@ pub unsafe fn _popcnt32(x: i32) -> i32 {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "lzcnt")]
     unsafe fn test_lzcnt_u32() {
diff --git a/library/stdarch/coresimd/x86/adx.rs b/library/stdarch/crates/core_arch/src/x86/adx.rs
index c59743980f2..c59743980f2 100644
--- a/library/stdarch/coresimd/x86/adx.rs
+++ b/library/stdarch/crates/core_arch/src/x86/adx.rs
diff --git a/library/stdarch/coresimd/x86/aes.rs b/library/stdarch/crates/core_arch/src/x86/aes.rs
index 6a6e30c3d1a..c90bb122d5a 100644
--- a/library/stdarch/coresimd/x86/aes.rs
+++ b/library/stdarch/crates/core_arch/src/x86/aes.rs
@@ -7,7 +7,7 @@
 //!
 //! [intel64_ref]: http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
 
-use coresimd::x86::__m128i;
+use core_arch::x86::__m128i;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -113,7 +113,7 @@ mod tests {
 
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "aes")]
     unsafe fn test_mm_aesdec_si128() {
diff --git a/library/stdarch/coresimd/x86/avx.rs b/library/stdarch/crates/core_arch/src/x86/avx.rs
index ed871abaea2..9a350f6eab7 100644
--- a/library/stdarch/coresimd/x86/avx.rs
+++ b/library/stdarch/crates/core_arch/src/x86/avx.rs
@@ -13,9 +13,9 @@
 //! [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf
 //! [wiki]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use intrinsics;
 use mem;
 use ptr;
@@ -3313,7 +3313,7 @@ mod tests {
     use stdsimd_test::simd_test;
     use test::black_box; // Used to inhibit constant-folding.
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "avx")]
     unsafe fn test_mm256_add_pd() {
diff --git a/library/stdarch/coresimd/x86/avx2.rs b/library/stdarch/crates/core_arch/src/x86/avx2.rs
index b0cff8e8753..bc4d0e12f54 100644
--- a/library/stdarch/coresimd/x86/avx2.rs
+++ b/library/stdarch/crates/core_arch/src/x86/avx2.rs
@@ -18,9 +18,9 @@
 //! [wiki_avx]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
 //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -2636,7 +2636,7 @@ pub unsafe fn _mm256_shuffle_epi8(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3388,7 +3388,7 @@ pub unsafe fn _mm256_subs_epu8(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3448,7 +3448,7 @@ pub unsafe fn _mm256_unpackhi_epi8(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3507,7 +3507,7 @@ pub unsafe fn _mm256_unpacklo_epi8(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3560,7 +3560,7 @@ pub unsafe fn _mm256_unpackhi_epi16(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3614,7 +3614,7 @@ pub unsafe fn _mm256_unpacklo_epi16(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3657,7 +3657,7 @@ pub unsafe fn _mm256_unpackhi_epi32(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3700,7 +3700,7 @@ pub unsafe fn _mm256_unpacklo_epi32(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -3743,7 +3743,7 @@ pub unsafe fn _mm256_unpackhi_epi64(a: __m256i, b: __m256i) -> __m256i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -4113,7 +4113,7 @@ mod tests {
     use std;
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "avx2")]
     unsafe fn test_mm256_abs_epi32() {
diff --git a/library/stdarch/coresimd/x86/avx512f.rs b/library/stdarch/crates/core_arch/src/x86/avx512f.rs
index c240a67af3c..94efadac748 100644
--- a/library/stdarch/coresimd/x86/avx512f.rs
+++ b/library/stdarch/crates/core_arch/src/x86/avx512f.rs
@@ -1,6 +1,6 @@
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use mem::{self, MaybeUninit};
 
 #[cfg(test)]
@@ -92,7 +92,7 @@ mod tests {
     use std;
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "avx512f")]
     unsafe fn test_mm512_abs_epi32() {
diff --git a/library/stdarch/coresimd/x86/bmi1.rs b/library/stdarch/crates/core_arch/src/x86/bmi1.rs
index a84763b7e89..ece4d76dc3d 100644
--- a/library/stdarch/coresimd/x86/bmi1.rs
+++ b/library/stdarch/crates/core_arch/src/x86/bmi1.rs
@@ -120,7 +120,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "bmi1")]
     unsafe fn test_bextr_u32() {
diff --git a/library/stdarch/coresimd/x86/bmi2.rs b/library/stdarch/crates/core_arch/src/x86/bmi2.rs
index e808fe07923..ab8cab3138b 100644
--- a/library/stdarch/coresimd/x86/bmi2.rs
+++ b/library/stdarch/crates/core_arch/src/x86/bmi2.rs
@@ -79,7 +79,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "bmi2")]
     unsafe fn test_pext_u32() {
diff --git a/library/stdarch/coresimd/x86/bswap.rs b/library/stdarch/crates/core_arch/src/x86/bswap.rs
index ee6d6615b14..ee6d6615b14 100644
--- a/library/stdarch/coresimd/x86/bswap.rs
+++ b/library/stdarch/crates/core_arch/src/x86/bswap.rs
diff --git a/library/stdarch/coresimd/x86/cpuid.rs b/library/stdarch/crates/core_arch/src/x86/cpuid.rs
index f22e4515668..adf3e127d64 100644
--- a/library/stdarch/coresimd/x86/cpuid.rs
+++ b/library/stdarch/crates/core_arch/src/x86/cpuid.rs
@@ -171,7 +171,7 @@ pub unsafe fn __get_cpuid_max(leaf: u32) -> (u32, u32) {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[test]
     fn test_always_has_cpuid() {
diff --git a/library/stdarch/coresimd/x86/eflags.rs b/library/stdarch/crates/core_arch/src/x86/eflags.rs
index 264b9b2363e..68c0b6ee840 100644
--- a/library/stdarch/coresimd/x86/eflags.rs
+++ b/library/stdarch/crates/core_arch/src/x86/eflags.rs
@@ -66,7 +66,7 @@ pub unsafe fn __writeeflags(eflags: u64) {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[test]
     #[allow(deprecated)]
diff --git a/library/stdarch/coresimd/x86/fma.rs b/library/stdarch/crates/core_arch/src/x86/fma.rs
index a5f2c09ed77..4915c44f574 100644
--- a/library/stdarch/coresimd/x86/fma.rs
+++ b/library/stdarch/crates/core_arch/src/x86/fma.rs
@@ -18,7 +18,7 @@
 //! [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf
 //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate
 
-use coresimd::x86::*;
+use core_arch::x86::*;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -510,7 +510,7 @@ mod tests {
     use std;
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "fma")]
     unsafe fn test_mm_fmadd_pd() {
diff --git a/library/stdarch/coresimd/x86/fxsr.rs b/library/stdarch/crates/core_arch/src/x86/fxsr.rs
index 91261c721ca..df511972dbd 100644
--- a/library/stdarch/coresimd/x86/fxsr.rs
+++ b/library/stdarch/crates/core_arch/src/x86/fxsr.rs
@@ -57,7 +57,7 @@ pub unsafe fn _fxrstor(mem_addr: *const u8) {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use std::{cmp::PartialEq, fmt};
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/x86/macros.rs b/library/stdarch/crates/core_arch/src/x86/macros.rs
index b8c283f1f47..b8c283f1f47 100644
--- a/library/stdarch/coresimd/x86/macros.rs
+++ b/library/stdarch/crates/core_arch/src/x86/macros.rs
diff --git a/library/stdarch/coresimd/x86/mmx.rs b/library/stdarch/crates/core_arch/src/x86/mmx.rs
index eaaecfa0380..82f085cf95f 100644
--- a/library/stdarch/coresimd/x86/mmx.rs
+++ b/library/stdarch/crates/core_arch/src/x86/mmx.rs
@@ -8,8 +8,8 @@
 //!
 //! [intel64_ref]: http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
 
-use coresimd::simd::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -530,7 +530,7 @@ extern "C" {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
 
     #[simd_test(enable = "mmx")]
diff --git a/library/stdarch/coresimd/x86/mod.rs b/library/stdarch/crates/core_arch/src/x86/mod.rs
index e490c9442d6..ee7c5219fe8 100644
--- a/library/stdarch/coresimd/x86/mod.rs
+++ b/library/stdarch/crates/core_arch/src/x86/mod.rs
@@ -38,8 +38,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -88,8 +89,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -132,8 +134,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -176,8 +179,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -224,8 +228,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -268,8 +273,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -312,8 +318,9 @@ types! {
     /// # #[cfg(not(dox))]
     /// # extern crate std as real_std;
     /// # #[cfg(not(dox))]
-    /// # #[macro_use]
-    /// # extern crate stdsimd as std;
+    /// # extern crate core_arch as std;
+    /// # #[macro_use(is_x86_feature_detected)]
+    /// # extern crate std_detect;
     /// #[cfg(target_arch = "x86")]
     /// use std::arch::x86::*;
     /// #[cfg(target_arch = "x86_64")]
@@ -406,42 +413,42 @@ pub(crate) trait m128iExt: Sized {
     fn as_m128i(self) -> __m128i;
 
     #[inline]
-    fn as_u8x16(self) -> ::coresimd::simd::u8x16 {
+    fn as_u8x16(self) -> ::core_arch::simd::u8x16 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_u16x8(self) -> ::coresimd::simd::u16x8 {
+    fn as_u16x8(self) -> ::core_arch::simd::u16x8 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_u32x4(self) -> ::coresimd::simd::u32x4 {
+    fn as_u32x4(self) -> ::core_arch::simd::u32x4 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_u64x2(self) -> ::coresimd::simd::u64x2 {
+    fn as_u64x2(self) -> ::core_arch::simd::u64x2 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_i8x16(self) -> ::coresimd::simd::i8x16 {
+    fn as_i8x16(self) -> ::core_arch::simd::i8x16 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_i16x8(self) -> ::coresimd::simd::i16x8 {
+    fn as_i16x8(self) -> ::core_arch::simd::i16x8 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_i32x4(self) -> ::coresimd::simd::i32x4 {
+    fn as_i32x4(self) -> ::core_arch::simd::i32x4 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 
     #[inline]
-    fn as_i64x2(self) -> ::coresimd::simd::i64x2 {
+    fn as_i64x2(self) -> ::core_arch::simd::i64x2 {
         unsafe { mem::transmute(self.as_m128i()) }
     }
 }
@@ -459,42 +466,42 @@ pub(crate) trait m256iExt: Sized {
     fn as_m256i(self) -> __m256i;
 
     #[inline]
-    fn as_u8x32(self) -> ::coresimd::simd::u8x32 {
+    fn as_u8x32(self) -> ::core_arch::simd::u8x32 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_u16x16(self) -> ::coresimd::simd::u16x16 {
+    fn as_u16x16(self) -> ::core_arch::simd::u16x16 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_u32x8(self) -> ::coresimd::simd::u32x8 {
+    fn as_u32x8(self) -> ::core_arch::simd::u32x8 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_u64x4(self) -> ::coresimd::simd::u64x4 {
+    fn as_u64x4(self) -> ::core_arch::simd::u64x4 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_i8x32(self) -> ::coresimd::simd::i8x32 {
+    fn as_i8x32(self) -> ::core_arch::simd::i8x32 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_i16x16(self) -> ::coresimd::simd::i16x16 {
+    fn as_i16x16(self) -> ::core_arch::simd::i16x16 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_i32x8(self) -> ::coresimd::simd::i32x8 {
+    fn as_i32x8(self) -> ::core_arch::simd::i32x8 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 
     #[inline]
-    fn as_i64x4(self) -> ::coresimd::simd::i64x4 {
+    fn as_i64x4(self) -> ::core_arch::simd::i64x4 {
         unsafe { mem::transmute(self.as_m256i()) }
     }
 }
@@ -512,7 +519,7 @@ pub(crate) trait m512iExt: Sized {
     fn as_m512i(self) -> __m512i;
 
     #[inline]
-    fn as_i32x16(self) -> ::coresimd::simd::i32x16 {
+    fn as_i32x16(self) -> ::core_arch::simd::i32x16 {
         unsafe { mem::transmute(self.as_m512i()) }
     }
 }
diff --git a/library/stdarch/coresimd/x86/pclmulqdq.rs b/library/stdarch/crates/core_arch/src/x86/pclmulqdq.rs
index c8cd9f37696..c047b3b1cd6 100644
--- a/library/stdarch/coresimd/x86/pclmulqdq.rs
+++ b/library/stdarch/crates/core_arch/src/x86/pclmulqdq.rs
@@ -5,7 +5,7 @@
 //!
 //! [intel64_ref]: http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
 
-use coresimd::x86::__m128i;
+use core_arch::x86::__m128i;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -50,7 +50,7 @@ mod tests {
 
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "pclmulqdq")]
     unsafe fn test_mm_clmulepi64_si128() {
diff --git a/library/stdarch/coresimd/x86/rdrand.rs b/library/stdarch/crates/core_arch/src/x86/rdrand.rs
index 63573f689d6..63573f689d6 100644
--- a/library/stdarch/coresimd/x86/rdrand.rs
+++ b/library/stdarch/crates/core_arch/src/x86/rdrand.rs
diff --git a/library/stdarch/coresimd/x86/rdtsc.rs b/library/stdarch/crates/core_arch/src/x86/rdtsc.rs
index 630a72bafb0..5ed5d496111 100644
--- a/library/stdarch/coresimd/x86/rdtsc.rs
+++ b/library/stdarch/crates/core_arch/src/x86/rdtsc.rs
@@ -59,7 +59,7 @@ extern "C" {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
 
     #[simd_test(enable = "sse2")]
diff --git a/library/stdarch/coresimd/x86/sha.rs b/library/stdarch/crates/core_arch/src/x86/sha.rs
index c748b0d1ffd..98bf4707f8c 100644
--- a/library/stdarch/coresimd/x86/sha.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sha.rs
@@ -1,5 +1,5 @@
-use coresimd::simd::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::x86::*;
 use mem;
 
 #[allow(improper_ctypes)]
@@ -134,8 +134,8 @@ mod tests {
     use std::i32;
     use std::mem::{self, transmute};
 
-    use coresimd::simd::*;
-    use coresimd::x86::*;
+    use core_arch::simd::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
     use test::black_box; // Used to inhibit constant-folding.
 
diff --git a/library/stdarch/coresimd/x86/sse.rs b/library/stdarch/crates/core_arch/src/x86/sse.rs
index ec69eff3f72..8d1c237f539 100644
--- a/library/stdarch/coresimd/x86/sse.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse.rs
@@ -1,8 +1,8 @@
 //! Streaming SIMD Extensions (SSE)
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use intrinsics;
 use mem;
 use ptr;
@@ -1109,39 +1109,6 @@ pub unsafe fn _mm_movemask_ps(a: __m128) -> i32 {
 /// Set the upper two single-precision floating-point values with 64 bits of
 /// data loaded from the address `p`; the lower two values are passed through
 /// from `a`.
-///
-/// This corresponds to the `MOVHPS` / `MOVHPD` / `VMOVHPD` instructions.
-///
-/// ```rust
-/// # #![feature(stdsimd)]
-/// # #![cfg_attr(not(dox), no_std)]
-/// # #[cfg(not(dox))]
-/// # extern crate std as real_std;
-/// # #[cfg(not(dox))]
-/// # #[macro_use]
-/// # extern crate stdsimd as std;
-/// #[cfg(target_arch = "x86")]
-/// use std::arch::x86::*;
-/// #[cfg(target_arch = "x86_64")]
-/// use std::arch::x86_64::*;
-///
-/// #
-/// # // The real main function
-/// # fn main() {
-/// #     if is_x86_feature_detected!("sse") {
-/// #         #[target_feature(enable = "sse")]
-/// #         unsafe fn worker() {
-/// #
-/// let a = _mm_setr_ps(1.0, 2.0, 3.0, 4.0);
-/// let data: [f32; 4] = [5.0, 6.0, 7.0, 8.0];
-/// let r = _mm_loadh_pi(a, data[..].as_ptr() as *const _);
-/// // assert_eq!(r, _mm_setr_ps(1.0, 2.0, 5.0, 6.0));
-/// #
-/// #         }
-/// #         unsafe { worker(); }
-/// #     }
-/// # }
-/// ```
 #[inline]
 #[target_feature(enable = "sse")]
 #[cfg_attr(
@@ -1170,38 +1137,6 @@ pub unsafe fn _mm_loadh_pi(a: __m128, p: *const __m64) -> __m128 {
 
 /// Load two floats from `p` into the lower half of a `__m128`. The upper half
 /// is copied from the upper half of `a`.
-///
-/// This corresponds to the `MOVLPS` / `MOVLDP` / `VMOVLDP` instructions.
-///
-/// ```rust
-/// # #![feature(stdsimd)]
-/// # #![cfg_attr(not(dox), no_std)]
-/// # #[cfg(not(dox))]
-/// # extern crate std as real_std;
-/// # #[cfg(not(dox))]
-/// # #[macro_use]
-/// # extern crate stdsimd as std;
-/// #[cfg(target_arch = "x86")]
-/// use std::arch::x86::*;
-/// #[cfg(target_arch = "x86_64")]
-/// use std::arch::x86_64::*;
-///
-/// # // The real main function
-/// # fn main() {
-/// #     if is_x86_feature_detected!("sse") {
-/// #         #[target_feature(enable = "sse")]
-/// #         unsafe fn worker() {
-/// #
-/// let a = _mm_setr_ps(1.0, 2.0, 3.0, 4.0);
-/// let data: [f32; 4] = [5.0, 6.0, 7.0, 8.0];
-/// let r = _mm_loadh_pi(a, data[..].as_ptr() as *const _);
-/// // assert_eq!(r, _mm_setr_ps(5.0, 6.0, 3.0, 4.0));
-/// #
-/// #         }
-/// #         unsafe { worker(); }
-/// #     }
-/// # }
-/// ```
 #[inline]
 #[target_feature(enable = "sse")]
 #[cfg_attr(all(test, target_arch = "x86_64"), assert_instr(movlpd))]
@@ -2569,8 +2504,8 @@ mod tests {
     use stdsimd_test::simd_test;
     use test::black_box; // Used to inhibit constant-folding.
 
-    use coresimd::simd::*;
-    use coresimd::x86::*;
+    use core_arch::simd::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "sse")]
     unsafe fn test_mm_add_ps() {
diff --git a/library/stdarch/coresimd/x86/sse2.rs b/library/stdarch/crates/core_arch/src/x86/sse2.rs
index 31aff1eb487..a21743ec4ae 100644
--- a/library/stdarch/coresimd/x86/sse2.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse2.rs
@@ -3,9 +3,9 @@
 #[cfg(test)]
 use stdsimd_test::assert_instr;
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use intrinsics;
 use mem;
 use ptr;
@@ -3187,8 +3187,8 @@ mod tests {
     use std::i32;
     use std::mem::{self, transmute};
 
-    use coresimd::simd::*;
-    use coresimd::x86::*;
+    use core_arch::simd::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
     use test::black_box; // Used to inhibit constant-folding.
 
diff --git a/library/stdarch/coresimd/x86/sse3.rs b/library/stdarch/crates/core_arch/src/x86/sse3.rs
index 5ef3077747e..394909763da 100644
--- a/library/stdarch/coresimd/x86/sse3.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse3.rs
@@ -1,8 +1,8 @@
 //! Streaming SIMD Extensions 3 (SSE3)
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::{simd_shuffle2, simd_shuffle4};
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::{simd_shuffle2, simd_shuffle4};
+use core_arch::x86::*;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -162,7 +162,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "sse3")]
     unsafe fn test_mm_addsub_ps() {
diff --git a/library/stdarch/coresimd/x86/sse41.rs b/library/stdarch/crates/core_arch/src/x86/sse41.rs
index 20606aead12..e7d7ea837ab 100644
--- a/library/stdarch/coresimd/x86/sse41.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse41.rs
@@ -1,8 +1,8 @@
 //! Streaming SIMD Extensions 4.1 (SSE4.1)
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -714,7 +714,7 @@ pub unsafe fn _mm_ceil_ss(a: __m128, b: __m128) -> __m128 {
 /// # #[cfg(not(dox))]
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 ///
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
@@ -767,7 +767,7 @@ pub unsafe fn _mm_round_pd(a: __m128d, rounding: i32) -> __m128d {
 /// # #[cfg(not(dox))]
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 ///
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
@@ -821,7 +821,7 @@ pub unsafe fn _mm_round_ps(a: __m128, rounding: i32) -> __m128 {
 /// # #[cfg(not(dox))]
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 ///
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
@@ -875,7 +875,7 @@ pub unsafe fn _mm_round_sd(a: __m128d, b: __m128d, rounding: i32) -> __m128d {
 /// # #[cfg(not(dox))]
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 ///
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
@@ -1221,7 +1221,7 @@ extern "C" {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use std::mem;
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/x86/sse42.rs b/library/stdarch/crates/core_arch/src/x86/sse42.rs
index be877d8ddfc..c32568fefcc 100644
--- a/library/stdarch/coresimd/x86/sse42.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse42.rs
@@ -5,9 +5,9 @@
 #[cfg(test)]
 use stdsimd_test::assert_instr;
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 
 /// String contains unsigned 8-bit characters *(Default)*
 #[stable(feature = "simd_x86", since = "1.27.0")]
@@ -125,7 +125,7 @@ pub unsafe fn _mm_cmpistrm(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// # #[cfg(not(dox))]
 /// # use real_std::prelude::v1::*;
 /// #[cfg(target_arch = "x86")]
@@ -172,7 +172,7 @@ pub unsafe fn _mm_cmpistrm(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -216,7 +216,7 @@ pub unsafe fn _mm_cmpistrm(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -260,7 +260,7 @@ pub unsafe fn _mm_cmpistrm(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -489,7 +489,7 @@ pub unsafe fn _mm_cmpestrm(a: __m128i, la: i32, b: __m128i, lb: i32, imm8: i32)
 /// # extern crate std as real_std;
 /// # #[cfg(not(dox))]
 /// # #[macro_use]
-/// # extern crate stdsimd as std;
+/// # extern crate std_detect as std;
 /// #[cfg(target_arch = "x86")]
 /// use std::arch::x86::*;
 /// #[cfg(target_arch = "x86_64")]
@@ -750,7 +750,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use std::ptr;
 
     // Currently one cannot `load` a &[u8] that is is less than 16
diff --git a/library/stdarch/coresimd/x86/sse4a.rs b/library/stdarch/crates/core_arch/src/x86/sse4a.rs
index 2c184166fbf..ac172f9b040 100644
--- a/library/stdarch/coresimd/x86/sse4a.rs
+++ b/library/stdarch/crates/core_arch/src/x86/sse4a.rs
@@ -1,7 +1,7 @@
 //! `i686`'s Streaming SIMD Extensions 4a (`SSE4a`)
 
-use coresimd::simd::*;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -78,7 +78,7 @@ pub unsafe fn _mm_stream_ss(p: *mut f32, a: __m128) {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
 
     #[simd_test(enable = "sse4a")]
diff --git a/library/stdarch/coresimd/x86/ssse3.rs b/library/stdarch/crates/core_arch/src/x86/ssse3.rs
index 0d14bb1f2fb..a013ab6551a 100644
--- a/library/stdarch/coresimd/x86/ssse3.rs
+++ b/library/stdarch/crates/core_arch/src/x86/ssse3.rs
@@ -1,8 +1,8 @@
 //! Supplemental Streaming SIMD Extensions 3 (SSSE3)
 
-use coresimd::simd::*;
-use coresimd::simd_llvm::simd_shuffle16;
-use coresimd::x86::*;
+use core_arch::simd::*;
+use core_arch::simd_llvm::simd_shuffle16;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -562,7 +562,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "ssse3")]
     unsafe fn test_mm_abs_epi8() {
diff --git a/library/stdarch/coresimd/x86/tbm.rs b/library/stdarch/crates/core_arch/src/x86/tbm.rs
index 974e30dd576..314c5e36c7f 100644
--- a/library/stdarch/coresimd/x86/tbm.rs
+++ b/library/stdarch/crates/core_arch/src/x86/tbm.rs
@@ -281,7 +281,7 @@ pub unsafe fn _tzmsk_u64(x: u64) -> u64 {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     /*
     #[simd_test(enable = "tbm")]
diff --git a/library/stdarch/coresimd/x86/test.rs b/library/stdarch/crates/core_arch/src/x86/test.rs
index 40a49402f88..9dbe8c11ef6 100644
--- a/library/stdarch/coresimd/x86/test.rs
+++ b/library/stdarch/crates/core_arch/src/x86/test.rs
@@ -1,6 +1,6 @@
 //! Utilities used in testing the x86 intrinsics
 
-use coresimd::x86::*;
+use core_arch::x86::*;
 
 #[target_feature(enable = "mmx")]
 pub unsafe fn assert_eq_m64(a: __m64, b: __m64) {
@@ -107,7 +107,7 @@ pub unsafe fn get_m256(a: __m256, idx: usize) -> f32 {
 // which doesn't exist on x86!
 #[cfg(target_arch = "x86")]
 mod x86_polyfill {
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     pub unsafe fn _mm_insert_epi64(a: __m128i, val: i64, idx: i32) -> __m128i {
         union A {
@@ -132,7 +132,7 @@ mod x86_polyfill {
 }
 #[cfg(target_arch = "x86_64")]
 mod x86_polyfill {
-    pub use coresimd::x86_64::{_mm256_insert_epi64, _mm_insert_epi64};
+    pub use core_arch::x86_64::{_mm256_insert_epi64, _mm_insert_epi64};
 }
 pub use self::x86_polyfill::*;
 
diff --git a/library/stdarch/coresimd/x86/xsave.rs b/library/stdarch/crates/core_arch/src/x86/xsave.rs
index 9c5d6dcd874..c52dcd8c2a0 100644
--- a/library/stdarch/coresimd/x86/xsave.rs
+++ b/library/stdarch/crates/core_arch/src/x86/xsave.rs
@@ -166,7 +166,7 @@ mod tests {
     use std::fmt;
     use std::prelude::v1::*;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
     use stdsimd_test::simd_test;
 
     #[repr(align(64))]
diff --git a/library/stdarch/coresimd/x86_64/abm.rs b/library/stdarch/crates/core_arch/src/x86_64/abm.rs
index 1f08a362fb5..7a655dbe90f 100644
--- a/library/stdarch/coresimd/x86_64/abm.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/abm.rs
@@ -48,7 +48,7 @@ pub unsafe fn _popcnt64(x: i64) -> i32 {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
 
     #[simd_test(enable = "lzcnt")]
     unsafe fn test_lzcnt_u64() {
diff --git a/library/stdarch/coresimd/x86_64/adx.rs b/library/stdarch/crates/core_arch/src/x86_64/adx.rs
index 0343351b916..0343351b916 100644
--- a/library/stdarch/coresimd/x86_64/adx.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/adx.rs
diff --git a/library/stdarch/coresimd/x86_64/avx.rs b/library/stdarch/crates/core_arch/src/x86_64/avx.rs
index b176483fdd5..429ee75c59a 100644
--- a/library/stdarch/coresimd/x86_64/avx.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/avx.rs
@@ -13,8 +13,8 @@
 //! [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf
 //! [wiki]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
 
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use mem;
 
 /// Copy `a` to result, and insert the 64-bit integer `i` into result
@@ -34,7 +34,7 @@ pub unsafe fn _mm256_insert_epi64(a: __m256i, i: i64, index: i32) -> __m256i {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
+    use core_arch::x86::*;
 
     #[simd_test(enable = "avx")]
     unsafe fn test_mm256_insert_epi64() {
diff --git a/library/stdarch/coresimd/x86_64/avx2.rs b/library/stdarch/crates/core_arch/src/x86_64/avx2.rs
index 8e85010ac47..a27f3125751 100644
--- a/library/stdarch/coresimd/x86_64/avx2.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/avx2.rs
@@ -18,8 +18,8 @@
 //! [wiki_avx]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
 //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate
 
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 
 /// Extract a 64-bit integer from `a`, selected with `imm8`.
 ///
@@ -38,7 +38,7 @@ pub unsafe fn _mm256_extract_epi64(a: __m256i, imm8: i32) -> i64 {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
 
     #[simd_test(enable = "avx2")]
     unsafe fn test_mm256_extract_epi64() {
diff --git a/library/stdarch/coresimd/x86_64/bmi.rs b/library/stdarch/crates/core_arch/src/x86_64/bmi.rs
index 831f5247141..be3ced9e251 100644
--- a/library/stdarch/coresimd/x86_64/bmi.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/bmi.rs
@@ -125,8 +125,8 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86::*;
-    use coresimd::x86_64::*;
+    use core_arch::x86::*;
+    use core_arch::x86_64::*;
 
     #[simd_test(enable = "bmi1")]
     unsafe fn test_bextr_u64() {
diff --git a/library/stdarch/coresimd/x86_64/bmi2.rs b/library/stdarch/crates/core_arch/src/x86_64/bmi2.rs
index 0ec8f8e3200..98d804ead2c 100644
--- a/library/stdarch/coresimd/x86_64/bmi2.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/bmi2.rs
@@ -81,7 +81,7 @@ extern "C" {
 mod tests {
     use stdsimd_test::simd_test;
 
-    use coresimd::x86_64::*;
+    use core_arch::x86_64::*;
 
     #[simd_test(enable = "bmi2")]
     unsafe fn test_pext_u64() {
diff --git a/library/stdarch/coresimd/x86_64/bswap.rs b/library/stdarch/crates/core_arch/src/x86_64/bswap.rs
index 75bb33c956c..75bb33c956c 100644
--- a/library/stdarch/coresimd/x86_64/bswap.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/bswap.rs
diff --git a/library/stdarch/coresimd/x86_64/cmpxchg16b.rs b/library/stdarch/crates/core_arch/src/x86_64/cmpxchg16b.rs
index 0fc2f263cc8..c7b43a4469b 100644
--- a/library/stdarch/coresimd/x86_64/cmpxchg16b.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/cmpxchg16b.rs
@@ -69,7 +69,7 @@ pub unsafe fn cmpxchg16b(
         // The above block is all copied from libcore, and this statement is
         // also copied from libcore except that it's a panic in libcore and we
         // have a little bit more of a lightweight panic here.
-        _ => ::coresimd::x86::ud2(),
+        _ => ::core_arch::x86::ud2(),
     };
     val
 }
diff --git a/library/stdarch/coresimd/x86_64/fxsr.rs b/library/stdarch/crates/core_arch/src/x86_64/fxsr.rs
index 846162e219a..dde2f5d8296 100644
--- a/library/stdarch/coresimd/x86_64/fxsr.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/fxsr.rs
@@ -57,7 +57,7 @@ pub unsafe fn _fxrstor64(mem_addr: *const u8) {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::x86_64::*;
+    use core_arch::x86_64::*;
     use std::{cmp::PartialEq, fmt};
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/x86_64/mod.rs b/library/stdarch/crates/core_arch/src/x86_64/mod.rs
index ca16e4f17be..ca16e4f17be 100644
--- a/library/stdarch/coresimd/x86_64/mod.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/mod.rs
diff --git a/library/stdarch/coresimd/x86_64/rdrand.rs b/library/stdarch/crates/core_arch/src/x86_64/rdrand.rs
index 7cc0d710c81..7cc0d710c81 100644
--- a/library/stdarch/coresimd/x86_64/rdrand.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/rdrand.rs
diff --git a/library/stdarch/coresimd/x86_64/sse.rs b/library/stdarch/crates/core_arch/src/x86_64/sse.rs
index dbbdb0671f0..a3126e72e94 100644
--- a/library/stdarch/coresimd/x86_64/sse.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/sse.rs
@@ -1,6 +1,6 @@
 //! `x86_64` Streaming SIMD Extensions (SSE)
 
-use coresimd::x86::*;
+use core_arch::x86::*;
 
 #[cfg(test)]
 use stdsimd_test::assert_instr;
@@ -75,7 +75,7 @@ mod tests {
 
     use stdsimd_test::simd_test;
 
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
 
     #[simd_test(enable = "sse")]
     unsafe fn test_mm_cvtss_si64() {
diff --git a/library/stdarch/coresimd/x86_64/sse2.rs b/library/stdarch/crates/core_arch/src/x86_64/sse2.rs
index f336f90fafb..779be0a5930 100644
--- a/library/stdarch/coresimd/x86_64/sse2.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/sse2.rs
@@ -1,7 +1,7 @@
 //! `x86_64`'s Streaming SIMD Extensions 2 (SSE2)
 
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use intrinsics;
 
 #[cfg(test)]
@@ -150,7 +150,7 @@ mod tests {
 
     use stdsimd_test::simd_test;
 
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
 
     #[simd_test(enable = "sse2")]
     unsafe fn test_mm_cvtsd_si64() {
diff --git a/library/stdarch/coresimd/x86_64/sse41.rs b/library/stdarch/crates/core_arch/src/x86_64/sse41.rs
index 2d0cd591e49..9a22370019c 100644
--- a/library/stdarch/coresimd/x86_64/sse41.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/sse41.rs
@@ -1,7 +1,7 @@
 //! `i686`'s Streaming SIMD Extensions 4.1 (SSE4.1)
 
-use coresimd::simd_llvm::*;
-use coresimd::x86::*;
+use core_arch::simd_llvm::*;
+use core_arch::x86::*;
 use mem;
 
 #[cfg(test)]
@@ -35,7 +35,7 @@ pub unsafe fn _mm_insert_epi64(a: __m128i, i: i64, imm8: i32) -> __m128i {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
     use stdsimd_test::simd_test;
 
     #[simd_test(enable = "sse4.1")]
diff --git a/library/stdarch/coresimd/x86_64/sse42.rs b/library/stdarch/crates/core_arch/src/x86_64/sse42.rs
index d981c176ea7..3f1b6140625 100644
--- a/library/stdarch/coresimd/x86_64/sse42.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/sse42.rs
@@ -23,7 +23,7 @@ pub unsafe fn _mm_crc32_u64(crc: u64, v: u64) -> u64 {
 
 #[cfg(test)]
 mod tests {
-    use coresimd::arch::x86_64::*;
+    use core_arch::arch::x86_64::*;
 
     use stdsimd_test::simd_test;
 
diff --git a/library/stdarch/coresimd/x86_64/xsave.rs b/library/stdarch/crates/core_arch/src/x86_64/xsave.rs
index 1684c62cd3b..875b677dbd2 100644
--- a/library/stdarch/coresimd/x86_64/xsave.rs
+++ b/library/stdarch/crates/core_arch/src/x86_64/xsave.rs
@@ -129,7 +129,7 @@ pub unsafe fn _xrstors64(mem_addr: *const u8, rs_mask: u64) {
 /*
 #[cfg(test)]
 mod tests {
-    use coresimd::x86::x86_64::xsave;
+    use core_arch::x86::x86_64::xsave;
     use stdsimd_test::simd_test;
     use std::fmt;
 
diff --git a/library/stdarch/crates/coresimd/tests/cpu-detection.rs b/library/stdarch/crates/core_arch/tests/cpu-detection.rs
index ccbb9eef1c4..454176b18c4 100644
--- a/library/stdarch/crates/coresimd/tests/cpu-detection.rs
+++ b/library/stdarch/crates/core_arch/tests/cpu-detection.rs
@@ -7,7 +7,7 @@
 
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 #[macro_use]
-extern crate stdsimd;
+extern crate std_detect;
 
 #[test]
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
diff --git a/library/stdarch/crates/stdsimd/Cargo.toml b/library/stdarch/crates/std_detect/Cargo.toml
index aacfe97a3d1..61dd7790ed2 100644
--- a/library/stdarch/crates/stdsimd/Cargo.toml
+++ b/library/stdarch/crates/std_detect/Cargo.toml
@@ -1,5 +1,5 @@
 [package]
-name = "stdsimd"
+name = "std_detect"
 version = "0.1.3"
 authors = [
     "Alex Crichton <alex@alexcrichton.com>",
@@ -11,7 +11,7 @@ documentation = "https://docs.rs/stdsimd"
 homepage = "https://github.com/rust-lang-nursery/stdsimd"
 repository = "https://github.com/rust-lang-nursery/stdsimd"
 readme = "README.md"
-keywords = ["std", "simd", "intrinsics"]
+keywords = ["std", "run-time", "feature", "detection"]
 categories = ["hardware-support"]
 license = "MIT/Apache-2.0"
 
@@ -23,27 +23,10 @@ is-it-maintained-open-issues = { repository = "rust-lang-nursery/stdsimd" }
 maintenance = { status = "experimental" }
 
 [dependencies]
-coresimd = { version = "0.1.3", path = "../coresimd" }
 libc = "0.2"
 cfg-if = "0.1"
 
 [dev-dependencies]
+core_arch = { version = "0.1.3", path = "../core_arch" }
 auxv = "0.3.3"
-quickcheck = "0.8"
-rand = "0.6"
-cupid = "0.6.0"
-
-[target.'cfg(target_arch = "wasm32")'.dependencies]
-rand = { version = "0.6", features = ["wasm-bindgen"] }
-
-[[example]]
-name = "hex"
-path = "../../examples/hex.rs"
-
-[[example]]
-name = "wasm"
-crate-type = ["cdylib"]
-path = "../../examples/wasm.rs"
-
-[features]
-default = []
+cupid = "0.6.0"
\ No newline at end of file
diff --git a/library/stdarch/stdsimd/arch/detect/arch/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/arch/aarch64.rs
index 3fb306aea1f..882c22cc174 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/aarch64.rs
@@ -8,51 +8,51 @@ macro_rules! is_aarch64_feature_detected {
     ("neon") => {
         // FIXME: this should be removed once we rename Aarch64 neon to asimd
         cfg!(target_feature = "neon") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::asimd)
+            $crate::detect::check_for($crate::detect::Feature::asimd)
     };
     ("asimd") => {
         cfg!(target_feature = "neon") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::asimd)
+            $crate::detect::check_for($crate::detect::Feature::asimd)
     };
     ("pmull") => {
         cfg!(target_feature = "pmull") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::pmull)
+            $crate::detect::check_for($crate::detect::Feature::pmull)
     };
     ("fp") => {
         cfg!(target_feature = "fp") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::fp)
+            $crate::detect::check_for($crate::detect::Feature::fp)
     };
     ("fp16") => {
         cfg!(target_feature = "fp16") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::fp16)
+            $crate::detect::check_for($crate::detect::Feature::fp16)
     };
     ("sve") => {
         cfg!(target_feature = "sve") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::sve)
+            $crate::detect::check_for($crate::detect::Feature::sve)
     };
     ("crc") => {
         cfg!(target_feature = "crc") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::crc)
+            $crate::detect::check_for($crate::detect::Feature::crc)
     };
     ("crypto") => {
         cfg!(target_feature = "crypto") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::crypto)
+            $crate::detect::check_for($crate::detect::Feature::crypto)
     };
     ("lse") => {
         cfg!(target_feature = "lse") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::lse)
+            $crate::detect::check_for($crate::detect::Feature::lse)
     };
     ("rdm") => {
         cfg!(target_feature = "rdm") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::rdm)
+            $crate::detect::check_for($crate::detect::Feature::rdm)
     };
     ("rcpc") => {
         cfg!(target_feature = "rcpc") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::rcpc)
+            $crate::detect::check_for($crate::detect::Feature::rcpc)
     };
     ("dotprod") => {
         cfg!(target_feature = "dotprod") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::dotprod)
+            $crate::detect::check_for($crate::detect::Feature::dotprod)
     };
     ("ras") => {
         compile_error!("\"ras\" feature cannot be detected at run-time")
diff --git a/library/stdarch/stdsimd/arch/detect/arch/arm.rs b/library/stdarch/crates/std_detect/src/detect/arch/arm.rs
index c6a36d3e8e9..cb6ac6badcc 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/arm.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/arm.rs
@@ -7,11 +7,11 @@
 macro_rules! is_arm_feature_detected {
     ("neon") => {
         cfg!(target_feature = "neon") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::neon)
+            $crate::detect::check_for($crate::detect::Feature::neon)
     };
     ("pmull") => {
         cfg!(target_feature = "pmull") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::pmull)
+            $crate::detect::check_for($crate::detect::Feature::pmull)
     };
     ("v7") => { compile_error!("\"v7\" feature cannot be detected at run-time") };
     ("vfp2") => { compile_error!("\"vfp2\" feature cannot be detected at run-time") };
diff --git a/library/stdarch/stdsimd/arch/detect/arch/mips.rs b/library/stdarch/crates/std_detect/src/detect/arch/mips.rs
index f049a1ae6a9..876f8dde262 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/mips.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/mips.rs
@@ -7,7 +7,7 @@
 macro_rules! is_mips_feature_detected {
     ("msa") => {
         cfg!(target_feature = "msa") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::msa)
+            $crate::detect::check_for($crate::detect::Feature::msa)
     };
     ($t:tt) => { compile_error!(concat!("unknown mips target feature: ", $t)) };
 }
diff --git a/library/stdarch/stdsimd/arch/detect/arch/mips64.rs b/library/stdarch/crates/std_detect/src/detect/arch/mips64.rs
index d778865a617..ab837b3d5c9 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/mips64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/mips64.rs
@@ -7,7 +7,7 @@
 macro_rules! is_mips64_feature_detected {
     ("msa") => {
         cfg!(target_feature = "msa") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::msa)
+            $crate::detect::check_for($crate::detect::Feature::msa)
     };
     ($t:tt) => { compile_error!(concat!("unknown mips64 target feature: ", $t)) };
 }
diff --git a/library/stdarch/stdsimd/arch/detect/arch/powerpc.rs b/library/stdarch/crates/std_detect/src/detect/arch/powerpc.rs
index 0b3716f684a..9c440b1d6b0 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/powerpc.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/powerpc.rs
@@ -7,15 +7,15 @@
 macro_rules! is_powerpc_feature_detected {
     ("altivec") => {
         cfg!(target_feature = "altivec") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::altivec)
+            $crate::detect::check_for($crate::detect::Feature::altivec)
     };
     ("vsx") => {
         cfg!(target_feature = "vsx") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::vsx)
+            $crate::detect::check_for($crate::detect::Feature::vsx)
     };
     ("power8") => {
         cfg!(target_feature = "power8") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::power8)
+            $crate::detect::check_for($crate::detect::Feature::power8)
     };
     ($t:tt) => { compile_error!(concat!("unknown powerpc target feature: ", $t)) };
 }
diff --git a/library/stdarch/stdsimd/arch/detect/arch/powerpc64.rs b/library/stdarch/crates/std_detect/src/detect/arch/powerpc64.rs
index f85ebe5b675..910940f0bb9 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/powerpc64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/powerpc64.rs
@@ -7,15 +7,15 @@
 macro_rules! is_powerpc64_feature_detected {
     ("altivec") => {
         cfg!(target_feature = "altivec") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::altivec)
+            $crate::detect::check_for($crate::detect::Feature::altivec)
     };
     ("vsx") => {
         cfg!(target_feature = "vsx") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::vsx)
+            $crate::detect::check_for($crate::detect::Feature::vsx)
     };
     ("power8") => {
         cfg!(target_feature = "power8") ||
-            $crate::arch::detect::check_for($crate::arch::detect::Feature::power8)
+            $crate::detect::check_for($crate::detect::Feature::power8)
     };
     ($t:tt) => { compile_error!(concat!("unknown powerpc64 target feature: ", $t)) };
 }
diff --git a/library/stdarch/stdsimd/arch/detect/arch/x86.rs b/library/stdarch/crates/std_detect/src/detect/arch/x86.rs
index fdf37dac728..3ef8d31d12b 100644
--- a/library/stdarch/stdsimd/arch/detect/arch/x86.rs
+++ b/library/stdarch/crates/std_detect/src/detect/arch/x86.rs
@@ -6,12 +6,12 @@
 //! whether a feature is available (bit is set) or unavaiable (bit is cleared).
 //!
 //! The enum `Feature` is used to map bit positions to feature names, and the
-//! the `__crate::arch::detect::check_for!` macro is used to map string literals (e.g.
+//! the `__crate::detect::check_for!` macro is used to map string literals (e.g.
 //! "avx") to these bit positions (e.g. `Feature::avx`).
 //!
 //!
 //! The run-time feature detection is performed by the
-//! `__crate::arch::detect::check_for(Feature) -> bool` function. On its first call,
+//! `__crate::detect::check_for(Feature) -> bool` function. On its first call,
 //! this functions queries the CPU for the available features and stores them
 //! in a global `AtomicUsize` variable. The query is performed by just checking
 //! whether the feature bit in this global variable is set or cleared.
@@ -82,157 +82,157 @@
 #[allow_internal_unstable]
 macro_rules! is_x86_feature_detected {
     ("aes") => {
-        cfg!(target_feature = "aes") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::aes)  };
+        cfg!(target_feature = "aes") || $crate::detect::check_for(
+            $crate::detect::Feature::aes)  };
     ("pclmulqdq") => {
-        cfg!(target_feature = "pclmulqdq") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::pclmulqdq)  };
+        cfg!(target_feature = "pclmulqdq") || $crate::detect::check_for(
+            $crate::detect::Feature::pclmulqdq)  };
     ("rdrand") => {
-        cfg!(target_feature = "rdrand") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::rdrand)  };
+        cfg!(target_feature = "rdrand") || $crate::detect::check_for(
+            $crate::detect::Feature::rdrand)  };
     ("rdseed") => {
-        cfg!(target_feature = "rdseed") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::rdseed)  };
+        cfg!(target_feature = "rdseed") || $crate::detect::check_for(
+            $crate::detect::Feature::rdseed)  };
     ("tsc") => {
-        cfg!(target_feature = "tsc") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::tsc)  };
+        cfg!(target_feature = "tsc") || $crate::detect::check_for(
+            $crate::detect::Feature::tsc)  };
     ("mmx") => {
-        cfg!(target_feature = "mmx") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::mmx)  };
+        cfg!(target_feature = "mmx") || $crate::detect::check_for(
+            $crate::detect::Feature::mmx)  };
     ("sse") => {
-        cfg!(target_feature = "sse") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse)  };
+        cfg!(target_feature = "sse") || $crate::detect::check_for(
+            $crate::detect::Feature::sse)  };
     ("sse2") => {
-        cfg!(target_feature = "sse2") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse2)
+        cfg!(target_feature = "sse2") || $crate::detect::check_for(
+            $crate::detect::Feature::sse2)
     };
     ("sse3") => {
-        cfg!(target_feature = "sse3") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse3)
+        cfg!(target_feature = "sse3") || $crate::detect::check_for(
+            $crate::detect::Feature::sse3)
     };
     ("ssse3") => {
-        cfg!(target_feature = "ssse3") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::ssse3)
+        cfg!(target_feature = "ssse3") || $crate::detect::check_for(
+            $crate::detect::Feature::ssse3)
     };
     ("sse4.1") => {
-        cfg!(target_feature = "sse4.1") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse4_1)
+        cfg!(target_feature = "sse4.1") || $crate::detect::check_for(
+            $crate::detect::Feature::sse4_1)
     };
     ("sse4.2") => {
-        cfg!(target_feature = "sse4.2") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse4_2)
+        cfg!(target_feature = "sse4.2") || $crate::detect::check_for(
+            $crate::detect::Feature::sse4_2)
     };
     ("sse4a") => {
-        cfg!(target_feature = "sse4a") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sse4a)
+        cfg!(target_feature = "sse4a") || $crate::detect::check_for(
+            $crate::detect::Feature::sse4a)
     };
     ("sha") => {
-        cfg!(target_feature = "sha") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::sha)
+        cfg!(target_feature = "sha") || $crate::detect::check_for(
+            $crate::detect::Feature::sha)
     };
     ("avx") => {
-        cfg!(target_feature = "avx") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx)
+        cfg!(target_feature = "avx") || $crate::detect::check_for(
+            $crate::detect::Feature::avx)
     };
     ("avx2") => {
-        cfg!(target_feature = "avx2") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx2)
+        cfg!(target_feature = "avx2") || $crate::detect::check_for(
+            $crate::detect::Feature::avx2)
     };
     ("avx512f") => {
-        cfg!(target_feature = "avx512f") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512f)
+        cfg!(target_feature = "avx512f") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512f)
     };
     ("avx512cd") => {
-        cfg!(target_feature = "avx512cd") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512cd)
+        cfg!(target_feature = "avx512cd") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512cd)
     };
     ("avx512er") => {
-        cfg!(target_feature = "avx512er") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512er)
+        cfg!(target_feature = "avx512er") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512er)
     };
     ("avx512pf") => {
-        cfg!(target_feature = "avx512pf") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512pf)
+        cfg!(target_feature = "avx512pf") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512pf)
     };
     ("avx512bw") => {
-        cfg!(target_feature = "avx512bw") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512bw)
+        cfg!(target_feature = "avx512bw") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512bw)
     };
     ("avx512dq") => {
-        cfg!(target_feature = "avx512dq") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512dq)
+        cfg!(target_feature = "avx512dq") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512dq)
     };
     ("avx512vl") => {
-        cfg!(target_Feature = "avx512vl") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512vl)
+        cfg!(target_Feature = "avx512vl") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512vl)
     };
     ("avx512ifma") => {
-        cfg!(target_feature = "avx512ifma") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512_ifma)
+        cfg!(target_feature = "avx512ifma") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512_ifma)
     };
     ("avx512vbmi") => {
-        cfg!(target_feature = "avx512vbmi") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512_vbmi)
+        cfg!(target_feature = "avx512vbmi") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512_vbmi)
     };
     ("avx512vpopcntdq") => {
-        cfg!(target_feature = "avx512vpopcntdq") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::avx512_vpopcntdq)
+        cfg!(target_feature = "avx512vpopcntdq") || $crate::detect::check_for(
+            $crate::detect::Feature::avx512_vpopcntdq)
     };
     ("fma") => {
-        cfg!(target_feature = "fma") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::fma)
+        cfg!(target_feature = "fma") || $crate::detect::check_for(
+            $crate::detect::Feature::fma)
     };
     ("bmi1") => {
-        cfg!(target_feature = "bmi1") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::bmi)
+        cfg!(target_feature = "bmi1") || $crate::detect::check_for(
+            $crate::detect::Feature::bmi)
     };
     ("bmi2") => {
-        cfg!(target_feature = "bmi2") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::bmi2)
+        cfg!(target_feature = "bmi2") || $crate::detect::check_for(
+            $crate::detect::Feature::bmi2)
     };
     ("abm") => {
-        cfg!(target_feature = "abm") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::abm)
+        cfg!(target_feature = "abm") || $crate::detect::check_for(
+            $crate::detect::Feature::abm)
     };
     ("lzcnt") => {
-        cfg!(target_feature = "lzcnt") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::abm)
+        cfg!(target_feature = "lzcnt") || $crate::detect::check_for(
+            $crate::detect::Feature::abm)
     };
     ("tbm") => {
-        cfg!(target_feature = "tbm") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::tbm)
+        cfg!(target_feature = "tbm") || $crate::detect::check_for(
+            $crate::detect::Feature::tbm)
     };
     ("popcnt") => {
-        cfg!(target_feature = "popcnt") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::popcnt)
+        cfg!(target_feature = "popcnt") || $crate::detect::check_for(
+            $crate::detect::Feature::popcnt)
     };
     ("fxsr") => {
-        cfg!(target_feature = "fxsr") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::fxsr)
+        cfg!(target_feature = "fxsr") || $crate::detect::check_for(
+            $crate::detect::Feature::fxsr)
     };
     ("xsave") => {
-        cfg!(target_feature = "xsave") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::xsave)
+        cfg!(target_feature = "xsave") || $crate::detect::check_for(
+            $crate::detect::Feature::xsave)
     };
     ("xsaveopt") => {
-        cfg!(target_feature = "xsaveopt") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::xsaveopt)
+        cfg!(target_feature = "xsaveopt") || $crate::detect::check_for(
+            $crate::detect::Feature::xsaveopt)
     };
     ("xsaves") => {
-        cfg!(target_feature = "xsaves") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::xsaves)
+        cfg!(target_feature = "xsaves") || $crate::detect::check_for(
+            $crate::detect::Feature::xsaves)
     };
     ("xsavec") => {
-        cfg!(target_feature = "xsavec") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::xsavec)
+        cfg!(target_feature = "xsavec") || $crate::detect::check_for(
+            $crate::detect::Feature::xsavec)
     };
     ("cmpxchg16b") => {
-        cfg!(target_feature = "cmpxchg16b") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::cmpxchg16b)
+        cfg!(target_feature = "cmpxchg16b") || $crate::detect::check_for(
+            $crate::detect::Feature::cmpxchg16b)
     };
     ("adx") => {
-        cfg!(target_feature = "adx") || $crate::arch::detect::check_for(
-            $crate::arch::detect::Feature::adx)
+        cfg!(target_feature = "adx") || $crate::detect::check_for(
+            $crate::detect::Feature::adx)
     };
     ($t:tt) => {
         compile_error!(concat!("unknown target feature: ", $t))
diff --git a/library/stdarch/stdsimd/arch/detect/bit.rs b/library/stdarch/crates/std_detect/src/detect/bit.rs
index 578f0b16b74..578f0b16b74 100644
--- a/library/stdarch/stdsimd/arch/detect/bit.rs
+++ b/library/stdarch/crates/std_detect/src/detect/bit.rs
diff --git a/library/stdarch/stdsimd/arch/detect/cache.rs b/library/stdarch/crates/std_detect/src/detect/cache.rs
index ba81f35dcf7..c2de4da7349 100644
--- a/library/stdarch/stdsimd/arch/detect/cache.rs
+++ b/library/stdarch/crates/std_detect/src/detect/cache.rs
@@ -78,7 +78,8 @@ struct Cache(AtomicU64);
 impl Cache {
     /// Creates an uninitialized cache.
     const fn uninitialized() -> Self {
-        Cache(AtomicU64::new(u64::max_value()))
+        const X: AtomicU64 = AtomicU64::new(u64::max_value());
+        Self(X)
     }
     /// Is the cache uninitialized?
     #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/error_macros.rs b/library/stdarch/crates/std_detect/src/detect/error_macros.rs
index 6769757ed93..6769757ed93 100644
--- a/library/stdarch/stdsimd/arch/detect/error_macros.rs
+++ b/library/stdarch/crates/std_detect/src/detect/error_macros.rs
diff --git a/library/stdarch/stdsimd/arch/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs
index c7f55aa002a..f446e88eedc 100644
--- a/library/stdarch/stdsimd/arch/detect/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -68,7 +68,7 @@ cfg_if! {
         // On x86/x86_64 no OS specific functionality is required.
         #[path = "os/x86.rs"]
         mod os;
-    } else if #[cfg(target_os = "linux")] {
+    } else if #[cfg(all(target_os = "linux", feature = "use_std"))] {
         #[path = "os/linux/mod.rs"]
         mod os;
     } else if #[cfg(target_os = "freebsd")] {
diff --git a/library/stdarch/stdsimd/arch/detect/os/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/aarch64.rs
index a9936196571..f28d15a7c3e 100644
--- a/library/stdarch/stdsimd/arch/detect/os/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/aarch64.rs
@@ -16,8 +16,7 @@
 //! - [Zircon implementation](https://fuchsia.googlesource.com/zircon/+/master/kernel/arch/arm64/feature.cpp)
 //! - [Linux documentation](https://www.kernel.org/doc/Documentation/arm64/cpu-feature-registers.txt)
 
-use arch::detect::Feature;
-use arch::detect::cache;
+use crate::detect::{Feature, cache};
 
 /// Try to read the features from the system registers.
 ///
diff --git a/library/stdarch/stdsimd/arch/detect/os/freebsd/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/freebsd/aarch64.rs
index a1cf5cdd0e6..910d2f33b39 100644
--- a/library/stdarch/stdsimd/arch/detect/os/freebsd/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/freebsd/aarch64.rs
@@ -1,7 +1,6 @@
 //! Run-time feature detection for Aarch64 on FreeBSD.
 
-use arch::detect::Feature;
-use arch::detect::cache;
+use crate::detect::{Feature, cache};
 use super::super::aarch64::detect_features;
 
 /// Performs run-time feature detection.
diff --git a/library/stdarch/stdsimd/arch/detect/os/freebsd/mod.rs b/library/stdarch/crates/std_detect/src/detect/os/freebsd/mod.rs
index 1c73cefd47d..1c73cefd47d 100644
--- a/library/stdarch/stdsimd/arch/detect/os/freebsd/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/freebsd/mod.rs
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/aarch64.rs
index ebddf2d75d3..f7dc0f0222e 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/aarch64.rs
@@ -1,10 +1,7 @@
 //! Run-time feature detection for Aarch64 on Linux.
 
-use arch::detect::Feature;
-use arch::detect::cache;
-use arch::detect::bit;
-use super::auxvec;
-use super::cpuinfo;
+use crate::detect::{Feature, cache, bit};
+use super::{auxvec, cpuinfo};
 
 /// Performs run-time feature detection.
 #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/arm.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/arm.rs
index 9d265e02db4..0d58a847cd6 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/arm.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/arm.rs
@@ -1,10 +1,7 @@
 //! Run-time feature detection for ARM on Linux.
 
-use arch::detect::Feature;
-use arch::detect::cache;
-use arch::detect::bit;
-use super::auxvec;
-use super::cpuinfo;
+use crate::detect::{Feature, cache, bit};
+use super::{auxvec, cpuinfo};
 
 /// Performs run-time feature detection.
 #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/auxvec.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs
index 20fbb5f5885..31c980fd382 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/auxvec.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs
@@ -1,10 +1,10 @@
 //! Parses ELF auxiliary vectors.
 #![cfg_attr(not(target_arch = "aarch64"), allow(dead_code))]
 
-use mem;
-use prelude::v1::*;
-use fs::File;
-use io::Read;
+extern crate std;
+use self::std::{prelude::v1::*, fs::File, io::Read};
+
+use core::mem;
 
 /// Key to access the CPU Hardware capabilities bitfield.
 pub(crate) const AT_HWCAP: usize = 16;
@@ -214,9 +214,9 @@ mod tests {
         if #[cfg(target_arch = "arm")] {
             #[test]
             fn linux_rpi3() {
-                let v = auxv_from_file(
-                    "../../stdsimd/arch/detect/test_data/linux-rpi3.auxv",
-                ).unwrap();
+                let file = concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/linux-rpi3.auxv");
+                println!("file: {}", file);
+                let v = auxv_from_file(file).unwrap();
                 assert_eq!(v.hwcap, 4174038);
                 assert_eq!(v.hwcap2, 16);
             }
@@ -224,9 +224,9 @@ mod tests {
             #[test]
             #[should_panic]
             fn linux_macos_vb() {
-                let _ = auxv_from_file(
-                    "../../stdsimd/arch/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv"
-                ).unwrap();
+                let file = concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv");
+                println!("file: {}", file);
+                let v = auxv_from_file(file).unwrap();
                 // this file is incomplete (contains hwcap but not hwcap2), we
                 // want to fall back to /proc/cpuinfo in this case, so
                 // reading should fail. assert_eq!(v.hwcap, 126614527);
@@ -235,9 +235,9 @@ mod tests {
         } else if #[cfg(target_arch = "aarch64")] {
             #[test]
             fn linux_x64() {
-                let v = auxv_from_file(
-                    "../../stdsimd/arch/detect/test_data/linux-x64-i7-6850k.auxv",
-                ).unwrap();
+                let file = concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/linux-x64-i7-6850k.auxv");
+                println!("file: {}", file);
+                let v = auxv_from_file(file).unwrap();
                 assert_eq!(v.hwcap, 3219913727);
             }
         }
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/cpuinfo.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/cpuinfo.rs
index fd7b5876f3a..b3168578537 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/cpuinfo.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/cpuinfo.rs
@@ -1,9 +1,8 @@
 //! Parses /proc/cpuinfo
 #![cfg_attr(not(target_arch = "arm"), allow(dead_code))]
 
-use prelude::v1::*;
-use fs::File;
-use io::{self, Read};
+extern crate std;
+use self::std::{prelude::v1::*, fs::File, io, io::Read};
 
 /// cpuinfo
 pub(crate) struct CpuInfo {
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/mips.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/mips.rs
index 92e95f057ee..7c180326feb 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/mips.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/mips.rs
@@ -1,8 +1,6 @@
 //! Run-time feature detection for MIPS on Linux.
 
-use arch::detect::Feature;
-use arch::detect::cache;
-use arch::detect::bit;
+use crate::detect::{Feature, cache, bit};
 use super::auxvec;
 
 /// Performs run-time feature detection.
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/mod.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/mod.rs
index 11ac012e24d..642dfb46571 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/mod.rs
@@ -17,7 +17,7 @@ cfg_if! {
         mod powerpc;
         pub use self::powerpc::check_for;
     } else {
-        use arch::detect::Feature;
+        use crate::detect::Feature;
         /// Performs run-time feature detection.
         pub fn check_for(_x: Feature) -> bool {
             false
diff --git a/library/stdarch/stdsimd/arch/detect/os/linux/powerpc.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/powerpc.rs
index 41f58508f2c..0022a7db983 100644
--- a/library/stdarch/stdsimd/arch/detect/os/linux/powerpc.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/linux/powerpc.rs
@@ -1,9 +1,7 @@
 //! Run-time feature detection for PowerPC on Linux.
 
-use arch::detect::Feature;
-use arch::detect::cache;
-use super::auxvec;
-use super::cpuinfo;
+use crate::detect::{Feature, cache};
+use super::{auxvec, cpuinfo};
 
 /// Performs run-time feature detection.
 #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/os/other.rs b/library/stdarch/crates/std_detect/src/detect/os/other.rs
index 562cbfe8f1b..23e399ea790 100644
--- a/library/stdarch/stdsimd/arch/detect/os/other.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/other.rs
@@ -1,6 +1,6 @@
 //! Other operating systems
 
-use arch::detect::Feature;
+use crate::detect::Feature;
 
 /// Performs run-time feature detection.
 #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/os/x86.rs b/library/stdarch/crates/std_detect/src/detect/os/x86.rs
index ab49a6b4e75..9237d5dc0a5 100644
--- a/library/stdarch/stdsimd/arch/detect/os/x86.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/x86.rs
@@ -1,15 +1,12 @@
 //! x86 run-time feature detection is OS independent.
 
-use core::prelude::v1::*;
-use core::mem;
+use core::{prelude::v1::*, mem};
 #[cfg(target_arch = "x86")]
-use coresimd::arch::x86::*;
+use core::arch::x86::*;
 #[cfg(target_arch = "x86_64")]
-use coresimd::arch::x86_64::*;
+use core::arch::x86_64::*;
 
-use arch::detect::Feature;
-use arch::detect::cache;
-use arch::detect::bit;
+use crate::detect::{Feature, cache, bit};
 
 /// Performs run-time feature detection.
 #[inline]
diff --git a/library/stdarch/stdsimd/arch/detect/test_data/linux-rpi3.auxv b/library/stdarch/crates/std_detect/src/detect/test_data/linux-rpi3.auxv
index 0538e661f63..0538e661f63 100644
--- a/library/stdarch/stdsimd/arch/detect/test_data/linux-rpi3.auxv
+++ b/library/stdarch/crates/std_detect/src/detect/test_data/linux-rpi3.auxv
Binary files differdiff --git a/library/stdarch/stdsimd/arch/detect/test_data/linux-x64-i7-6850k.auxv b/library/stdarch/crates/std_detect/src/detect/test_data/linux-x64-i7-6850k.auxv
index 6afe1b3b46a..6afe1b3b46a 100644
--- a/library/stdarch/stdsimd/arch/detect/test_data/linux-x64-i7-6850k.auxv
+++ b/library/stdarch/crates/std_detect/src/detect/test_data/linux-x64-i7-6850k.auxv
Binary files differdiff --git a/library/stdarch/stdsimd/arch/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv b/library/stdarch/crates/std_detect/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv
index 75abc02d178..75abc02d178 100644
--- a/library/stdarch/stdsimd/arch/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv
+++ b/library/stdarch/crates/std_detect/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv
Binary files differdiff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs
new file mode 100644
index 00000000000..af7fc3bdc42
--- /dev/null
+++ b/library/stdarch/crates/std_detect/src/lib.rs
@@ -0,0 +1,37 @@
+//! Run-time feature detection for the Rust standard library.
+//!
+//! To detect whether a feature is enabled in the system running the binary
+//! use one of the appropriate macro for the target:
+//!
+//! * `x86` and `x86_64`: [`is_x86_feature_detected`]
+//! * `arm`: [`is_arm_feature_detected`]
+//! * `aarch64`: [`is_aarch64_feature_detected`]
+//! * `mips`: [`is_mips_feature_detected`]
+//! * `mips64`: [`is_mips64_feature_detected`]
+//! * `powerpc`: [`is_powerpc_feature_detected`]
+//! * `powerpc64`: [`is_powerpc64_feature_detected`]
+
+#![unstable(feature = "stdsimd", issue = "27731")]
+#![feature(const_fn, integer_atomics, staged_api, stdsimd)]
+#![feature(doc_cfg, allow_internal_unstable)]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::shadow_reuse))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    deny(clippy::missing_inline_in_public_items,)
+)]
+#![cfg_attr(target_os = "linux", feature(linkage))]
+#![cfg_attr(all(target_os = "freebsd", target_arch = "aarch64"), feature(asm))]
+#![no_std]
+
+#[cfg(test)]
+#[macro_use(println)]
+extern crate std;
+
+extern crate libc;
+
+#[macro_use]
+extern crate cfg_if;
+
+#[doc(hidden)]
+#[unstable(feature = "stdsimd", issue = "27731")]
+pub mod detect;
diff --git a/library/stdarch/crates/std_detect/src/mod.rs b/library/stdarch/crates/std_detect/src/mod.rs
new file mode 100644
index 00000000000..b630e7ff383
--- /dev/null
+++ b/library/stdarch/crates/std_detect/src/mod.rs
@@ -0,0 +1,5 @@
+//! `std_detect`
+
+#[doc(hidden)] // unstable implementation detail
+#[unstable(feature = "stdsimd", issue = "27731")]
+pub mod detect;
diff --git a/library/stdarch/crates/stdsimd/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs
index 636d530ef9a..85beeee63ac 100644
--- a/library/stdarch/crates/stdsimd/tests/cpu-detection.rs
+++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs
@@ -14,7 +14,7 @@
     target_arch = "powerpc64"
 ))]
 #[macro_use]
-extern crate stdsimd;
+extern crate std_detect;
 
 #[test]
 #[cfg(all(target_arch = "arm", any(target_os = "linux", target_os = "android")))]
diff --git a/library/stdarch/crates/stdsimd-verify/build.rs b/library/stdarch/crates/stdsimd-verify/build.rs
index 314de67e40b..c0dc81b6a61 100644
--- a/library/stdarch/crates/stdsimd-verify/build.rs
+++ b/library/stdarch/crates/stdsimd-verify/build.rs
@@ -3,14 +3,16 @@ use std::path::Path;
 fn main() {
     let dir = Path::new(env!("CARGO_MANIFEST_DIR"));
     let root = dir.parent().unwrap();
-    walk(&root.join("../coresimd/x86"));
-    walk(&root.join("../coresimd/x86_64"));
-    walk(&root.join("../coresimd/arm"));
-    walk(&root.join("../coresimd/aarch64"));
+    eprintln!("root: {}", root.display());
+    walk(&root.join("core_arch/src/x86"));
+    walk(&root.join("core_arch/src/x86_64"));
+    walk(&root.join("core_arch/src/arm"));
+    walk(&root.join("core_arch/src/aarch64"));
 }
 
 fn walk(root: &Path) {
     for file in root.read_dir().unwrap() {
+        eprintln!("root: {}", root.display());
         let file = file.unwrap();
         if file.file_type().unwrap().is_dir() {
             walk(&file.path());
diff --git a/library/stdarch/crates/stdsimd-verify/src/lib.rs b/library/stdarch/crates/stdsimd-verify/src/lib.rs
index 751614bbf84..45cb5f5dbcb 100644
--- a/library/stdarch/crates/stdsimd-verify/src/lib.rs
+++ b/library/stdarch/crates/stdsimd-verify/src/lib.rs
@@ -13,12 +13,12 @@ use proc_macro::TokenStream;
 
 #[proc_macro]
 pub fn x86_functions(input: TokenStream) -> TokenStream {
-    functions(input, &["../coresimd/x86", "../coresimd/x86_64"])
+    functions(input, &["core_arch/src/x86", "core_arch/src/x86_64"])
 }
 
 #[proc_macro]
 pub fn arm_functions(input: TokenStream) -> TokenStream {
-    functions(input, &["../coresimd/arm", "../coresimd/aarch64"])
+    functions(input, &["core_arch/src/arm", "core_arch/src/aarch64"])
 }
 
 fn functions(input: TokenStream, dirs: &[&str]) -> TokenStream {
diff --git a/library/stdarch/crates/stdsimd/src/lib.rs b/library/stdarch/crates/stdsimd/src/lib.rs
deleted file mode 100644
index 594adccf05e..00000000000
--- a/library/stdarch/crates/stdsimd/src/lib.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-//! SIMD and vendor intrinsics support library.
-//!
-//! This crate defines the vendor intrinsics and types primarily used for SIMD
-//! in Rust.
-
-#![feature(const_fn, integer_atomics, staged_api, stdsimd)]
-#![feature(doc_cfg, allow_internal_unstable)]
-#![cfg_attr(feature = "cargo-clippy", allow(clippy::shadow_reuse))]
-#![cfg_attr(
-    feature = "cargo-clippy",
-    deny(clippy::missing_inline_in_public_items,)
-)]
-#![cfg_attr(target_os = "linux", feature(linkage))]
-#![cfg_attr(all(target_os = "freebsd", target_arch = "aarch64"), feature(asm))]
-#![no_std]
-#![unstable(feature = "stdsimd", issue = "27731")]
-
-#[macro_use]
-extern crate cfg_if;
-extern crate coresimd;
-extern crate libc;
-extern crate std as __do_not_use_this_import;
-
-#[cfg(test)]
-#[allow(unused_imports)]
-#[macro_use(println, print)]
-extern crate std;
-
-#[path = "../../../stdsimd/mod.rs"]
-mod stdsimd;
-
-pub use stdsimd::*;
-
-#[allow(unused_imports)]
-use __do_not_use_this_import::fs;
-#[allow(unused_imports)]
-use __do_not_use_this_import::io;
-#[allow(unused_imports)]
-use __do_not_use_this_import::mem;
-#[allow(unused_imports)]
-use __do_not_use_this_import::prelude;
diff --git a/library/stdarch/examples/Cargo.toml b/library/stdarch/examples/Cargo.toml
new file mode 100644
index 00000000000..6ac184606ef
--- /dev/null
+++ b/library/stdarch/examples/Cargo.toml
@@ -0,0 +1,27 @@
+[package]
+name = "stdsimd_examples"
+version = "0.0.0"
+authors = [
+    "Alex Crichton <alex@alexcrichton.com>",
+    "Andrew Gallant <jamslam@gmail.com>",
+    "Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>",
+]
+description = "Examples of the stdsimd crate."
+
+[dependencies]
+core_arch = { path = "../crates/core_arch" }
+std_detect = { path = "../crates/std_detect" }
+quickcheck = "0.8"
+rand = "0.6"
+
+[target.'cfg(target_arch = "wasm32")'.dependencies]
+rand = { version = "0.6", features = ["wasm-bindgen"] }
+
+[[bin]]
+name = "hex"
+path = "hex.rs"
+
+[[example]]
+name = "wasm"
+crate-type = ["cdylib"]
+path = "wasm.rs"
diff --git a/library/stdarch/examples/hex.rs b/library/stdarch/examples/hex.rs
index 28b85819858..37f2ce70160 100644
--- a/library/stdarch/examples/hex.rs
+++ b/library/stdarch/examples/hex.rs
@@ -8,7 +8,7 @@
 //!
 //! You can test out this program via:
 //!
-//!     echo test | cargo +nightly run --release --example hex -p stdsimd
+//!     echo test | cargo +nightly run --release hex
 //!
 //! and you should see `746573740a` get printed out.
 
@@ -28,11 +28,10 @@
 )]
 
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
-#[macro_use]
-extern crate stdsimd;
+#[macro_use(is_x86_feature_detected)]
+extern crate std_detect;
 
-#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
-extern crate stdsimd;
+extern crate core_arch;
 
 #[cfg(test)]
 #[macro_use]
@@ -42,9 +41,9 @@ use std::io::{self, Read};
 use std::str;
 
 #[cfg(target_arch = "x86")]
-use stdsimd::arch::x86::*;
+use core_arch::arch::x86::*;
 #[cfg(target_arch = "x86_64")]
-use stdsimd::arch::x86_64::*;
+use core_arch::arch::x86_64::*;
 
 fn main() {
     let mut input = Vec::new();
@@ -290,8 +289,9 @@ mod benches {
         len: usize,
         f: for<'a> unsafe fn(&[u8], &'a mut [u8]) -> Result<&'a str, usize>,
     ) {
-        let input = rand::thread_rng()
-            .gen_iter::<u8>()
+        let mut rng = rand::thread_rng();
+        let input = std::iter::repeat(())
+            .map(|()| rng.gen::<u8>())
             .take(len)
             .collect::<Vec<_>>();
         let mut dst = vec![0; input.len() * 2];
diff --git a/library/stdarch/examples/wasm.rs b/library/stdarch/examples/wasm.rs
index 6d0fdeb02b5..93124e69277 100644
--- a/library/stdarch/examples/wasm.rs
+++ b/library/stdarch/examples/wasm.rs
@@ -3,11 +3,11 @@
 #![feature(stdsimd)]
 #![cfg(target_arch = "wasm32")]
 
-extern crate stdsimd;
+extern crate core_arch;
 
 use std::ptr;
 
-use stdsimd::arch::wasm32::*;
+use core_arch::arch::wasm32::*;
 
 static mut HEAD: *mut *mut u8 = 0 as _;