From 7187087c3183aac9f4599aae6b2be916d6ab0bfa Mon Sep 17 00:00:00 2001 From: TechnoPorg Date: Fri, 9 Oct 2026 09:04:57 -0400 Subject: [PATCH] Stabilize RISC-V `Zk` and `Zb` intrinsics --- crates/core_arch/src/mod.rs | 8 +++- crates/core_arch/src/riscv32/mod.rs | 4 +- crates/core_arch/src/riscv32/zb.rs | 15 ++++---- crates/core_arch/src/riscv32/zk.rs | 47 ++++++++++-------------- crates/core_arch/src/riscv64/mod.rs | 4 +- crates/core_arch/src/riscv64/zb.rs | 12 +++--- crates/core_arch/src/riscv64/zk.rs | 22 +++++------ crates/core_arch/src/riscv_shared/mod.rs | 4 +- crates/core_arch/src/riscv_shared/zb.rs | 4 +- crates/core_arch/src/riscv_shared/zk.rs | 16 ++++---- 10 files changed, 65 insertions(+), 71 deletions(-) diff --git a/crates/core_arch/src/mod.rs b/crates/core_arch/src/mod.rs index 4583142cd5..df7b99659e 100644 --- a/crates/core_arch/src/mod.rs +++ b/crates/core_arch/src/mod.rs @@ -83,9 +83,11 @@ pub mod arch { /// See the [module documentation](../index.html) for more details. #[cfg(any(target_arch = "riscv32", doc))] #[doc(cfg(any(target_arch = "riscv32")))] - #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub mod riscv32 { + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::riscv_shared::*; + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::riscv32::*; } @@ -94,12 +96,14 @@ pub mod arch { /// See the [module documentation](../index.html) for more details. #[cfg(any(target_arch = "riscv64", doc))] #[doc(cfg(any(target_arch = "riscv64")))] - #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub mod riscv64 { + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::riscv64::*; // RISC-V RV64 supports all RV32 instructions as well in current specifications (2022-01-05). // Module `riscv_shared` includes instructions available under all RISC-V platforms, // i.e. RISC-V RV32 instructions. + #[stable(feature = "stdarch_riscv", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::riscv_shared::*; } diff --git a/crates/core_arch/src/riscv32/mod.rs b/crates/core_arch/src/riscv32/mod.rs index 7017b7edc4..fbcbc02783 100644 --- a/crates/core_arch/src/riscv32/mod.rs +++ b/crates/core_arch/src/riscv32/mod.rs @@ -3,8 +3,8 @@ mod zb; mod zk; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] pub use zb::*; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub use zk::*; diff --git a/crates/core_arch/src/riscv32/zb.rs b/crates/core_arch/src/riscv32/zb.rs index 1639890baf..3dc81ca146 100644 --- a/crates/core_arch/src/riscv32/zb.rs +++ b/crates/core_arch/src/riscv32/zb.rs @@ -33,7 +33,7 @@ unsafe extern "llvm-intrinsic" { /// Version: v1.0.1 /// /// Section: 3.47 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkx")] #[cfg_attr(test, assert_instr(xperm8))] #[inline] @@ -53,7 +53,7 @@ pub fn xperm8_32(rs1: u32, rs2: u32) -> u32 { /// Version: v1.0.1 /// /// Section: 3.48 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkx")] #[cfg_attr(test, assert_instr(xperm4))] #[inline] @@ -70,7 +70,7 @@ pub fn xperm4_32(rs1: u32, rs2: u32) -> u32 { /// Version: v1.0.0 /// /// Section: 2.12 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkc")] #[cfg_attr(test, assert_instr(clmulh))] #[inline] @@ -87,7 +87,7 @@ pub fn clmulh_32(rs1: u32, rs2: u32) -> u32 { /// Version: v1.0.0 /// /// Section: 2.13 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbc")] #[cfg_attr(test, assert_instr(clmulr))] #[inline] @@ -109,10 +109,9 @@ pub fn clmulr_32(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.49 #[target_feature(enable = "zbkb")] -// See #1464 -// #[cfg_attr(test, assert_instr(zip))] +#[cfg_attr(test, assert_instr(zip))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] pub fn zip_32(rs: u32) -> u32 { unsafe { _zip_32(rs) } } @@ -131,7 +130,7 @@ pub fn zip_32(rs: u32) -> u32 { #[target_feature(enable = "zbkb")] #[cfg_attr(test, assert_instr(unzip))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] pub fn unzip_32(rs: u32) -> u32 { unsafe { _unzip_32(rs) } } diff --git a/crates/core_arch/src/riscv32/zk.rs b/crates/core_arch/src/riscv32/zk.rs index ae3d80fa2a..55b8801f3d 100644 --- a/crates/core_arch/src/riscv32/zk.rs +++ b/crates/core_arch/src/riscv32/zk.rs @@ -51,10 +51,9 @@ unsafe extern "llvm-intrinsic" { /// The `BS` parameter is expected to be a constant value and only the bottom 2 bits of `bs` are /// used. #[target_feature(enable = "zkne")] -// See #1464 -// #[cfg_attr(test, assert_instr(aes32esi, BS = 0))] +#[cfg_attr(test, assert_instr(aes32esi, BS = 0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes32esi(rs1: u32, rs2: u32) -> u32 { static_assert!(BS < 4); @@ -79,10 +78,9 @@ pub fn aes32esi(rs1: u32, rs2: u32) -> u32 { /// The `bs` parameter is expected to be a constant value and only the bottom 2 bits of `bs` are /// used. #[target_feature(enable = "zkne")] -// See #1464 -// #[cfg_attr(test, assert_instr(aes32esmi, BS = 0))] +#[cfg_attr(test, assert_instr(aes32esmi, BS = 0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes32esmi(rs1: u32, rs2: u32) -> u32 { static_assert!(BS < 4); @@ -106,10 +104,9 @@ pub fn aes32esmi(rs1: u32, rs2: u32) -> u32 { /// The `BS` parameter is expected to be a constant value and only the bottom 2 bits of `bs` are /// used. #[target_feature(enable = "zknd")] -// See #1464 -// #[cfg_attr(test, assert_instr(aes32dsi, BS = 0))] +#[cfg_attr(test, assert_instr(aes32dsi, BS = 0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes32dsi(rs1: u32, rs2: u32) -> u32 { static_assert!(BS < 4); @@ -134,10 +131,9 @@ pub fn aes32dsi(rs1: u32, rs2: u32) -> u32 { /// The `BS` parameter is expected to be a constant value and only the bottom 2 bits of `bs` are /// used. #[target_feature(enable = "zknd")] -// See #1464 -// #[cfg_attr(test, assert_instr(aes32dsmi, BS = 0))] +#[cfg_attr(test, assert_instr(aes32dsmi, BS = 0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes32dsmi(rs1: u32, rs2: u32) -> u32 { static_assert!(BS < 4); @@ -159,10 +155,9 @@ pub fn aes32dsmi(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.31 #[target_feature(enable = "zknh")] -// See #1464 -// #[cfg_attr(test, assert_instr(sha512sig0h))] +#[cfg_attr(test, assert_instr(sha512sig0h))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig0h(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sig0h(rs1, rs2) } } @@ -182,10 +177,9 @@ pub fn sha512sig0h(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.32 #[target_feature(enable = "zknh")] -// See #1464 -// #[cfg_attr(test, assert_instr(sha512sig0l))] +#[cfg_attr(test, assert_instr(sha512sig0l))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig0l(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sig0l(rs1, rs2) } } @@ -205,10 +199,9 @@ pub fn sha512sig0l(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.33 #[target_feature(enable = "zknh")] -// See #1464 -// #[cfg_attr(test, assert_instr(sha512sig1h))] +#[cfg_attr(test, assert_instr(sha512sig1h))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig1h(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sig1h(rs1, rs2) } } @@ -230,7 +223,7 @@ pub fn sha512sig1h(rs1: u32, rs2: u32) -> u32 { #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha512sig1l))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig1l(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sig1l(rs1, rs2) } } @@ -249,10 +242,9 @@ pub fn sha512sig1l(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.35 #[target_feature(enable = "zknh")] -// See #1464 -// #[cfg_attr(test, assert_instr(sha512sum0r))] +#[cfg_attr(test, assert_instr(sha512sum0r))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sum0r(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sum0r(rs1, rs2) } } @@ -271,10 +263,9 @@ pub fn sha512sum0r(rs1: u32, rs2: u32) -> u32 { /// /// Section: 3.36 #[target_feature(enable = "zknh")] -// See #1464 -// #[cfg_attr(test, assert_instr(sha512sum1r))] +#[cfg_attr(test, assert_instr(sha512sum1r))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sum1r(rs1: u32, rs2: u32) -> u32 { unsafe { _sha512sum1r(rs1, rs2) } } diff --git a/crates/core_arch/src/riscv64/mod.rs b/crates/core_arch/src/riscv64/mod.rs index 8301ea2b23..d5b765b7fe 100644 --- a/crates/core_arch/src/riscv64/mod.rs +++ b/crates/core_arch/src/riscv64/mod.rs @@ -4,10 +4,10 @@ use crate::arch::asm; mod zb; mod zk; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] pub use zb::*; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub use zk::*; /// Loads virtual machine memory by unsigned word integer diff --git a/crates/core_arch/src/riscv64/zb.rs b/crates/core_arch/src/riscv64/zb.rs index 95c6fdf9cd..330a0727a8 100644 --- a/crates/core_arch/src/riscv64/zb.rs +++ b/crates/core_arch/src/riscv64/zb.rs @@ -33,7 +33,7 @@ unsafe extern "llvm-intrinsic" { /// Version: v1.0.1 /// /// Section: 3.47 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkx")] #[cfg_attr(test, assert_instr(xperm8))] #[inline] @@ -53,7 +53,7 @@ pub fn xperm8_64(rs1: u64, rs2: u64) -> u64 { /// Version: v1.0.1 /// /// Section: 3.48 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkx")] #[cfg_attr(test, assert_instr(xperm4))] #[inline] @@ -72,7 +72,7 @@ pub fn xperm4_64(rs1: u64, rs2: u64) -> u64 { /// Version: v1.0.0 /// /// Section: 2.24 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbb")] #[cfg_attr(test, assert_instr(orc.b))] #[inline] @@ -89,7 +89,7 @@ pub fn orc_b_64(rs: u64) -> u64 { /// Version: v1.0.0 /// /// Section: 2.11 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkc")] #[cfg_attr(test, assert_instr(clmul))] #[inline] @@ -106,7 +106,7 @@ pub fn clmul_64(rs1: u64, rs2: u64) -> u64 { /// Version: v1.0.0 /// /// Section: 2.12 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkc")] #[cfg_attr(test, assert_instr(clmulh))] #[inline] @@ -123,7 +123,7 @@ pub fn clmulh_64(rs1: u64, rs2: u64) -> u64 { /// Version: v1.0.0 /// /// Section: 2.13 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbc")] #[cfg_attr(test, assert_instr(clmulr))] #[inline] diff --git a/crates/core_arch/src/riscv64/zk.rs b/crates/core_arch/src/riscv64/zk.rs index 6903c2ae4f..c0095938c8 100644 --- a/crates/core_arch/src/riscv64/zk.rs +++ b/crates/core_arch/src/riscv64/zk.rs @@ -47,7 +47,7 @@ unsafe extern "llvm-intrinsic" { #[target_feature(enable = "zkne")] #[cfg_attr(test, assert_instr(aes64es))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64es(rs1: u64, rs2: u64) -> u64 { unsafe { _aes64es(rs1, rs2) } } @@ -67,7 +67,7 @@ pub fn aes64es(rs1: u64, rs2: u64) -> u64 { #[target_feature(enable = "zkne")] #[cfg_attr(test, assert_instr(aes64esm))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64esm(rs1: u64, rs2: u64) -> u64 { unsafe { _aes64esm(rs1, rs2) } } @@ -87,7 +87,7 @@ pub fn aes64esm(rs1: u64, rs2: u64) -> u64 { #[target_feature(enable = "zknd")] #[cfg_attr(test, assert_instr(aes64ds))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64ds(rs1: u64, rs2: u64) -> u64 { unsafe { _aes64ds(rs1, rs2) } } @@ -107,7 +107,7 @@ pub fn aes64ds(rs1: u64, rs2: u64) -> u64 { #[target_feature(enable = "zknd")] #[cfg_attr(test, assert_instr(aes64dsm))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64dsm(rs1: u64, rs2: u64) -> u64 { unsafe { _aes64dsm(rs1, rs2) } } @@ -131,7 +131,7 @@ pub fn aes64dsm(rs1: u64, rs2: u64) -> u64 { /// The `RNUM` parameter is expected to be a constant value inside the range of `0..=10`. #[target_feature(enable = "zkne_or_zknd")] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64ks1i(rs1: u64) -> u64 { static_assert!(RNUM <= 10); unsafe { @@ -163,7 +163,7 @@ pub fn aes64ks1i(rs1: u64) -> u64 { /// Section: 3.11 #[target_feature(enable = "zkne_or_zknd")] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64ks2(rs1: u64, rs2: u64) -> u64 { unsafe { let rd: u64; @@ -197,7 +197,7 @@ pub fn aes64ks2(rs1: u64, rs2: u64) -> u64 { #[target_feature(enable = "zknd")] #[cfg_attr(test, assert_instr(aes64im))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn aes64im(rs1: u64) -> u64 { unsafe { _aes64im(rs1) } } @@ -217,7 +217,7 @@ pub fn aes64im(rs1: u64) -> u64 { #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha512sig0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig0(rs1: u64) -> u64 { unsafe { _sha512sig0(rs1) } } @@ -237,7 +237,7 @@ pub fn sha512sig0(rs1: u64) -> u64 { #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha512sig1))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sig1(rs1: u64) -> u64 { unsafe { _sha512sig1(rs1) } } @@ -257,7 +257,7 @@ pub fn sha512sig1(rs1: u64) -> u64 { #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha512sum0))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sum0(rs1: u64) -> u64 { unsafe { _sha512sum0(rs1) } } @@ -277,7 +277,7 @@ pub fn sha512sum0(rs1: u64) -> u64 { #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha512sum1))] #[inline] -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub fn sha512sum1(rs1: u64) -> u64 { unsafe { _sha512sum1(rs1) } } diff --git a/crates/core_arch/src/riscv_shared/mod.rs b/crates/core_arch/src/riscv_shared/mod.rs index f3933f58b1..669f0884ea 100644 --- a/crates/core_arch/src/riscv_shared/mod.rs +++ b/crates/core_arch/src/riscv_shared/mod.rs @@ -30,9 +30,9 @@ mod zk; #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] pub use p::*; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] pub use zb::*; -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] pub use zk::*; use crate::arch::asm; diff --git a/crates/core_arch/src/riscv_shared/zb.rs b/crates/core_arch/src/riscv_shared/zb.rs index 04a42f0235..f1b8d395f4 100644 --- a/crates/core_arch/src/riscv_shared/zb.rs +++ b/crates/core_arch/src/riscv_shared/zb.rs @@ -20,7 +20,7 @@ unsafe extern "llvm-intrinsic" { /// Version: v1.0.0 /// /// Section: 2.24 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbb")] #[cfg_attr(test, assert_instr(orc.b))] #[inline] @@ -37,7 +37,7 @@ pub fn orc_b_32(rs: u32) -> u32 { /// Version: v1.0.0 /// /// Section: 2.11 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zb", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zbkc")] #[cfg_attr(test, assert_instr(clmul))] #[inline] diff --git a/crates/core_arch/src/riscv_shared/zk.rs b/crates/core_arch/src/riscv_shared/zk.rs index 9902dbabf5..1d273ecee3 100644 --- a/crates/core_arch/src/riscv_shared/zk.rs +++ b/crates/core_arch/src/riscv_shared/zk.rs @@ -42,7 +42,7 @@ unsafe extern "llvm-intrinsic" { /// Version: v1.0.1 /// /// Section: 3.27 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha256sig0))] #[inline] @@ -65,7 +65,7 @@ pub fn sha256sig0(rs1: u32) -> u32 { /// Version: v1.0.1 /// /// Section: 3.28 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha256sig1))] #[inline] @@ -88,7 +88,7 @@ pub fn sha256sig1(rs1: u32) -> u32 { /// Version: v1.0.1 /// /// Section: 3.29 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha256sum0))] #[inline] @@ -111,7 +111,7 @@ pub fn sha256sum0(rs1: u32) -> u32 { /// Version: v1.0.1 /// /// Section: 3.30 -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zknh")] #[cfg_attr(test, assert_instr(sha256sum1))] #[inline] @@ -184,7 +184,7 @@ pub fn sha256sum1(rs1: u32) -> u32 { /// return c3; // c3 represents c[0..=3] /// # } /// ``` -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zksed")] #[cfg_attr(test, assert_instr(sm4ed, BS = 0))] #[inline] @@ -259,7 +259,7 @@ pub fn sm4ed(rs1: u32, rs2: u32) -> u32 { /// return c3; // c3 represents c[0..=3] /// # } /// ``` -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zksed")] #[cfg_attr(test, assert_instr(sm4ks, BS = 0))] #[inline] @@ -296,7 +296,7 @@ pub fn sm4ks(rs1: u32, rs2: u32) -> u32 { /// In the SM3 algorithm, the `P0` transformation is used as `E ← P0(TT2)` when the /// compression function `CF` uses the intermediate value `TT2` to calculate /// the variable `E` in one iteration for subsequent processes. -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zksh")] #[cfg_attr(test, assert_instr(sm3p0))] #[inline] @@ -337,7 +337,7 @@ pub fn sm3p0(rs1: u32) -> u32 { /// Wj ← P1(Wj−16 ⊕ Wj−9 ⊕ (Wj−3 ≪ 15)) ⊕ (Wj−13 ≪ 7) ⊕ Wj−6 /// ENDFOR /// ``` -#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] +#[stable(feature = "stdarch_riscv_zk", since = "CURRENT_RUSTC_VERSION")] #[target_feature(enable = "zksh")] #[cfg_attr(test, assert_instr(sm3p1))] #[inline]