bpf: diagnose instructions above the selected ISA spec

Project / Subsystem

binutils / bpf

Date

2026-09-08

Proposer

Vineet Gupta <vineet.gupta@linux.dev>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Provides much clearer error messages for ISA version mismatches.
  • • Increases the complexity of the `md_assemble` function.
  • • Ensures that valid instructions within the selected ISA are still correctly assembled.

All attributes

project
binutils
subsystem
bpf
patch_id
—
discussion_id
20260908062940.2734221-5-vineet.gupta@linux.dev
source_type
public_inbox
title
bpf: diagnose instructions above the selected ISA spec
headline
BPF gas: Diagnose instructions above selected ISA spec
tldr
BPF gas now provides clearer diagnostics for instructions requiring a higher ISA spec than selected.
proposer
Vineet Gupta <vineet.gupta@linux.dev>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Provides much clearer error messages for ISA version mismatches.
  • • Increases the complexity of the `md_assemble` function.
  • • Ensures that valid instructions within the selected ISA are still correctly assembled.
series_id
binutils:bpf: diagnose instructions above the selected isa spec
series_role
reply
series_parts
  • • {"title":"bpf: diagnose instructions above the selected ISA spec","url":"https://inbox.sourceware.org/binutils/20260907091102.2595057-6-vineet.gupta@linux.dev"}
tags
  • • BPF
  • • gas
  • • assembler
  • • diagnostics
  • • ISA
bugzilla_url
—
date
2026-09-08T00:00:00.000Z

bpf: diagnose instructions above the selected ISA spec

This patch enhances the BPF assembler’s error reporting. Previously, using an instruction not available in the selected ISA spec resulted in misleading errors, such as ‘unrecognized instruction’ or ‘expected white space’. The updated md_assemble function now attempts to match templates above the current ISA spec for diagnostic purposes. If a match is found, it reports the specific ISA spec required (e.g., ‘requires ISA spec v4 or later’), providing much clearer feedback to the user.