[PATCH 1/2] x86: optimize XCHG to MOV for same-register forms

Jan Beulich jbeulich@suse.com
Thu Jul 2 06:18:36 GMT 2026


On 02.07.2026 08:06, Sam James wrote:
> Jan Beulich <jbeulich@suse.com> writes:
> 
>> MOV requires far less execution resources.
> 
> In case anyone ends up stumbling upon this and wonders why Valgrind
> stopped working, it needs adjusting for this change:
> https://bugs.kde.org/522533.

So the instruction bytes quoted there:

IR: unhandled instruction bytes: 0x48 0xC1 0xC7 0x3 0x48 0xC1 0xC7 0xD 0x48 0xC1

are really unrelated to the issue? That's the earlier ROLs afaict ...

What is that code doing anyway? And why is -O passed to gas there, when specific
insn selection matters?

Jan


More information about the Binutils mailing list