diff options
| author | Tsukasa OI <floss_rust@irq.a4lg.com> | 2025-04-11 01:13:44 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2025-04-16 00:56:48 +0000 |
| commit | ed2d3ee924058d4f28e3a5cdbfe5022e927bd223 (patch) | |
| tree | 3db79e748395f60c33fe308cd57457bf2e04196c /library/stdarch/crates/std_detect/src | |
| parent | 68c54c19be34ca141f5bae6bc92895e15b5caf39 (diff) | |
| download | rust-ed2d3ee924058d4f28e3a5cdbfe5022e927bd223.tar.gz rust-ed2d3ee924058d4f28e3a5cdbfe5022e927bd223.zip | |
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").
Diffstat (limited to 'library/stdarch/crates/std_detect/src')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/arch/riscv.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/arch/riscv.rs b/library/stdarch/crates/std_detect/src/detect/arch/riscv.rs index 271700aefa6..4b1cbdcda5a 100644 --- a/library/stdarch/crates/std_detect/src/detect/arch/riscv.rs +++ b/library/stdarch/crates/std_detect/src/detect/arch/riscv.rs @@ -32,10 +32,9 @@ features! { /// * A: `"a"` /// * Zaamo: `"zaamo"` /// * Zalrsc: `"zalrsc"` - /// * Bit-Manipulation Extensions: + /// * B: `"b"` /// * Zba: `"zba"` /// * Zbb: `"zbb"` - /// * Zbc: `"zbc"` /// * Zbs: `"zbs"` /// * C: `"c"` /// * D: `"d"` @@ -54,6 +53,7 @@ features! { /// * Zdinx: `"zdinx"` /// * Zhinx: `"zhinx"` /// * Zhinxmin: `"zhinxmin"` + /// * Zbc: `"zbc"` /// * Zbkb: `"zbkb"` /// * Zbkc: `"zbkc"` /// * Zbkx: `"zbkx"` @@ -159,6 +159,9 @@ features! { @FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] c: "c"; /// "C" Extension for Compressed Instructions + @FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] b: "b"; + without cfg check: true; + /// "B" Extension for Bit Manipulation @FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zba: "zba"; /// "Zba" Extension for Address Generation @FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zbb: "zbb"; |
