Skip to content

Commit fc53324

Browse files
authored
Rollup merge of rust-lang#126704 - sayantn:sha, r=Amanieu
Added SHA512, SM3, SM4 target-features and `sha512_sm_x86` feature gate This is an effort towards rust-lang#126624. This adds support for these 3 target-features and introduces the feature flag `sha512_sm_x86`, which would gate these target-features and the yet-to-be-implemented detection and intrinsics in stdarch.
2 parents 0e4358d + cb11051 commit fc53324

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/src/arch.rs

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
#[stable(feature = "simd_arch", since = "1.27.0")]
55
pub use crate::core_arch::arch::*;
66

7+
#[cfg(bootstrap)]
8+
#[allow(dead_code)]
9+
#[unstable(feature = "sha512_sm_x86", issue = "126624")]
10+
fn dummy() {
11+
// AArch64 also has a target feature named `sm4`, so we need `#![feature(sha512_sm_x86)]` in lib.rs
12+
// But as the bootstrap compiler doesn't know about this feature yet, we need to convert it to a
13+
// library feature until bootstrap gets bumped
14+
}
15+
716
/// Inline assembly.
817
///
918
/// Refer to [Rust By Example] for a usage guide and the [reference] for

core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
#![feature(powerpc_target_feature)]
261261
#![feature(riscv_target_feature)]
262262
#![feature(rtm_target_feature)]
263+
#![feature(sha512_sm_x86)]
263264
#![feature(sse4a_target_feature)]
264265
#![feature(tbm_target_feature)]
265266
#![feature(wasm_target_feature)]

0 commit comments

Comments
 (0)