RISC-V assembler now implies Zicsr extension for supervisor ISA
RISC-V assembler: "Ss" now implies "Zicsr" for supervisor ISA support.
The RISC-V assembler now correctly implies the Zicsr extension when the supervisor ISA subset “Ss” is selected. This ensures that selecting a supervisor ISA version on RV64I is sufficient to assemble Control and Status Register (CSR) access instructions, which are required for supervisor operations.
In Details
This change modifies the riscv_implicit_subsets table in bfd/elfxx-riscv.c. The Ss subset, representing supervisor functionality, now has an explicit dependency on Zicsr (CSR instructions). This aligns the assembler's understanding of RISC-V profiles with the supervisor architecture requirements, ensuring correct instruction encoding and ELF attribute generation for supervisor-mode code.
- RISC-V
- An open-standard instruction set architecture (ISA) based on Reduced Instruction Set Computing principles.
- Zicsr
- A RISC-V standard extension that adds instructions for accessing Control and Status Registers (CSRs). CSRs control various aspects of the processor's operation and state.
- Ss
- A RISC-V ISA subset that indicates supervisor-level functionality. This implies the need for instructions and features used in operating system kernels and other privileged software.
- RV64I
- The base integer instruction set for 64-bit RISC-V processors.
- CSR
- Control and Status Register. Special-purpose registers used to control processor behavior and report status.
- GAS
- The GNU Assembler, part of the GNU Binutils project.
- ELF
- Executable and Linkable Format. A common standard file format for executables, object code, shared libraries, and core dumps on Unix-like systems.