Skip to content

Commit

Permalink
Rollup merge of rust-lang#126704 - sayantn:sha, r=Amanieu
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Aug 3, 2024
2 parents 0e4358d + cb11051 commit fc53324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#[stable(feature = "simd_arch", since = "1.27.0")]
pub use crate::core_arch::arch::*;

#[cfg(bootstrap)]
#[allow(dead_code)]
#[unstable(feature = "sha512_sm_x86", issue = "126624")]
fn dummy() {
// AArch64 also has a target feature named `sm4`, so we need `#![feature(sha512_sm_x86)]` in lib.rs
// But as the bootstrap compiler doesn't know about this feature yet, we need to convert it to a
// library feature until bootstrap gets bumped
}

/// Inline assembly.
///
/// Refer to [Rust By Example] for a usage guide and the [reference] for
Expand Down
1 change: 1 addition & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
#![feature(powerpc_target_feature)]
#![feature(riscv_target_feature)]
#![feature(rtm_target_feature)]
#![feature(sha512_sm_x86)]
#![feature(sse4a_target_feature)]
#![feature(tbm_target_feature)]
#![feature(wasm_target_feature)]
Expand Down

0 comments on commit fc53324

Please sign in to comment.