Skip to content

Stabilize sha512, sm3 and sm4 for x86 #140767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ declare_features! (
(accepted, self_in_typedefs, "1.32.0", Some(49303)),
/// Allows `Self` struct constructor (RFC 2302).
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
(accepted, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)),
/// Shortern the tail expression lifetime
(accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,6 @@ declare_features! (
(unstable, return_type_notation, "1.70.0", Some(109417)),
/// Allows `extern "rust-cold"`.
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
(unstable, sha512_sm_x86, "1.82.0", Some(126624)),
/// Allows the use of SIMD types in functions declared in `extern` blocks.
(unstable, simd_ffi, "1.0.0", Some(27731)),
/// Allows specialization of implementations (RFC 1210).
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
("rdseed", Stable, &[]),
("rtm", Unstable(sym::rtm_target_feature), &[]),
("sha", Stable, &["sse2"]),
("sha512", Unstable(sym::sha512_sm_x86), &["avx2"]),
("sm3", Unstable(sym::sha512_sm_x86), &["avx"]),
("sm4", Unstable(sym::sha512_sm_x86), &["avx2"]),
("sha512", Stable, &["avx2"]),
("sm3", Stable, &["avx"]),
("sm4", Stable, &["avx2"]),
// This cannot actually be toggled, the ABI always fixes it, so it'd make little sense to
// stabilize. It must be in this list for the ABI check to be able to use it.
("soft-float", Stability::Unstable(sym::x87_target_feature), &[]),
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
// Target features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(avx512_target_feature))]
#![cfg_attr(bootstrap, feature(sha512_sm_x86))]
#![feature(aarch64_unstable_target_feature)]
#![feature(arm_target_feature)]
#![feature(hexagon_target_feature)]
Expand All @@ -198,7 +199,6 @@
#![feature(riscv_target_feature)]
#![feature(rtm_target_feature)]
#![feature(s390x_target_feature)]
#![feature(sha512_sm_x86)]
#![feature(sse4a_target_feature)]
#![feature(tbm_target_feature)]
#![feature(wasm_target_feature)]
Expand Down
2 changes: 1 addition & 1 deletion library/stdarch
Submodule stdarch updated 63 files
+1 −0 ci/run-docker.sh
+1 −1 ci/run.sh
+4 −4 crates/core_arch/src/aarch64/neon/generated.rs
+32 −4 crates/core_arch/src/arm_shared/neon/generated.rs
+6 −4 crates/core_arch/src/loongarch64/mod.rs
+9 −9 crates/core_arch/src/powerpc/altivec.rs
+9 −9 crates/core_arch/src/s390x/vector.rs
+2 −2 crates/core_arch/src/x86/avx.rs
+2 −2 crates/core_arch/src/x86/avx2.rs
+6 −6 crates/core_arch/src/x86/avx512bf16.rs
+145 −112 crates/core_arch/src/x86/gfni.rs
+11 −11 crates/core_arch/src/x86/kl.rs
+1 −1 crates/core_arch/src/x86/mod.rs
+5 −3 crates/core_arch/src/x86/rdtsc.rs
+10 −10 crates/core_arch/src/x86/sha.rs
+16 −16 crates/core_arch/src/x86/vaes.rs
+4 −4 crates/core_arch/src/x86/vpclmulqdq.rs
+2 −28 crates/core_arch/src/x86_64/cmpxchg16b.rs
+0 −274 crates/intrinsic-test/src/argument.rs
+64 −0 crates/intrinsic-test/src/arm/compile.rs
+122 −0 crates/intrinsic-test/src/arm/config.rs
+95 −0 crates/intrinsic-test/src/arm/intrinsic.rs
+137 −0 crates/intrinsic-test/src/arm/json_parser.rs
+124 −0 crates/intrinsic-test/src/arm/mod.rs
+195 −0 crates/intrinsic-test/src/arm/types.rs
+209 −0 crates/intrinsic-test/src/common/argument.rs
+113 −0 crates/intrinsic-test/src/common/cli.rs
+90 −0 crates/intrinsic-test/src/common/compare.rs
+154 −0 crates/intrinsic-test/src/common/compile_c.rs
+17 −0 crates/intrinsic-test/src/common/constraint.rs
+198 −0 crates/intrinsic-test/src/common/gen_c.rs
+243 −0 crates/intrinsic-test/src/common/gen_rust.rs
+0 −0 crates/intrinsic-test/src/common/indentation.rs
+51 −0 crates/intrinsic-test/src/common/intrinsic.rs
+296 −0 crates/intrinsic-test/src/common/intrinsic_helpers.rs
+25 −0 crates/intrinsic-test/src/common/mod.rs
+0 −0 crates/intrinsic-test/src/common/values.rs
+66 −0 crates/intrinsic-test/src/common/write_file.rs
+0 −152 crates/intrinsic-test/src/intrinsic.rs
+0 −99 crates/intrinsic-test/src/json_parser.rs
+24 −745 crates/intrinsic-test/src/main.rs
+0 −508 crates/intrinsic-test/src/types.rs
+1 −0 crates/std_detect/Cargo.toml
+15 −15 crates/std_detect/src/detect/arch/riscv.rs
+5 −10 crates/std_detect/src/detect/arch/x86.rs
+59 −2 crates/std_detect/src/detect/cache.rs
+8 −0 crates/std_detect/src/detect/macros.rs
+4 −6 crates/std_detect/src/detect/os/linux/riscv.rs
+2 −2 crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml
+6 −4 crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml
+6 −23 crates/stdarch-gen-arm/src/big_endian.rs
+3 −2 crates/stdarch-gen-arm/src/context.rs
+6 −9 crates/stdarch-gen-arm/src/expression.rs
+28 −105 crates/stdarch-gen-arm/src/fn_suffix.rs
+19 −18 crates/stdarch-gen-arm/src/intrinsic.rs
+3 −2 crates/stdarch-gen-arm/src/load_store_tests.rs
+6 −6 crates/stdarch-gen-arm/src/main.rs
+4 −4 crates/stdarch-gen-arm/src/typekinds.rs
+1 −1 crates/stdarch-gen-arm/src/wildstring.rs
+1 −1 crates/stdarch-gen-loongarch/src/main.rs
+1 −1 crates/stdarch-test/src/lib.rs
+2 −0 crates/stdarch-verify/src/lib.rs
+24 −24 examples/connect5.rs
6 changes: 0 additions & 6 deletions tests/ui/feature-gates/feature-gate-sha512_sm_x86.rs

This file was deleted.

13 changes: 0 additions & 13 deletions tests/ui/feature-gates/feature-gate-sha512_sm_x86.stderr

This file was deleted.

Loading