include/asm-ppc/atomic.h: fluff in inline assembly code?
Frank van Maarseveen
frankvm at frankvm.com
Thu Jun 30 04:36:28 EST 2005
On Wed, Jun 29, 2005 at 06:14:52PM +0200, Andreas Schwab wrote:
> Frank van Maarseveen <frankvm at frankvm.com> writes:
> > What is the point of all those v->counter arguments?
> It tells the compiler that v->counter is changed by the asm.
So it's an optimized alternative for "memory" in the clobber list?
ok, I couldn't find that anywhere in the doc.
But v->counter is not supposed to be accessed directly by the
compiler (i.e. by C code) at all, is it? so it shouldn't matter.
Even if it would be: the counter itself is declared "volatile int"
which basically tells the compiler not to cache it in a register.
More information about the Linuxppc-dev