All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linux PPC dev <linuxppc-dev@ozlabs.org>,
	David Woodhouse <dwmw2@infradead.org>,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH] powerpc: provide __bswapdi2
Date: Tue, 14 May 2013 11:25:00 +1000	[thread overview]
Message-ID: <CAEjGV6yR+GSwu_CZWSLrL8q8D-AM7yi3685fq9vgjt9MN7HPTA@mail.gmail.com> (raw)
In-Reply-To: <20130514110924.091b7177d22d69e19478a134@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On 14 May 2013 11:09, "Stephen Rothwell" <sfr@canb.auug.org.au> wrote:
>
> Hi Mikey,
>
> On Mon, 13 May 2013 17:09:59 +1000 Michael Neuling <mikey@neuling.org>
wrote:
> >
> > This doesn't work for me but the below does:
> >
> > _GLOBAL(__bswapdi2)
> >       rotlwi  r9,r4,8
> >       rotlwi  r10,r3,8
> >       rlwimi  r9,r4,24,0,7
> >       rlwimi  r10,r3,24,0,7
> >       rlwimi  r9,r4,24,16,23
> >       rlwimi  r10,r3,24,16,23
> >       mr      r4,r10
> >       mr      r3,r9
> >       blr
> >
> > stolen from GCC -02 output of:
> >   unsigned long long __bswapdi2(unsigned long long x)
> >   {
> >        return ((x & 0x00000000000000ffULL) << 56) |
> >               ((x & 0x000000000000ff00ULL) << 40) |
> >               ((x & 0x0000000000ff0000ULL) << 24) |
> >               ((x & 0x00000000ff000000ULL) <<  8) |
> >               ((x & 0x000000ff00000000ULL) >>  8) |
> >               ((x & 0x0000ff0000000000ULL) >> 24) |
> >               ((x & 0x00ff000000000000ULL) >> 40) |
> >               ((x & 0xff00000000000000ULL) >> 56);
> >   }
>
> So, if we are just stealing the output of gcc, why not just use the C
> version (at least for 32 bit)?

Woodhouse: can we just do this?

Mikey

[-- Attachment #2: Type: text/html, Size: 1793 bytes --]

  reply	other threads:[~2013-05-14  1:25 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
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 [this message]
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=CAEjGV6yR+GSwu_CZWSLrL8q8D-AM7yi3685fq9vgjt9MN7HPTA@mail.gmail.com \
    --to=mikey@neuling.org \
    --cc=dwmw2@infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    --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 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.