Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why does membar_consumer() do anything on x86_64?



On Mon, Nov 14, 2011 at 08:34:07AM +0000, David Laight wrote:
> In which case you might need the gcc membar (if I've got the syntax right):
>       asm volatile("" ::: "memory" );
> that tells gcc that the (empty) asm instruction might look at, and
> modify, any part of memory - so the compiler cannot keep any
> non-local values in registers across the statement.

Or rather, __insn_barrier(3).

- Jukka.


Home | Main Index | Thread Index | Old Index