extend.texi (Extended Asm): Mention that a memory clobber does not count as a side...
authorGeoff Keating <geoffk@cygnus.com>
Tue, 18 Jul 2000 00:23:50 +0000 (00:23 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Tue, 18 Jul 2000 00:23:50 +0000 (00:23 +0000)
* extend.texi (Extended Asm): Mention that a memory clobber
does not count as a side-effect.

From-SVN: r35110

gcc/ChangeLog
gcc/extend.texi

index 8597b35b4470afbb26965d2ce6eca6fa6122f3e9..142e3874fc86f65f0d60262e5ed1dff3d5196aca 100644 (file)
@@ -1,5 +1,8 @@
 2000-07-17  Geoffrey Keating  <geoffk@cygnus.com>
 
+       * extend.texi (Extended Asm): Mention that a memory clobber
+       does not count as a side-effect.
+
        * unroll.c (copy_loop_body): Fix one instance of using host
        arithmetic on the target; fixes loop-4 on a 32-bit -> 64-bit
        cross-compile.
index 3b8899baa6abb6800a0f56d4830d9ddd791782a4..6eefa62493640fc2444ffa823a6c51f96a649a4b 100644 (file)
@@ -2558,7 +2558,10 @@ effect.  But it is valid no matter what the machine.
 If your assembler instruction modifies memory in an unpredictable
 fashion, add @samp{memory} to the list of clobbered registers.  This
 will cause GNU CC to not keep memory values cached in registers across
-the assembler instruction.
+the assembler instruction.  You will also want to add the
+@code{volatile} keyword if the memory affected is not listed in the
+inputs or outputs of the @code{asm}, as the @samp{memory} clobber does
+not count as a side-effect of the @code{asm}.
 
 You can put multiple assembler instructions together in a single
 @code{asm} template, separated either with newlines (written as