From: Geoff Keating Date: Tue, 18 Jul 2000 00:23:50 +0000 (+0000) Subject: extend.texi (Extended Asm): Mention that a memory clobber does not count as a side... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd40655a26cbe76bdb06db0e3184635f63c4acc8;p=gcc.git extend.texi (Extended Asm): Mention that a memory clobber does not count as a side-effect. * extend.texi (Extended Asm): Mention that a memory clobber does not count as a side-effect. From-SVN: r35110 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8597b35b447..142e3874fc8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-07-17 Geoffrey Keating + * 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. diff --git a/gcc/extend.texi b/gcc/extend.texi index 3b8899baa6a..6eefa624936 100644 --- a/gcc/extend.texi +++ b/gcc/extend.texi @@ -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