binutils Newspaper
JUNE 15, 2026
risc-v Ready to Land

RISC-V: improve .insn documentation

Updates documentation for the .insn directive in the RISC-V assembler to clarify syntax and reflect current mapping symbol support.

This patch updates the documentation for the .insn directive in the RISC-V assembler. It removes the incorrect comma from the documented syntax and updates the .word related text to reflect the current support for mapping symbols. The documentation change improves clarity and accuracy for developers using the .insn directive.

In the Thread 1 participant
  1. Jiawei <jiawei@iscas.ac.cn> reviewer

    Acknowledges the correctness of the patch and points out a minor grammatical issue in pre-existing documentation.

    “LGTM. While reading the patch, I noticed one small pre-existing nit: "an instructions" could be changed to "an instruction". This is not introduced by this patch, though.”

In Details

This patch modifies gas/doc/c-riscv.texi, which documents RISC-V-specific assembler directives for GNU AS. The .insn directive allows specifying instructions numerically, and the documentation is being updated to reflect current syntax and the use of mapping symbols.

For Context

The GNU Assembler (gas) converts assembly code into machine code. Assembler directives are special commands that control the assembly process. The .insn directive allows developers to directly specify instruction encodings. This patch updates the documentation for the RISC-V .insn directive to ensure it's accurate and reflects current assembler behavior.

Filed Under: risc-vassemblerdocumentation.insn directive