glibc/sysdeps/powerpc/powerpc64
Mahesh Bodapati 82b5340ebd powerpc64: Optimize strcpy and stpcpy for Power9/10
This patch modifies the current Power9 implementation of strcpy and
stpcpy to optimize it for Power9 and Power10.

No new Power10 instructions are used, so the original Power9 strcpy
is modified instead of creating a new implementation for Power10.

The changes also affect stpcpy, which uses the same implementation
with some additional code before returning.

Improvements compared to the old Power9 version:

Use simple comparisons for the first ~512 bytes:
  The main loop is good for long strings, but comparing 16B each time is
  better for shorter strings. After aligning the address to 16 bytes, we
  unroll the loop four times, checking 128 bytes each time. There may be
  some overlap with the main loop for unaligned strings, but it is better
  for shorter strings.

Loop with 64 bytes for longer bytes:
  Use 4 consecutive lxv/stxv instructions.

Showed an average improvement of 13%.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
2024-08-23 16:48:32 -05:00
..
a2 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
be powerpc: Placeholder and infrastructure/build support to add Power11 related changes. 2024-03-19 21:11:34 -05:00
bits login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
cell Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fpu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
le powerpc64: Optimize strcpy and stpcpy for Power9/10 2024-08-23 16:48:32 -05:00
multiarch powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786) 2024-05-23 09:36:08 -03:00
power4 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
power6 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
power7 powerpc: Remove power7 strstr optimization 2024-02-23 08:50:00 -03:00
power8 powerpc: Remove power8 strcasestr optimization 2024-03-12 17:11:01 -03:00
__longjmp-common.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
atomic-machine.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
bsd-_setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
bsd-setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
configure Convert to autoconf 2.72 (vanilla release, no distribution patches) 2024-06-17 21:15:28 +02:00
configure.ac powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] 2024-05-16 17:31:45 -05:00
crti.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-funcdesc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine.h powerpc: Fix ld.so address determination for PCREL mode (bug 31640) 2024-04-14 08:24:51 +02:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hp-timing.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Implies Revert "Use ieee754/dbl-64/wordsize-64 on powerpc64" 2013-01-10 10:44:05 +01:00
lshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile Remove stale references to libdl.a 2021-06-09 19:14:02 +02:00
memcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ppc-mcount.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rtld-memset.c powerpc: Use generic memset for RTLD for ppc32/64 2010-09-29 12:21:14 -04:00
setjmp-bug21895.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setjmp-common.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stackguard-macros.h PowerPC: Fix POINTER_CHK_GUARD thread register for PPC64 2013-09-25 13:43:04 -05:00
start.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
submul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sysdep.h nptl: Fix Race conditions in pthread cancellation [BZ#12683] 2024-08-23 14:27:43 -03:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-setjmp-bug21895-static.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ucontext-ppc64-vscr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00