Re: [PATCH v4 2/4] bpf: use %t after the remaining mnemonics in the opcode table
Project / Subsystem
binutils / bpf
Date
2026-09-08
Proposer
"Jose E. Marchesi" <jemarch@gnu.org>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Improves parsing robustness and prevents future bugs related to mnemonic ambiguity.
- • Introduces stricter parsing, potentially breaking existing assembly files that relied on the previous flexible spacing (though mitigated by test cases).
- • Increases accuracy in distinguishing mnemonics from immediate operands.
All attributes
- project
- binutils
- subsystem
- bpf
- patch_id
- —
- discussion_id
- 87jyovsy9j.fsf@gnu.org
- source_type
- public_inbox
- title
- Re: [PATCH v4 2/4] bpf: use %t after the remaining mnemonics in the opcode table
- headline
- BPF gas: Use %t for literal mnemonics
- tldr
- BPF gas mnemonics now use %t specifier for precise parsing, preventing accidental instruction extension.
- proposer
- "Jose E. Marchesi" <jemarch@gnu.org>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Improves parsing robustness and prevents future bugs related to mnemonic ambiguity.
- • Introduces stricter parsing, potentially breaking existing assembly files that relied on the previous flexible spacing (though mitigated by test cases).
- • Increases accuracy in distinguishing mnemonics from immediate operands.
- series_id
- binutils:bpf: use %t after the remaining mnemonics in the opcode table
- series_role
- reply
- series_parts
-
- • {"title":"bpf: use %t after the remaining mnemonics in the opcode table","url":"https://inbox.sourceware.org/binutils/20260908062940.2734221-3-vineet.gupta@linux.dev"}
- • {"title":"bpf: use %t after the remaining mnemonics in the opcode table","url":"https://inbox.sourceware.org/binutils/20260907091102.2595057-4-vineet.gupta@linux.dev"}
- tags
-
- • BPF
- • gas
- • assembler
- • parsing
- • opcode table
- bugzilla_url
- —
- date
- 2026-09-08T00:00:00.000Z
Re: [PATCH v4 2/4] bpf: use %t after the remaining mnemonics in the opcode table
This patch modifies the BPF assembler’s opcode table to use the %t specifier after literal mnemonics. This change, prompted by a previous bug (PR gas/34558), ensures that mnemonics like if, lock, call, etc., are treated as distinct tokens and prevent subsequent tokens from being misinterpreted as part of the mnemonic. This improves parsing accuracy and future-proofs the opcode table against new instruction additions.