[Bug inline-asm/43998] inline assembler: can't set clobbering for input register
stsp at users dot sourceforge.net
gcc-bugzilla@gcc.gnu.org
Sat Jun 25 00:30:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43998
Stas Sergeev <stsp at users dot sourceforge.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stsp at users dot sourceforge.net
--- Comment #14 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Eric Botcazou from comment #12)
> > the compiler may think that "something" do not modify eax. So next assignment
> > may use eax ( mov eax, x ). So, "it does not make sense to have it as a
> > clobber" is not correct. does not it ?
>
> Andrew was saying that it doesn't make sense to consider input operands as
> clobbered by an inline asm, generically.
How about allowing an ampersand in the input list?
Just like early clobber in output list, in input list
it may mean "late clobber" - that is, clobbered after
the argument is taken.
Then you won't contradict with any doc and will avoid
any logical inconsistency.
This makes a lot of sense for things like "rep; movsl"
where you'd need 3 dummy values...
More information about the Gcc-bugs
mailing list