All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Christophe Leroy' <christophe.leroy@c-s.fr>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] powerpc: add support for csum_add()
Date: Tue, 26 May 2015 14:42:35 -0500	[thread overview]
Message-ID: <1432669355.7862.16.camel@freescale.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB3EB5F@AcuExch.aculab.com>

On Tue, 2015-05-26 at 13:57 +0000, David Laight wrote:
> From: Scott Wood ...
> > > I'd also have thought that the 64bit C version above would be 
> > > generally 'good'.
> > 
> > It doesn't generate the addc/addze sequence.  At least with GCC 
> > 4.8.2,
> > it does something like:
> > 
> >     mr      tmp0, csum
> >     li      tmp1, 0
> >     li      tmp2, 0
> >     addc    tmp3, addend, tmp0
> >     adde    csum, tmp2, tmp1
> >     add     csum, csum, tmp3
> 
> I was thinking of all 64bit targets, not 32bit ones.

Oh, you mean move it out of arch/powerpc?  Sounds reasonable, but 
someone should probably check what the resulting code looks like on 
other common arches.  OTOH, if we're going to modify non-arch code, 
that might be a good opportunity to implement Segher's suggestion and 
move to a 64-bit accumulator.

-Scott

  reply	other threads:[~2015-05-26 19:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 15:18 [PATCH v3 0/2] Optimise some IP checksum functions Christophe Leroy
2015-05-19 15:18 ` Christophe Leroy
2015-05-19 15:18 ` [PATCH v3 1/2] powerpc: put csum_tcpudp_magic inline Christophe Leroy
2015-05-19 15:18   ` Christophe Leroy
2015-05-19 15:18 ` [PATCH v3 2/2] powerpc: add support for csum_add() Christophe Leroy
2015-05-19 15:18   ` Christophe Leroy
2015-05-22 15:57   ` David Laight
2015-05-22 15:57     ` David Laight
2015-05-22 19:32     ` Scott Wood
2015-05-22 21:39       ` Segher Boessenkool
2015-05-22 21:54         ` Scott Wood
2015-05-26 13:57       ` David Laight
2015-05-26 13:57         ` David Laight
2015-05-26 19:42         ` Scott Wood [this message]
2015-05-27  8:41           ` David Laight
2015-05-27  8:41             ` David Laight

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=1432669355.7862.16.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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 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.