Skip to content

Commit 3f7dbd5

Browse files
committed
Stabilize sha512_sm_x86, and the sha512, sm3 and sm4 target features
1 parent 3ef8e64 commit 3f7dbd5

File tree

6 files changed

+6
-25
lines changed

6 files changed

+6
-25
lines changed

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ declare_features! (
378378
(accepted, self_in_typedefs, "1.32.0", Some(49303)),
379379
/// Allows `Self` struct constructor (RFC 2302).
380380
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
381+
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
382+
(accepted, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)),
381383
/// Shortern the tail expression lifetime
382384
(accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
383385
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.

compiler/rustc_feature/src/unstable.rs

-2
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,6 @@ declare_features! (
628628
(unstable, return_type_notation, "1.70.0", Some(109417)),
629629
/// Allows `extern "rust-cold"`.
630630
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
631-
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
632-
(unstable, sha512_sm_x86, "1.82.0", Some(126624)),
633631
/// Allows the use of SIMD types in functions declared in `extern` blocks.
634632
(unstable, simd_ffi, "1.0.0", Some(27731)),
635633
/// Allows specialization of implementations (RFC 1210).

compiler/rustc_target/src/target_features.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,9 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
455455
("rdseed", Stable, &[]),
456456
("rtm", Unstable(sym::rtm_target_feature), &[]),
457457
("sha", Stable, &["sse2"]),
458-
("sha512", Unstable(sym::sha512_sm_x86), &["avx2"]),
459-
("sm3", Unstable(sym::sha512_sm_x86), &["avx"]),
460-
("sm4", Unstable(sym::sha512_sm_x86), &["avx2"]),
458+
("sha512", Stable, &["avx2"]),
459+
("sm3", Stable, &["avx"]),
460+
("sm4", Stable, &["avx2"]),
461461
// This cannot actually be toggled, the ABI always fixes it, so it'd make little sense to
462462
// stabilize. It must be in this list for the ABI check to be able to use it.
463463
("soft-float", Stability::Unstable(sym::x87_target_feature), &[]),

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
//
189189
// Target features:
190190
// tidy-alphabetical-start
191+
#![cfg_attr(bootstrap, feature(sha512_sm_x86))]
191192
#![feature(aarch64_unstable_target_feature)]
192193
#![feature(arm_target_feature)]
193194
#![feature(avx512_target_feature)]
@@ -199,7 +200,6 @@
199200
#![feature(riscv_target_feature)]
200201
#![feature(rtm_target_feature)]
201202
#![feature(s390x_target_feature)]
202-
#![feature(sha512_sm_x86)]
203203
#![feature(sse4a_target_feature)]
204204
#![feature(tbm_target_feature)]
205205
#![feature(wasm_target_feature)]

tests/ui/feature-gates/feature-gate-sha512_sm_x86.rs

-6
This file was deleted.

tests/ui/feature-gates/feature-gate-sha512_sm_x86.stderr

-13
This file was deleted.

0 commit comments

Comments
 (0)