about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTsukasa OI <floss_rust@irq.a4lg.com>2025-08-30 05:05:12 +0000
committerTsukasa OI <floss_rust@irq.a4lg.com>2025-09-03 02:13:35 +0000
commit46795337322b5852438417549a5fe9dce3f75479 (patch)
treebacc072638caed7844d3b8f340ecd80ccd410895
parent60874ec82085bae842e553b67dc1c313f21c7c2c (diff)
downloadrust-46795337322b5852438417549a5fe9dce3f75479.tar.gz
rust-46795337322b5852438417549a5fe9dce3f75479.zip
RISC-V: Lower requirements of `clmul` and `clmulh`
They don't need full "Zbc" extension but only its subset: the "Zbkc"
extension.  Since the compiler implies `zbkc` from `zbc`, it's safe to
use `#[target_feature(enable = "zbkc")]`.
-rw-r--r--library/stdarch/crates/core_arch/src/riscv_shared/zb.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/stdarch/crates/core_arch/src/riscv_shared/zb.rs b/library/stdarch/crates/core_arch/src/riscv_shared/zb.rs
index 9472e3c8be9..514afd90809 100644
--- a/library/stdarch/crates/core_arch/src/riscv_shared/zb.rs
+++ b/library/stdarch/crates/core_arch/src/riscv_shared/zb.rs
@@ -68,7 +68,7 @@ pub fn orc_b(rs: usize) -> usize {
 ///
 /// Section: 2.11
 #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")]
-#[target_feature(enable = "zbc")]
+#[target_feature(enable = "zbkc")]
 #[cfg_attr(test, assert_instr(clmul))]
 #[inline]
 pub fn clmul(rs1: usize, rs2: usize) -> usize {
@@ -93,7 +93,7 @@ pub fn clmul(rs1: usize, rs2: usize) -> usize {
 ///
 /// Section: 2.12
 #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")]
-#[target_feature(enable = "zbc")]
+#[target_feature(enable = "zbkc")]
 #[cfg_attr(test, assert_instr(clmulh))]
 #[inline]
 pub fn clmulh(rs1: usize, rs2: usize) -> usize {