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

Christian Ludloff ludloff@gmail.com
Fri Jul 3 06:14:38 GMT 2026


> https://sourceware.org/bugzilla/show_bug.cgi?id=34343

There is an additional case that breaks because of the optimization.

Transmeta processors provided translation control via XCHG eSP,eSP.

67h,87h,E4h forced BOT on Crusoe, i.e. begin-of-translation.
66h,87h,E4h forced EOT on Crusoe, i.e. end-of-translation.

67h,87h,E4h forced BOT+EOT on Efficeon, i.e. break-translation-here.
66h,87h,E4h no longer forced EOT on Efficeon.

Granted, Transmeta processors are historical by now.

Still... this gas optimization is... perhaps better left to higher level tools.

--
C.


More information about the Binutils mailing list