This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Request for discussion: Rewrite of inline assembler docs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]