This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Clarification Req: Regarding "memory" clobber for cache operation is required (?)
>>>>> "Ashok" == Ashok A <Ashok.A> writes:
Ashok> Hello Paul, Thanks for your response!
Ashok> I am not clear about the statement "you can't make use of
Ashok> operands to asm that aren't actually used in the asm text". As
Ashok> you said, I have gone through the thread about "locking
Ashok> problem with mips atomicity".
Ashok> ...If we remove the *unused* constraint '"=m" (*c)' in the above
Ashok> example, GCC generates wrong assembly. It proves that "unused
Ashok> constraint is also significant" in inline asm.
I'm just passing along what we were told in that previous discussion.
It may be that it makes a difference today when you include an unused
constraint -- but if so, that's apparently accidental. The claim was
made that you should NOT rely on this.
paul