On Tue, Nov 24, 2015 at 8:58 AM,  <paul_kon...@dell.com> wrote:
>
> I'm really concerned with loosening the meaning of basic asm.  I
> wish I could find the documentation that says, or implies, that it
> is a memory clobber.  And/or that it is implicitly volatile.

The volatile one is right there in the current docs.

https://gcc.gnu.org/onlinedocs/gcc/Basic-Asm.html#Basic-Asm

"All basic asm blocks are implicitly volatile."

Even back in GCC 2.95.3, the docs say
(https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC93) "If you
write an asm instruction with no outputs, GNU CC will know the
instruction has side-effects and will not delete the instruction or
move it outside of loops" and "An asm instruction without any operands
or clobbers (and "old style" asm) will not be deleted or moved
significantly, regardless, unless it is unreachable, the same wasy as
if you had written a volatile keyword."

However, I'm not aware that basic asm's were ever implicitly memory
clobbers.  Again, back in GCC 2.95.3: "If your assembler instruction
modifies memory in an unpredictable fashion, add `memory' to the list
of clobbered registers."

Ian

Reply via email to