Skip to content

Commit

Permalink
Auto merge of rust-lang#83776 - jyn514:update-stdarch-docs, r=Amanieu
Browse files Browse the repository at this point in the history
Update stdarch submodule (to before it switched to const generics)

rust-lang#83278 (comment): This unblocks rust-lang#82539.

Major changes:
- More AVX-512 intrinsics.
- More ARM & AArch64 NEON intrinsics.
- Updated unstable WASM intrinsics to latest draft standards.
- std_detect is now a separate crate instead of a submodule of std.

I double-checked and the first use of const generics looks like rust-lang/stdarch@8d50178, which isn't included in this PR.

r? `@Amanieu`
  • Loading branch information
bors committed Apr 12, 2021
2 parents 1284da3 + 1b0b7e9 commit d0695c9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5034,10 +5034,22 @@ dependencies = [
"profiler_builtins",
"rand 0.7.3",
"rustc-demangle",
"std_detect",
"unwind",
"wasi",
]

[[package]]
name = "std_detect"
version = "0.1.5"
dependencies = [
"cfg-if 0.1.10",
"compiler_builtins",
"libc",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
]

[[package]]
name = "string_cache"
version = "0.8.0"
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ exclude = [
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
# so it can be invoked before the current checkout is set up.
"src/tools/x",
# stdarch has its own Cargo workspace
"library/stdarch",
]

[profile.release.package.compiler_builtins]
Expand Down
5 changes: 3 additions & 2 deletions library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ compiler_builtins = { version = "0.1.39" }
profiler_builtins = { path = "../profiler_builtins", optional = true }
unwind = { path = "../unwind" }
hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep-of-std'] }
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }

# Dependencies of the `backtrace` crate
addr2line = { version = "0.14.0", optional = true, default-features = false }
Expand Down Expand Up @@ -70,8 +71,8 @@ panic_immediate_abort = ["core/panic_immediate_abort"]

# Enable std_detect default features for stdarch/crates/std_detect:
# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
std_detect_file_io = []
std_detect_dlsym_getauxval = []
std_detect_file_io = ["std_detect/std_detect_file_io"]
std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"]

[package.metadata.fortanix-sgx]
# Maximum possible number of threads when testing
Expand Down
22 changes: 8 additions & 14 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,22 +538,16 @@ pub mod rt;
#[allow(dead_code, unused_attributes)]
mod backtrace_rs;

// Pull in the `std_detect` crate directly into libstd. The contents of
// `std_detect` are in a different repository: rust-lang/stdarch.
//
// `std_detect` depends on libstd, but the contents of this module are
// set up in such a way that directly pulling it here works such that the
// crate uses the this crate as its libstd.
#[path = "../../stdarch/crates/std_detect/src/mod.rs"]
#[allow(missing_debug_implementations, missing_docs, dead_code)]
#[unstable(feature = "stdsimd", issue = "48556")]
#[cfg(not(test))]
mod std_detect;

#[stable(feature = "simd_x86", since = "1.27.0")]
pub use std_detect::is_x86_feature_detected;
#[doc(hidden)]
#[unstable(feature = "stdsimd", issue = "48556")]
#[cfg(not(test))]
pub use std_detect::detect;
pub use std_detect::*;
#[unstable(feature = "stdsimd", issue = "48556")]
pub use std_detect::{
is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
};

// Re-export macros defined in libcore.
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 1 addition & 1 deletion library/stdarch
Submodule stdarch updated 57 files
+14 −3 .github/workflows/main.yml
+1 −1 ci/docker/i586-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/i686-unknown-linux-gnu/Dockerfile
+2 −2 ci/docker/wasm32-wasi/Dockerfile
+2 −1 ci/docker/x86_64-unknown-linux-gnu-emulated/Dockerfile
+1 −1 ci/docker/x86_64-unknown-linux-gnu/Dockerfile
+3 −0 ci/run.sh
+2 −1 crates/assert-instr-macro/src/lib.rs
+228 −22 crates/core_arch/avx512bw.md
+2,627 −1,416 crates/core_arch/avx512f.md
+153 −0 crates/core_arch/avx512vbmi2.md
+5 −7 crates/core_arch/src/lib.rs
+1 −1 crates/core_arch/src/mod.rs
+1 −0 crates/core_arch/src/simd.rs
+3 −4 crates/core_arch/src/x86/avx2.rs
+1,573 −0 crates/core_arch/src/x86/avx512bf16.rs
+5,175 −934 crates/core_arch/src/x86/avx512bw.rs
+24,295 −5,992 crates/core_arch/src/x86/avx512f.rs
+916 −0 crates/core_arch/src/x86/avx512vbmi.rs
+3,477 −0 crates/core_arch/src/x86/avx512vbmi2.rs
+939 −0 crates/core_arch/src/x86/avx512vnni.rs
+1 −1 crates/core_arch/src/x86/avx512vpclmulqdq.rs
+20 −13 crates/core_arch/src/x86/cpuid.rs
+1 −1 crates/core_arch/src/x86/fxsr.rs
+160 −8 crates/core_arch/src/x86/mod.rs
+1 −1 crates/core_arch/src/x86/pclmulqdq.rs
+2 −3 crates/core_arch/src/x86/sse.rs
+1 −1 crates/core_arch/src/x86/sse2.rs
+2 −2 crates/core_arch/src/x86/test.rs
+1 −1 crates/core_arch/src/x86/xsave.rs
+6,980 −779 crates/core_arch/src/x86_64/avx512f.rs
+1 −1 crates/core_arch/src/x86_64/fxsr.rs
+32 −0 crates/core_arch/src/x86_64/macros.rs
+3 −0 crates/core_arch/src/x86_64/mod.rs
+1 −1 crates/core_arch/src/x86_64/xsave.rs
+1 −0 crates/simd-test-macro/src/lib.rs
+12 −2 crates/std_detect/Cargo.toml
+1 −1 crates/std_detect/src/detect/arch/x86.rs
+12 −5 crates/std_detect/src/detect/cache.rs
+3 −3 crates/std_detect/src/detect/mod.rs
+1 −1 crates/std_detect/src/detect/os/freebsd/auxvec.rs
+6 −6 crates/std_detect/src/detect/os/freebsd/mod.rs
+6 −4 crates/std_detect/src/detect/os/linux/aarch64.rs
+5 −3 crates/std_detect/src/detect/os/linux/arm.rs
+72 −28 crates/std_detect/src/detect/os/linux/auxvec.rs
+8 −9 crates/std_detect/src/detect/os/linux/cpuinfo.rs
+41 −8 crates/std_detect/src/detect/os/linux/mod.rs
+3 −2 crates/std_detect/src/detect/os/linux/powerpc.rs
+3 −3 crates/std_detect/src/detect/os/x86.rs
+9 −19 crates/std_detect/src/lib.rs
+0 −5 crates/std_detect/src/mod.rs
+1 −1 crates/std_detect/tests/x86-specific.rs
+1 −2 crates/stdarch-test/src/lib.rs
+6 −4 crates/stdarch-verify/src/lib.rs
+31 −0 crates/stdarch-verify/tests/x86-intel.rs
+5 −0 examples/Cargo.toml
+1,272 −0 examples/connect5.rs

0 comments on commit d0695c9

Please sign in to comment.