lkml.org 
[lkml]   [2015]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/2] powerpc: add support for csum_add()
From
Date
On Fri, 2015-05-22 at 16:39 -0500, Segher Boessenkool wrote:
> On Fri, May 22, 2015 at 02:32:42PM -0500, Scott Wood wrote:
> > > 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
>
> Right. Don't expect older compilers to do sane things here.
>
> All this begs a question... If it is worth spending so much time
> micro-optimising this, why not pick the low-hanging fruit first?
> Having a 32-bit accumulator for ones' complement sums, on a 64-bit
> system, is not such a great idea.

That would be a more intrusive change -- not (comparatively) low-hanging
fruit. Plus, the person submitting these patches is focused on 32-bit.

-Scott




\
 
 \ /
  Last update: 2015-05-23 00:41    [W:0.075 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site