diff options
author | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2014-03-03 08:06:41 -0600 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-03 08:06:41 -0600 |
commit | c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c (patch) | |
tree | baf78c9b58faa86b3996ae3745cb81fd50e2fb58 /string | |
parent | 235eed8644eb2deebf839b13b418dbd47bb14c5a (diff) | |
download | glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.zip glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.tar.gz glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.tar.bz2 |
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.
Diffstat (limited to 'string')
-rw-r--r-- | string/strrchr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/string/strrchr.c b/string/strrchr.c index b5b4bc6..47ff08c 100644 --- a/string/strrchr.c +++ b/string/strrchr.c @@ -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; |