This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Request for discussion: Rewrite of inline assembler docs
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: dw <limegreensocks at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 28 Mar 2014 07:56:46 +0000
- Subject: Re: Request for discussion: Rewrite of inline assembler docs
- Authentication-results: sourceware.org; auth=none
- References: <530F1C69 dot 5050305 at redhat dot com> <87eh2oah7l dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <530FE6CE dot 1000001 at yahoo dot com> <87ha7jd75c dot fsf at talisman dot default> <53144EC6 dot 2080600 at yahoo dot com> <87fvmzy0n9 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <53181FBE dot 1010306 at yahoo dot com> <87y5024i3m dot fsf at talisman dot default> <532FE0CB dot 6040109 at yahoo dot com> <87ior2ed7s dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <5332823B dot 10805 at yahoo dot com> <87d2h94cr8 dot fsf at talisman dot default> <5333A135 dot 4060007 at yahoo dot com> <87y4zw138j dot fsf at talisman dot default> <533514C7 dot 3040402 at yahoo dot com>
dw <limegreensocks@yahoo.com> writes:
> Using this clobber causes the compiler to flush all (modified) registers
> being used to store memory-based values to memory before executing the
> @code{asm} statement. Further, the compiler will not assume that any
> memory-based values read before the @code{asm} will remain unchanged
> after the @code{asm}; it will reload them as needed. This effectively
> forms a read/write memory barrier for the compiler. For performance
> reasons, some variables only exist in registers and never get written to
> memory. The "memory" clobber does not force these values to get written
> to memory.
Sounds good to me.
> Anything else?
Nope, that's it :-)
Thanks,
Richard