Why does adding inline assembly comments cause such radical change in GCC’s generated code?

The interactions with optimisations are explained about halfway down the “Assembler Instructions with C Expression Operands” page in the documentation. GCC doesn’t try to understand any of the actual assembly inside the asm; the only thing it knows about the content is what you (optionally) tell it in the output and input operand specification and … Read more

The difference between asm, asm volatile and clobbering memory

See the “Extended Asm” page in the GCC documentation. You can prevent an asm instruction from being deleted by writing the keyword volatile after the asm. […] The volatile keyword indicates that the instruction has important side-effects. GCC will not delete a volatile asm if it is reachable. and An asm instruction without any output … Read more

tech