linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Howells <dhowells@redhat.com>
Cc: gcc-help@gcc.gnu.org, linuxppc-dev@ozlabs.org,
	kernel mailz <kernelmailz@googlemail.com>
Subject: Re: Inline Assembly queries
Date: Tue, 30 Jun 2009 20:43:03 +1000	[thread overview]
Message-ID: <1246358583.31413.11.camel@pasglop> (raw)
In-Reply-To: <30098.1246291036@redhat.com>

On Mon, 2009-06-29 at 16:57 +0100, David Howells wrote:
> kernel mailz <kernelmailz@googlemail.com> wrote:
> 
> > asm("sync");
> 
> Isn't gcc free to discard this as it has no dependencies, no indicated side
> effects, and isn't required to be kept?  I think this should probably be:
> 
> 	asm volatile("sync");

It should also have a "memory" clobber or it's pointless since gcc would
otherwise be free to move load and stores accross that barrier.

Cheers,
Ben.

      parent reply	other threads:[~2009-06-30 10:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-27 19:46 Inline Assembly queries kernel mailz
     [not found] ` <abe8a1fd0906271249k479e5a87gfe1ee9c02798a234@mail.gmail.com>
     [not found]   ` <m3ab3t4623.fsf@google.com>
2009-06-28  4:57     ` kernel mailz
2009-06-29 15:49       ` kernel mailz
2009-06-29 19:27         ` Scott Wood
2009-06-30  5:27           ` kernel mailz
2009-06-30 10:41             ` Benjamin Herrenschmidt
2009-06-29 21:29         ` Ian Lance Taylor
2009-06-30  5:53           ` kernel mailz
2009-06-30  9:30             ` Andrew Haley
2009-06-30  9:52             ` Paul Mackerras
2009-06-29 15:57       ` David Howells
2009-06-29 21:27         ` Ian Lance Taylor
2009-06-30 10:43         ` Benjamin Herrenschmidt [this message]

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=1246358583.31413.11.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=dhowells@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kernelmailz@googlemail.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).