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 3/4] [Powerpc] tune/optimize memmove/wordcopy. Populatepower7 wordcopy.c files.


On Tue, Apr 3, 2012 at 1:08 PM, Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
> [Powerpc] tune/optimize memmove/wordcopy. ÂPopulate power7 wordcopy.c files.
>
> Populate the power7 sysdep directories with versions of the wordcopy.c
> files.
>
> 2012-04-03 ÂWill Schmidt <will_schmidt@vnet.ibm.com>
>
> Â Â Â Â* sysdeps/powerpc/powerpc64/power7/wordcopy.c: New file. (Copied from
> Â Â Â Âsysdeps/powerpc/powerpc64/power6/wordcopy.c)
> Â Â Â Â* sysdeps/powerpc/powerpc32/power7/wordcopy.c: New file. (Copied from
> Â Â Â Âsysdeps/powerpc/powerpc32/power6/wordcopy.c)
> Â Â Â Â* sysdeps/powerpc/memmove.c: New file. Â(Copied from string/memmove.c).

Seeing as how, with this patch-set, the power7 versions are just a
copy of the power6 versions of the files, wouldn't it be better to do
the following in order to avoid redundant code?

sysdeps/powerpc/powerpc32/power7/wordcopy.c:
#include "../power6/wordcopy.c"

and

sysdeps/powerpc/powerpc64/power7/wordcopy.c:
#include "../power6/wordcopy.c"

I can see how, in the future, if you change the cadence of the loads
and stores for P7 (to differ from P6) then you may need a unique
version for power7.

Does anyone else have an opinion on this matter?

Ryan

> ---
> Âsysdeps/powerpc/memmove.c          | Â115 ++++++++++++++
> Âsysdeps/powerpc/powerpc32/power7/wordcopy.c | Â218 +++++++++++++++++++++++++++
> Âsysdeps/powerpc/powerpc64/power7/wordcopy.c | Â218 +++++++++++++++++++++++++++
> Â3 files changed, 551 insertions(+), 0 deletions(-)
> Âcreate mode 100644 sysdeps/powerpc/memmove.c
> Âcreate mode 100644 sysdeps/powerpc/powerpc32/power7/wordcopy.c
> Âcreate mode 100644 sysdeps/powerpc/powerpc64/power7/wordcopy.c


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