All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Rydh <samuel@ibrium.se>
To: Gabriel Paubert <paubert@iram.es>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: asm inline
Date: Fri, 29 Nov 2002 18:49:42 +0100	[thread overview]
Message-ID: <20021129174942.GA833@ibrium.se> (raw)
In-Reply-To: <Pine.LNX.4.33.0211291712010.9530-100000@gra-lx1.iram.es>


On Fri, Nov 29, 2002 at 05:21:50PM +0100, Gabriel Paubert wrote:
> On Fri, 29 Nov 2002, Samuel Rydh wrote:
> How is "addr" declared ? This may be an aliasing problem. Does adding
> -fno-strict-aliasing to the options help ? Or changing the "=m" to "+m" as
> an incorrect, but less penalizing than a memory clobber, bandaid. Or
> declaring addr as pointer to volatile ?

Turning of aliasing did indeed solve the problem. As did changing
unsigned long to int.

> > Adding "memory" to the clobber list seems to be the only way to make
> > gcc do the right thing :-(.
>
> A "memory" clobber is such an optimization killer that it is not
> acceptable in this situation (actually I consider a memory clober hardly
> ever acceptable).

Agreed. A "memory" clobber is definitely suboptimal.

> I see that your example involves local variables, does
> it also happen in the non-automatic case ?

It happens in the non-automatic case too. I'll try the
latest gcc version later.

/Samuel


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-11-29 17:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-29 16:08 asm inline Samuel Rydh
2002-11-29 16:21 ` Gabriel Paubert
2002-11-29 17:49   ` Samuel Rydh [this message]
2002-12-02 11:17     ` Franz Sirl
2002-12-02 13:11       ` Samuel Rydh
2002-12-02 13:35         ` Andreas Schwab
2002-12-02 14:14           ` Kevin B. Hendricks
2002-12-02 14:29             ` Andreas Schwab
2002-12-02 14:37               ` Kevin B. Hendricks
2002-12-02 14:51                 ` Franz Sirl
2002-12-02 15:08                   ` Kevin B. Hendricks
2002-12-02 15:11                   ` Kevin B. Hendricks
2002-12-02 15:35                     ` Franz Sirl
2002-12-02 15:45                       ` Kevin B. Hendricks
2002-12-02 15:12         ` Franz Sirl
2002-12-02 17:00           ` Samuel Rydh
2002-12-02 17:53             ` Gabriel Paubert
2002-12-02 19:17               ` Samuel Rydh
2002-11-29 16:30 ` Benjamin Herrenschmidt
2002-12-02 14:29   ` Gabriel Paubert

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=20021129174942.GA833@ibrium.se \
    --to=samuel@ibrium.se \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paubert@iram.es \
    /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.