Skip to content

Commit f86b31e

Browse files
a4lgAmanieu
authored andcommitted
RISC-V: Add placeholder for the "B" extension
The "B" extension is once abandoned (instead, it is ratified as a collection of "Zb*" extensions). However, it is later redefined and ratified as a superset of "Zba", "Zbb" and "Zbs" extensions (but not "Zbc" carry-less multiplication for limited benefits and implementation cost). Although non-functional (because feature detection is not yet implemented), it provides the foundation to implement this extension (along with straightforward documentation showing subsets of "B").
1 parent 1fe6492 commit f86b31e

File tree

1 file changed

+5
-2
lines changed
  • crates/std_detect/src/detect/arch

1 file changed

+5
-2
lines changed

crates/std_detect/src/detect/arch/riscv.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ features! {
3232
/// * A: `"a"`
3333
/// * Zaamo: `"zaamo"`
3434
/// * Zalrsc: `"zalrsc"`
35-
/// * Bit-Manipulation Extensions:
35+
/// * B: `"b"`
3636
/// * Zba: `"zba"`
3737
/// * Zbb: `"zbb"`
38-
/// * Zbc: `"zbc"`
3938
/// * Zbs: `"zbs"`
4039
/// * C: `"c"`
4140
/// * D: `"d"`
@@ -54,6 +53,7 @@ features! {
5453
/// * Zdinx: `"zdinx"`
5554
/// * Zhinx: `"zhinx"`
5655
/// * Zhinxmin: `"zhinxmin"`
56+
/// * Zbc: `"zbc"`
5757
/// * Zbkb: `"zbkb"`
5858
/// * Zbkc: `"zbkc"`
5959
/// * Zbkx: `"zbkx"`
@@ -159,6 +159,9 @@ features! {
159159
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] c: "c";
160160
/// "C" Extension for Compressed Instructions
161161
162+
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] b: "b";
163+
without cfg check: true;
164+
/// "B" Extension for Bit Manipulation
162165
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zba: "zba";
163166
/// "Zba" Extension for Address Generation
164167
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zbb: "zbb";

0 commit comments

Comments
 (0)