On 3/31/2014 1:41 AM, Andrew Haley wrote:
On 03/31/2014 05:44 AM, dw wrote:
So, after looking over this discussion, I have updated the text. This
time no undefined terms, while still conveying all the points I had in mind:

The "memory" clobber tells the compiler that the assembly code performs
memory reads or writes to items other than those listed in the input and
output operands (for example accessing the memory pointed to by one of
the input parameters).  To ensure memory contains correct values, GCC
may need to flush specific register values to memory before executing
the asm. Further, the compiler will not assume that any values read from
memory 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.

Note that this clobber does not prevent the @emph{processor} from doing
speculative reads past the @code{asm} statement. To stop that, you need
processor-specific fence instructions.

Objections?
No, none.  That's fine.

Done.

I believe all the proposed changes are now included. The latest extend.texi and extend.texi.patch can be found in (http://www.LimeGreenSocks.com/gcc/extend05.zip) and the latest html pages are at (http://www.LimeGreenSocks.com/gcc/Using-Assembly-Language-with-C.html). If you were expecting a change and it isn't there, let me know.

Anyone else have something before I send this to gcc-patches? Going... going...


Reply via email to