binutils Newspaper
NOVEMBER 30, 2026
risc-v — Proposed

RISC-V: Remove the N extension CSRs

Removes definitions for RISC-V N extension CSRs as they are obsolete in the current privileged spec.

This patch removes the definitions for the RISC-V N extension Control and Status Registers (CSRs), such as ustatus and sedeleg, from the opcode header file. These CSRs were deprecated and removed in privileged spec version 1.12. As the toolchain now defaults to privileged spec 1.13, these definitions are obsolete. The assembler will now report them as unknown CSRs, and the disassembler already handles them by printing their numeric values.

In the Thread 1 participant
  1. Kito Cheng <kito.cheng@sifive.com> proposer

    Removes obsolete RISC-V N extension CSR definitions from include/opcode/riscv-opc.h, as they are no longer valid in privileged spec 1.13.

    “The N extension CSRs (ustatus, uie, utvec, uscratch, uepc, ucause, utval, uip, sedeleg and sideleg) were removed in the privileged spec 1.12. Now that the privileged spec is always 1.13, they are never valid, so remove them.”

In Details

This patch cleans up the RISC-V opcode definitions by removing obsolete N extension CSRs (e.g., CSR_USTATUS, CSR_SEDELEG). These CSRs were part of earlier privileged spec versions but were removed in spec 1.12. Since the toolchain is now based on spec 1.13, these definitions are vestigial. Their removal simplifies the opcode definitions and ensures that the assembler correctly flags attempts to use these non-existent CSRs as errors.

For Context
CSR
Control and Status Register. Special registers in RISC-V used for system control and status information.
N extension
A RISC-V extension that historically defined certain Control and Status Registers (CSRs) related to supervisor mode. It has been superseded and its CSRs removed in later specifications.
privileged spec
Defines the base instruction set and extensions related to system-level privileges in RISC-V architecture, including aspects like Control and Status Registers (CSRs) and memory management.
assembler
A program that translates assembly language code into machine code (object code).
disassembler
A program that translates machine code (object code) back into assembly language.
Filed Under: risc-vbinutilscsrisa