https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110899
Maxim Egorushkin <maxim.yegorushkin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim.yegorushkin at gmail dot com --- Comment #14 from Maxim Egorushkin <maxim.yegorushkin at gmail dot com> --- (In reply to Marco Elver from comment #0) > On X86-64 the callee preserves all general purpose registers, except for > R11. R11 can be used as a scratch register. R11 is reserved for use in those lazy-resolved PLT stubs, invented for OpenOffice to load faster than users giving up waiting on it and buying MS Office instead. In other words, R11 is assumed to be wiped by any/every call instruction on its own, since any call instruction may need to resolve a PLT stub on its way. You may like to compile your code with `-fno-plt` to bypass calling those pesky PLT stubs invented for OpenOffice. But that doesn't affect the machine code of any 3rd-party libraries you invoke, they still do their calls through PLT and, hence, may clobber R11. R10 is also clobbered by some nebulous features no user asked for, and, hence, is generally unavailable, except in tail functions making no calls.