Landing: acd18f524416

Project / Subsystem

binutils / x86

Date

2026-07-13

Author

"H.J. Lu" <hjl@sourceware.org>

Commit

acd18f5244167f458f5e23252c4a7b050157389a

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
x86
patch_id
commit_hash
acd18f5244167f458f5e23252c4a7b050157389a
source_type
public_inbox
headline
Disable XCHG to MOV optimization in assembler
tldr
Assembler optimization for XCHG to MOV instruction is disabled on x86.
author
"H.J. Lu" <hjl@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • x86
  • assembler
  • optimization
discussion_id_link
bugzilla_pr
date
2026-07-13T00:00:00.000Z

This commit disables a specific optimization in the x86 assembler that rewrites XCHG instructions into MOV instructions when certain conditions are met. This optimization, enabled by -O, -O2, and -Os flags, was intended to shorten instruction encodings but has now been disabled to address potential issues. The change affects assembly code generation for x86 architectures.