mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
reorder all RISC-V features for maintenance
All RISC-V Features are reordered for better maintainability. The author has a plan to add many RISC-V ratified extensions (mainly discoverable from Linux) and this is a part of preparation. Sections are divided as follows: * Base ISAs * "I"-related * Extensions formerly a part of the base "I" extension but divided later (now all of them are ratified). * Other user-mode extensions "Zi*". * "M"-related (currently "M" only) * "A"-related "A", "Za*" and "Ztso" which is named differently but absolutely related to memory operations. * Base FP extensions * Base FP extensions using integer registers * "C"-related (currently "C" only) * "B"-related (except cryptography-related "Zbk*") * Scalar cryptography extensions (including "Zbk*") * Base Vector extensions (currently "V" only) * Ratified privileged extensions * Non-extensions and non-ratified extensions which is *not* going to be ratified, at least in the draft form The last section needs some explanation. "S" is not an extension (although some buggy implementations such as QEMU up to 7.0 emitted this character as well as "U" as an extension) and the DeviceTree parser in the Linux kernel explicitly workarounds this issue. There's no plan for ratification of the single-letter "J" extension (there's a room for redefinition like the "B" extension but unlikely). Instead, pointer masking extensions including "Supm" is one of the results of the task group discussing J extension*s*. There's also an instruction in the "Zfa" extension which accelerates FP-to-int conversion matching JavaScript semantics. "P" is being actively discussed (and will result in a single-letter "P" extension and various "Zp*" extensions) but it seems there needs some time until ratification. And there's one Rust-specific issue: Rust implements Packed-SIMD intrinsics based on an early draft of the "P" extension and they are *very unlikely* kept as-is. For instance, `add16` does not follow standard RISC-V instruction naming (ADD16 is the name from the Andes' proposal) and going to be renamed. Before moving "P" to above, we have to clearly understand what the final "P" extension will be and resolve existing intrinsics.
This commit is contained in:
parent
5feb3c989e
commit
14fc81b85f
@ -89,22 +89,20 @@ features! {
|
||||
///
|
||||
/// [ISA manual]: https://github.com/riscv/riscv-isa-manual/
|
||||
#[stable(feature = "riscv_ratified", since = "1.78.0")]
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv32i: "rv32i";
|
||||
without cfg check: true;
|
||||
/// RV32I Base Integer Instruction Set
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zifencei: "zifencei";
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv32e: "rv32e";
|
||||
without cfg check: true;
|
||||
/// "Zifencei" Instruction-Fetch Fence
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zihintpause: "zihintpause";
|
||||
without cfg check: true;
|
||||
/// "Zihintpause" Pause Hint
|
||||
/// RV32E Base Integer Instruction Set
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv64i: "rv64i";
|
||||
without cfg check: true;
|
||||
/// RV64I Base Integer Instruction Set
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] m: "m";
|
||||
/// "M" Standard Extension for Integer Multiplication and Division
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] a: "a";
|
||||
/// "A" Standard Extension for Atomic Instructions
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv128i: "rv128i";
|
||||
without cfg check: true;
|
||||
/// RV128I Base Integer Instruction Set
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zicsr: "zicsr";
|
||||
without cfg check: true;
|
||||
/// "Zicsr", Control and Status Register (CSR) Instructions
|
||||
@ -114,6 +112,26 @@ features! {
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zihpm: "zihpm";
|
||||
without cfg check: true;
|
||||
/// "Zihpm", Standard Extension for Hardware Performance Counters
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zifencei: "zifencei";
|
||||
without cfg check: true;
|
||||
/// "Zifencei" Instruction-Fetch Fence
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zihintpause: "zihintpause";
|
||||
without cfg check: true;
|
||||
/// "Zihintpause" Pause Hint
|
||||
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] m: "m";
|
||||
/// "M" Standard Extension for Integer Multiplication and Division
|
||||
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] a: "a";
|
||||
/// "A" Standard Extension for Atomic Instructions
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zam: "zam";
|
||||
without cfg check: true;
|
||||
/// "Zam" Standard Extension for Misaligned Atomics
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] ztso: "ztso";
|
||||
without cfg check: true;
|
||||
/// "Ztso" Standard Extension for Total Store Ordering
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] f: "f";
|
||||
/// "F" Standard Extension for Single-Precision Floating-Point
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] d: "d";
|
||||
@ -121,8 +139,10 @@ features! {
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] q: "q";
|
||||
without cfg check: true;
|
||||
/// "Q" Standard Extension for Quad-Precision Floating-Point
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] c: "c";
|
||||
/// "C" Standard Extension for Compressed Instructions
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zfh: "zfh";
|
||||
/// "Zfh" Standard Extension for 16-Bit Half-Precision Floating-Point
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zfhmin: "zfhmin";
|
||||
/// "Zfhmin" Standard Extension for Minimal Half-Precision Floating-Point Support
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zfinx: "zfinx";
|
||||
/// "Zfinx" Standard Extension for Single-Precision Floating-Point in Integer Registers
|
||||
@ -132,47 +152,9 @@ features! {
|
||||
/// "Zhinx" Standard Extension for Half-Precision Floating-Point in Integer Registers
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zhinxmin: "zhinxmin";
|
||||
/// "Zhinxmin" Standard Extension for Minimal Half-Precision Floating-Point in Integer Registers
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] ztso: "ztso";
|
||||
without cfg check: true;
|
||||
/// "Ztso" Standard Extension for Total Store Ordering
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv32e: "rv32e";
|
||||
without cfg check: true;
|
||||
/// RV32E Base Integer Instruction Set
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] rv128i: "rv128i";
|
||||
without cfg check: true;
|
||||
/// RV128I Base Integer Instruction Set
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zfh: "zfh";
|
||||
/// "Zfh" Standard Extension for 16-Bit Half-Precision Floating-Point
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zfhmin: "zfhmin";
|
||||
/// "Zfhmin" Standard Extension for Minimal Half-Precision Floating-Point Support
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] j: "j";
|
||||
without cfg check: true;
|
||||
/// "J" Standard Extension for Dynamically Translated Languages
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] p: "p";
|
||||
without cfg check: true;
|
||||
/// "P" Standard Extension for Packed-SIMD Instructions
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] v: "v";
|
||||
/// "V" Standard Extension for Vector Operations
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] zam: "zam";
|
||||
without cfg check: true;
|
||||
/// "Zam" Standard Extension for Misaligned Atomics
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] s: "s";
|
||||
without cfg check: true;
|
||||
/// Supervisor-Level ISA
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svnapot: "svnapot";
|
||||
without cfg check: true;
|
||||
/// "Svnapot" Standard Extension for NAPOT Translation Contiguity
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svpbmt: "svpbmt";
|
||||
without cfg check: true;
|
||||
/// "Svpbmt" Standard Extension for Page-Based Memory Types
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svinval: "svinval";
|
||||
without cfg check: true;
|
||||
/// "Svinval" Standard Extension for Fine-Grained Address-Translation Cache Invalidation
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] h: "h";
|
||||
without cfg check: true;
|
||||
/// Hypervisor Extension
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] c: "c";
|
||||
/// "C" Standard Extension for Compressed Instructions
|
||||
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zba: "zba";
|
||||
/// "Zba" Standard Extension for Address Generation Instructions
|
||||
@ -209,4 +191,30 @@ features! {
|
||||
/// "Zk" Standard Extension for Standard scalar cryptography extension
|
||||
@FEATURE: #[stable(feature = "riscv_ratified", since = "1.78.0")] zkt: "zkt";
|
||||
/// "Zkt" Standard Extension for Data Independent Execution Latency
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] v: "v";
|
||||
/// "V" Standard Extension for Vector Operations
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svnapot: "svnapot";
|
||||
without cfg check: true;
|
||||
/// "Svnapot" Standard Extension for NAPOT Translation Contiguity
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svpbmt: "svpbmt";
|
||||
without cfg check: true;
|
||||
/// "Svpbmt" Standard Extension for Page-Based Memory Types
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] svinval: "svinval";
|
||||
without cfg check: true;
|
||||
/// "Svinval" Standard Extension for Fine-Grained Address-Translation Cache Invalidation
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] h: "h";
|
||||
without cfg check: true;
|
||||
/// Hypervisor Extension
|
||||
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] s: "s";
|
||||
without cfg check: true;
|
||||
/// Supervisor-Level ISA
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] j: "j";
|
||||
without cfg check: true;
|
||||
/// "J" Standard Extension for Dynamically Translated Languages
|
||||
@FEATURE: #[unstable(feature = "stdarch_riscv_feature_detection", issue = "111192")] p: "p";
|
||||
without cfg check: true;
|
||||
/// "P" Standard Extension for Packed-SIMD Instructions
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user