From: Kyle McMartin <kyle@mcmartin.ca>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: Helge Deller <deller@gmx.de>,
linux-parisc@vger.kernel.org,
John David Anglin <dave.anglin@nrc.ca>
Subject: Re: ldcw inline assembler patch
Date: Mon, 16 Jun 2008 17:57:26 -0400 [thread overview]
Message-ID: <20080616215726.GD18358@phobos.i.cabal.ca> (raw)
In-Reply-To: <119aab440806161454v49c15f47k75dbf27215d4a978@mail.gmail.com>
On Mon, Jun 16, 2008 at 05:54:24PM -0400, Carlos O'Donell wrote:
> On Mon, Jun 16, 2008 at 5:06 PM, Helge Deller <deller@gmx.de> wrote:
> > So, your proposal is (copy-and-pasted in here) the following ?
> >
> > diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
> > index ee80c92..daeae39 100644
> > --- a/include/asm-parisc/system.h
> > +++ b/include/asm-parisc/system.h
> > @@ -169,7 +169,7 @@ static inline void set_eiem(unsigned long val)
> > #define __ldcw(a) ({ \
> > unsigned __ret; \
> > __asm__ __volatile__(__LDCW " 0(%1),%0" \
> > - : "=r" (__ret) : "r" (a)); \
> > + : "=r" (__ret) : "r" (a) : "memory" ); \
> > __ret; \
> > })
>
> Yes. The asm should clobber memory thus forcing the compiler to avoid
> memory temporaries.
>
It shouldn't need to, since we're only ever accessing one word (the one
specified in the operand.)
Otherwise basically every inline asm everywhere ever is going to need a
memory clobber, and that's just BROKEN.
r, Kyle
next prev parent reply other threads:[~2008-06-16 21:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 15:36 ldcw inline assembler patch Helge Deller
2008-06-16 20:50 ` Carlos O'Donell
2008-06-16 21:06 ` Helge Deller
2008-06-16 21:54 ` Carlos O'Donell
2008-06-16 21:57 ` Kyle McMartin [this message]
2008-06-16 22:03 ` Kyle McMartin
2008-06-16 22:05 ` Matthew Wilcox
2008-06-16 22:14 ` Carlos O'Donell
2008-06-17 1:56 ` Carlos O'Donell
2008-06-17 3:34 ` Carlos O'Donell
2008-06-21 18:34 ` John David Anglin
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=20080616215726.GD18358@phobos.i.cabal.ca \
--to=kyle@mcmartin.ca \
--cc=carlos@systemhalted.org \
--cc=dave.anglin@nrc.ca \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.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