[PATCH 1/3] x86/disasm: "annotate immediates" flag should not be global

Project / Subsystem

binutils / x86/disasm

Date

2026-05-15

Proposer

Jan Beulich <jbeulich@suse.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • The change might introduce a slight performance overhead due to accessing the flag through the `instr_info` struct instead of directly.
  • It increases the size of the `instr_info` struct, but the impact is minimal.

All attributes

project
binutils
subsystem
x86/disasm
patch_id
discussion_id
a660ef39-7af1-4897-94a9-8501ad89c075@suse.com
source_type
public_inbox
title
[PATCH 1/3] x86/disasm: "annotate immediates" flag should not be global
headline
x86/disasm: "Annotate immediates" flag should not be global
tldr
Makes the "annotate immediates" flag thread-local in the x86 disassembler to avoid introducing new global state.
proposer
Jan Beulich <jbeulich@suse.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • The change might introduce a slight performance overhead due to accessing the flag through the `instr_info` struct instead of directly.
  • It increases the size of the `instr_info` struct, but the impact is minimal.
series_id
binutils:x86/disasm: "annotate immediates" flag should not be global
series_role
reply
series_parts
[]
tags
  • x86
  • disassembler
  • thread safety
  • global state
bugzilla_url
date
2026-05-15T00:00:00.000Z

[PATCH 1/3] x86/disasm: "annotate immediates" flag should not be global

This patch modifies the x86 disassembler to make the “annotate immediates” flag thread-local. This change avoids introducing new global state variables, as disassembly functions have been made thread-safe. The flag is moved into the instr_info struct, ensuring each thread has its own copy.