1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

PowerPC: strrchr optimization for POWER7/PPC64

This patch optimizes strrchr() for ppc64. It uses aligned memory
access along with cmpb instruction and CPU prefetch to avoid
cache misses for speed improvement.
This commit is contained in:
Rajalakshmi Srinivasaraghavan
2014-03-03 08:06:41 -06:00
committed by Adhemerval Zanella
parent 235eed8644
commit c7debbdfac
8 changed files with 389 additions and 2 deletions

View File

@ -19,9 +19,13 @@
#undef strrchr
#ifndef STRRCHR
# define STRRCHR strrchr
#endif
/* Find the last occurrence of C in S. */
char *
strrchr (const char *s, int c)
STRRCHR (const char *s, int c)
{
const char *found, *p;