[Bug inline-asm/87978] Local Register Variables Have No Effect When There is A Call Statement Between
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 12 08:15:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87978
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The old documentation contained slightly different wording but was trying to
warn you about this case:
As for global register variables, it's recommended that you choose a register
which is normally saved and restored by function calls on your machine, so that
library routines will not clobber it. A common pitfall is to initialize
multiple call-clobbered registers with arbitrary expressions, where a function
call or library call for an arithmetic operator will overwrite a register value
from a previous assignment, for example r0 below:
More information about the Gcc-bugs
mailing list