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] sparc: Use default memcpy for rtld objects


From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu,  5 Oct 2017 10:51:11 -0300

> Both SPARC support multiarch platforms (sparcv9 and sparc64) have the
> a default assembly implemented memcpy.  Since it should not be any
> restriction about it them on the loader object and assuming they are
> faster than generic ones this patch uses them for rtld objects.
> 
> Also, there is no indication neither on original patch [1] or in commit
> message why the generic one where used instead of the sparc optimized
> ones.

The ultra1 memcpy is really an extremely non-ideal variant to use as
the default for anything.

It's much slower on newer cpus, as the block loads and stores used in
the ultra1 version aren't optimized the same way they were in those
older chips.

The C version is faster on newer cpus and definitely a better choice
as a default, especially because it doesn't use any cpu specific
instructions like the ultra1 variant does.

In the Linux kernel we have an assembler version we use as the default
which doesn't use any special instructions.


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