Landing: d57359627500

Project / Subsystem

binutils / binutils/gas/risc-v

Date

2026-06-05

Author

Jan Beulich <jbeulich@sourceware.org>

Commit

d573596275005ee7c003353e02a1198524889a4a

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
binutils/gas/risc-v
patch_id
commit_hash
d573596275005ee7c003353e02a1198524889a4a
source_type
public_inbox
headline
RISC-V `riscv_ip()` code for `.insn` operands simplifies.
tldr
Binutils RISC-V assembler now uses a single, shared code path for parsing 'F' and 'O' operands of the `.insn` directive, improving modularity and maintainabili…
author
Jan Beulich <jbeulich@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • assembler
  • refactoring
  • code-quality
discussion_id_link
bugzilla_pr
date
2026-06-05T00:00:00.000Z

The RISC-V assembler’s riscv_ip() function, responsible for parsing operands of the .insn directive, has been refactored to remove redundant code. Previously, the parsing logic for ‘F’ and ‘O’ operands was duplicated. Now, common code handles the initial parsing, with a smaller, inner switch statement managing the value insertion specific to each operand type, making it easier to add new operand sub-forms in the future.