https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106743
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The inline-asm is wrong. It should be: __asm__("xchgb %b0, %h0 ## %0 " : "=Q"(__tmp) : "0"(__tmp)); q Any register accessible as rl. In 32-bit mode, a, b, c, and d; in 64-bit mode, any integer register. Q Any register accessible as rh: a, b, c, and d. Because you are accessing it as rh so you need to Q rather than q.