[Bug inline-asm/68095] "cc" clobber with Flag Output Operands
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 9 03:40:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68095
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Let me put it differently.
At the C level, your asm statement outputs to an integer register.
Internally, the asm outputs to a condition reg, and the C statement
is expanded to also do a move from that condition reg to the integer
register. This move is then later optimised away in your example.
On "cc0" targets, every asm has an implicit "cc" clobber. x86 is not
a cc0 target (that is ancient technology and one day it will be gone
completely, hopefully). However, it used to be a cc0 target long ago,
and to ease transition of old user code, the target code adds a cc
clobber always.
If you look at the generated RTL (with -da, say), you will see that
the cc output overrides the cc clobber. There is no conflict.
More information about the Gcc-bugs
mailing list