All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: Andreas Schwab <schwab@suse.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: include/asm-ppc/atomic.h: fluff in inline assembly code?
Date: Wed, 29 Jun 2005 20:36:28 +0200	[thread overview]
Message-ID: <20050629183628.GA23185@janus> (raw)
In-Reply-To: <jehdfhnnr7.fsf@sykes.suse.de>

On Wed, Jun 29, 2005 at 06:14:52PM +0200, Andreas Schwab wrote:
> Frank van Maarseveen <frankvm@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.

-- 
Frank

  reply	other threads:[~2005-06-29 18:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-29 14:50 include/asm-ppc/atomic.h: fluff in inline assembly code? Frank van Maarseveen
2005-06-29 16:14 ` Andreas Schwab
2005-06-29 18:36   ` Frank van Maarseveen [this message]
2005-06-29 22:34     ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050629183628.GA23185@janus \
    --to=frankvm@frankvm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.