From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linuxppc-dev@ozlabs.org, Michael Neuling <mikey@neuling.org>,
David Woodhouse <dwmw2@infradead.org>,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] powerpc: provide __bswapdi2
Date: Mon, 13 May 2013 13:12:58 +0200 [thread overview]
Message-ID: <OF84886264.B2D90F9C-ONC1257B6A.003D7BDD-C1257B6A.003D9CBB@transmode.se> (raw)
In-Reply-To: <OFF1D09F16.1BCB0BD6-ONC1257B6A.003B73C6-C1257B6A.003BB127@transmode.se>
"Linuxppc-dev"
<linuxppc-dev-bounces+joakim.tjernlund=transmode.se@lists.ozlabs.org>
wrote on 2013/05/13 12:51:59:
>
> "Linuxppc-dev"
> <linuxppc-dev-bounces+joakim.tjernlund=transmode.se@lists.ozlabs.org>
> wrote 2013/05/13 12:38:13:
> >
> > On Mon, 2013-05-13 at 11:33 +0100, David Woodhouse wrote:
> > >
> > > On Mon, 2013-05-13 at 09:33 +0200, Gabriel Paubert wrote:
> > > > Actually, I'd swap the two mr instructions to never
> > > > have an instruction that uses the result from the
> > > > previous one.
> > >
> > > Bad GCC. No biscuit.
> > >
> > > Should we file a PR?
> >
> > Maybe not. If you tell it to tune for an in-order machine like Cell,
it
> > swaps them round. Although now I'm confused about which of POWER[567]
> > were in-order:
> >
> > [dwmw2@i7 ~]$ powerpc64-linux-gnu-gcc -O2 -S -o- bswapdi2.c -m32 |
grep
> -B1 mr
> > rlwimi 11,3,24,16,23
> > mr 4,11
> > mr 3,10
> > [dwmw2@i7 ~]$ powerpc64-linux-gnu-gcc -O2 -S -o- bswapdi2.c -m32
> -mtune=cell | grep -B1 mr
> > rlwimi 11,3,24,16,23
> > mr 3,10
> > mr 4,11
> > [dwmw2@i7 ~]$ powerpc64-linux-gnu-gcc -O2 -S -o- bswapdi2.c -m32
> -mtune=power5 | grep -B1 mr
> > rlwimi 11,3,24,16,23
> > mr 3,10
> > mr 4,11
> > [dwmw2@i7 ~]$ powerpc64-linux-gnu-gcc -O2 -S -o- bswapdi2.c -m32
> -mtune=power6 | grep -B1 mr
> > rlwimi 11,3,24,16,23
> > mr 4,11
> > mr 3,10
> > [dwmw2@i7 ~]$ powerpc64-linux-gnu-gcc -O2 -S -o- bswapdi2.c -m32
> -mtune=power7 | grep -B1 mr
> > rlwimi 11,3,24,16,23
> > mr 4,11
> > mr 3,10
>
> A bit rusty on the ppc asm but can you not remove the mr completely:
> rlwimi 10,4,24,16,23
> rlwimi 11,3,24,16,23
> mr 4,11
> mr 3,10
> to
> rlwimi 4,4,24,16,23
> rlwimi 3,3,24,16,23
Oops, that got twisted. Forget my comment.
next prev parent reply other threads:[~2013-05-13 11:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 21:18 [PATCH] powerpc: provide __bswapdi2 David Woodhouse
2013-05-13 6:48 ` Anton Blanchard
2013-05-13 7:20 ` Alan Modra
2013-05-13 10:27 ` David Woodhouse
2013-05-13 16:47 ` Segher Boessenkool
2013-05-13 7:09 ` Michael Neuling
2013-05-13 7:20 ` [PATCH v2] " Michael Neuling
2013-05-13 7:33 ` [PATCH] " Gabriel Paubert
2013-05-13 10:23 ` [PATCH v3] " Michael Neuling
2013-05-13 10:33 ` [PATCH] " David Woodhouse
2013-05-13 10:38 ` David Woodhouse
2013-05-13 10:51 ` Joakim Tjernlund
2013-05-13 11:12 ` Joakim Tjernlund [this message]
2013-05-13 13:12 ` Gabriel Paubert
2013-05-13 16:55 ` Segher Boessenkool
2013-05-14 1:09 ` Stephen Rothwell
2013-05-14 1:25 ` Michael Neuling
2013-05-14 6:59 ` David Woodhouse
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=OF84886264.B2D90F9C-ONC1257B6A.003D7BDD-C1257B6A.003D9CBB@transmode.se \
--to=joakim.tjernlund@transmode.se \
--cc=dwmw2@infradead.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=viro@zeniv.linux.org.uk \
/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).