binutils Newspaper
JUNE 15, 2026
risc-v Proposed

RISC-V: Add dedicated vector arithmetic .insn forms

Adds more dedicated .insn forms for RISC-V vector arithmetic instructions to simplify their use in assembly.

This patch adds dedicated .insn forms for RISC-V vector arithmetic instructions, aiming to make assembly code easier to write and read. The patch introduces new forms for the OP_V opcode. The author is seeking feedback on naming conventions for future OP_VE instructions and on the possibility of adding forms with immediates for encoding VUNARY instructions.

In Details

The RISC-V GNU assembler uses .insn directives to define custom assembly instructions. This patch extends the existing instruction definitions in gas/config/tc-riscv.c to include more specific forms for vector arithmetic operations (OP_V). The goal is to simplify the use of these instructions by providing more intuitive operand combinations.

For Context

The GNU assembler translates human-readable assembly code into machine code that a computer can execute. Assembler directives like .insn allow developers to define custom instructions with specific operand types and encodings. This patch enhances the RISC-V assembler by adding new instruction forms for vector operations, making it easier to write assembly code that utilizes RISC-V's vector processing capabilities.

Filed Under: risc-vassemblervectorization.insn