From 88d1dcfff15331dbdb4697c11038490bc44e66a8 Mon Sep 17 00:00:00 2001 From: tux3 Date: Sun, 13 Apr 2025 14:07:14 +0200 Subject: [PATCH] feat: RISC-V target feature B; implies Zba, Zbb, Zbs zba, zbb, and zbs are already stable, B is a convenient alias for all three, so it seems reasonable to stabilize it as well. The fourth bitmanip extension, Zbc, is not implied by B. --- compiler/rustc_target/src/target_features.rs | 1 + tests/ui/check-cfg/target_feature.stderr | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index b4ec1879fed5c..07e2f03617ca3 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -491,6 +491,7 @@ const MIPS_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ static RISCV_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ // tidy-alphabetical-start ("a", Stable, &["zaamo", "zalrsc"]), + ("b", Stable, &["zba", "zbb", "zbs"]), ("c", Stable, &[]), ("d", Unstable(sym::riscv_target_feature), &["f"]), ("e", Unstable(sym::riscv_target_feature), &[]), diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr index aa5fd09c0c7bb..897dab7f72b3a 100644 --- a/tests/ui/check-cfg/target_feature.stderr +++ b/tests/ui/check-cfg/target_feature.stderr @@ -49,6 +49,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE"); `avxvnni` `avxvnniint16` `avxvnniint8` +`b` `backchain` `bf16` `bmi1`