This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][AArch64] Inline mempcpy
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org, davem at davemloft dot net
- Date: Fri, 1 May 2015 14:30:54 +0200
- Subject: Re: [PATCH][AArch64] Inline mempcpy
- Authentication-results: sourceware.org; auth=none
- References: <000101d080db$904af8d0$b0e0ea70$ at com> <D1360FBA-8A28-4824-8069-778609B16378 at gmail dot com> <000801d08100$753c65e0$5fb531a0$ at com> <5540E310 dot 6040501 at linaro dot org>
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.