Subject: Re: include/asm-ppc/atomic.h: fluff in inline assembly code?

From: Andreas Schwab <[email-masked]>
Date: Thu, 30 Jun 2005 00:34:09 +0200

Frank van Maarseveen <[email-masked]> writes:

> 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.

Never lie to the compiler, or it gets its revenge, sooner or later.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [email-masked]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."