RISC-V: Remove the privileged spec classes
Removes outdated privileged spec classes and related code from binutils for RISC-V.
This patch, part of a series, removes the PRIV_SPEC_CLASS_* definitions and related functions from binutils for the RISC-V architecture. The move is justified because the privileged specification version is now consistently 1.13, and no remaining Control and Status Registers (CSRs) depend on older versions. This simplifies the code by eliminating obsolete checks and tables, affecting assembler, disassembler, and GDB.
- proposer
Submits patch 4/5 to remove obsolete privileged specification classes and associated code from binutils for RISC-V, as the version is now stable at 1.13.
“The privileged spec is always 1.13 now, and no remaining CSR depends on the privileged spec version. So remove PRIV_SPEC_CLASS_*, the riscv_priv_specs table and riscv_get_priv_spec_class_from_numbers.”
In Details
This patch simplifies the RISC-V support in binutils by removing obsolete privileged specification class definitions (PRIV_SPEC_CLASS_*). The rationale is that the privileged ISA specification version is now stable at 1.13, and no CSRs are sensitive to older versions. This eliminates the need for version checking in the assembler and disassembler, and updates related code in GDB and binutils/dwarf.c where DECLARE_CSR usage has changed.
- RISC-V
- An open-source instruction set architecture (ISA) that allows for modularity and extensibility.
- privileged spec
- Refers to the specification defining the privileged architecture modes and features of the RISC-V ISA, including memory management and access control.
- CSR
- Control and Status Register. Special registers in a processor used for system control, status monitoring, and configuration.
- assembler
- A program that translates assembly language into machine code.
- disassembler
- A program that translates machine code back into assembly language.
- dwarf.c
- A source file likely related to DWARF (Debugging With Attributed Record Formats) debugging information, used by compilers and debuggers.
- DECLARE_CSR
- A macro or function used in code to declare or define a Control and Status Register.