Re: [PATCH 04/19] RISC-V: match_*() improvements
Project / Subsystem
binutils / risc-v
Date
2026-04-28
Proposer
Jiawei <jiawei@iscas.ac.cn>
Source type
public_inbox
Consensus
Ready to Land
Sentiment
—/10
Technical tradeoffs
- • Adds an assertion that will halt execution if `match_rs1_nonzero` is not used in macro context.
- • Slightly modifies instruction matching logic to avoid opcode matching for macro instructions, which could have subtle performance implications.
- • Improves the correctness of macro instruction matching.
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- c1799431-3096-424c-8dbd-ba2116a57dcc@iscas.ac.cn
- source_type
- public_inbox
- title
- Re: [PATCH 04/19] RISC-V: match_*() improvements
- headline
- RISC-V: match_*() improvements
- tldr
- For RISC-V, macro instruction matching functions now assert macro-only usage and avoid potentially incorrect opcode matching due to macro enumeration changes.
- proposer
- Jiawei <jiawei@iscas.ac.cn>
- consensus
- Ready to Land
- outcome
- ready
- sentiment_score
- —
- technical_tradeoffs
-
- • Adds an assertion that will halt execution if `match_rs1_nonzero` is not used in macro context.
- • Slightly modifies instruction matching logic to avoid opcode matching for macro instructions, which could have subtle performance implications.
- • Improves the correctness of macro instruction matching.
- series_id
- binutils:risc-v: match_*() improvements
- series_role
- reply
- series_parts
- []
- tags
-
- • risc-v
- • assembler
- • macros
- • instruction matching
- bugzilla_url
- —
- date
- 2026-04-28T00:00:00.000Z
Re: [PATCH 04/19] RISC-V: match_*() improvements
This patch improves the RISC-V instruction matching functions. It adds an assertion to match_rs1_nonzero() to ensure it’s only used by macro instructions. It also skips match_opcode() for macro entries to prevent false negatives when the macro enumeration changes. This change ensures the matching functions behave as expected when dealing with macro instructions.