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

Mark Wielaard mark@klomp.org
Mon Jul 6 10:00:17 GMT 2026


Hi,

On Mon, Jul 06, 2026 at 04:26:43PM +0800, H.J. Lu wrote:
> On Mon, Jul 6, 2026 at 3:22 PM Jan Beulich <jbeulich@suse.com> wrote:
> > Hence my earlier suggestion: Give them half a year to sort things by
> > reverting the change from the branch, once that was created.
> 
> VALGRIND_GET_NR_CONTEXT is defined in /usr/include/valgrind/valgrind.h.
> It will take a long time to get it changed in both valgrind source as
> well as all
> its users.   I don't think half a year is sufficient.

Note that we don't intent to change the inline assembly inside
valgrind.h. Instead we'll just add an explicit runtime check/warning
that tells users to not compile valgrind.h with gas optimizations
enabled. Given that (not using gas optimizations) is the default, that
seems a good enough solution.

See also valgrind bug https://bugs.kde.org/show_bug.cgi?id=522533

Cheers,

Mark


More information about the Binutils mailing list