This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][AArch64] Inline mempcpy


On Wed, Apr 29, 2015 at 10:56:32AM -0300, Adhemerval Zanella wrote:
> 
> 
> On 27-04-2015 12:40, Wilco Dijkstra wrote:
> >> pinskia@gmail.com wrote:
> >>> On Apr 27, 2015, at 4:16 AM, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> >>>
> >>> Add inlining of mempcpy on AArch64 to expand into memcpy.
> >>>
> >>> OK for commit?
> >>
> >> This seems like this should be part of generic code rather than aarch64 specific versions.
> > 
> > Absolutely, but the question is what is the best way of doing that? Some targets may want
> > to keep using their assembler mempcpy implementation.
> > 
> > Wilco
> > 
> 
> My first though is to add it on string/bits/string2.h and then adjust the
> bits/strings.h for each arch.  However seems that only s390 is really
> defining _HAVE_STRING_ARCH_xxxx.  So you can start with aarch64 and
> then we can check for the remaining ports.

Wilco, could you post patch as Adhemerval suggested? A git grep mempcpy
shows that only powerpc, sparc and i386/x64 define these.

I am ok with x64 part, how about sparc and powerpc?

As previously discussed it will improve performance due to smaller
icache pressure.

Its change that would never hurt as you could implement one of memcpy and mempcpy with other so they are few cycles apart.

Only way this could hurt is when one of mempcpy arguments isn't used
after call and that causes unnecessary spill. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]