binutils Newspaper
NOVEMBER 30, 2026
risc-v — Proposed

RISC-V: Make Ss imply Zicsr

Ensures that RISC-V supervisor profiles (Ss) automatically imply the Zicsr extension in binutils.

This is the third patch in a series, making the ‘Ss’ (Supervisor ISA) RISC-V profiles imply the ‘Zicsr’ extension. This change ensures that selecting a supervisor ISA version on RV64I automatically enables CSR access instructions. The modifications are in BFD’s ELF handling and are accompanied by new GAS test cases to verify the implied Zicsr functionality for different supervisor versions.

In Details

This patch modifies binutils' RISC-V support to establish an implication relationship: the 'Ss' (Supervisor ISA) profiles now implicitly include the 'Zicsr' extension. This is necessary because supervisor architecture features rely on Control and Status Register (CSR) instructions. By adding this implication in bfd/elfxx-riscv.c (riscv_implicit_subsets), users specifying a supervisor profile (e.g., rv64i_ss1p11) do not need to explicitly list +zicsr to assemble CSR instructions. New tests are added to GAS to confirm this behavior.

For Context
Ss
RISC-V Supervisor ISA profiles, indicating support for supervisor-level operations.
Zicsr
A RISC-V extension that provides instructions for accessing Control and Status Registers (CSRs).
RV64I
The base integer instruction set for the 64-bit RISC-V architecture.
CSR
Control and Status Register; special-purpose registers used by the processor for configuration and monitoring.
BFD
Binary File Descriptor library.
GAS
The GNU Assembler.
Implication
In ISA definitions, when one extension or feature is automatically included if another is selected.
Filed Under: risc-visaassemblerlinkersupervisor