diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-09-26 09:29:19 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-10-25 13:28:24 -0500 |
commit | 69f13dbf06c6195de0ada8632271d58ca3cf55da (patch) | |
tree | c2611636127f33fdc43bb51a6ac0f2f97795136c /sysdeps/powerpc/powerpc64/power7/stpcpy.S | |
parent | 151659f6371ce39a488fd132a5c8ce5e3bba983c (diff) | |
download | glibc-69f13dbf06c6195de0ada8632271d58ca3cf55da.tar.gz glibc-69f13dbf06c6195de0ada8632271d58ca3cf55da.tar.xz glibc-69f13dbf06c6195de0ada8632271d58ca3cf55da.zip |
PowerPC: strcpy/stpcpy optimization for PPC64/POWER7
This patch intends to unify both strcpy and stpcpy implementationsi for PPC64 and PPC64/POWER7. The idead default powerpc64 implementation is to provide both doubleword and word aligned memory access. For PPC64/POWER7 is also provide doubleword and word memory access, remove the branch hints, use the cmpb instruction for compare doubleword/words, and add an optimization for inputs of same alignment.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power7/stpcpy.S')
-rw-r--r-- | sysdeps/powerpc/powerpc64/power7/stpcpy.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/power7/stpcpy.S b/sysdeps/powerpc/powerpc64/power7/stpcpy.S new file mode 100644 index 0000000000..727dd06e74 --- /dev/null +++ b/sysdeps/powerpc/powerpc64/power7/stpcpy.S @@ -0,0 +1,24 @@ +/* Optimized stpcpy implementation for PowerPC64/POWER7. + Copyright (C) 2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define USE_AS_STPCPY +#include <sysdeps/powerpc/powerpc64/power7/strcpy.S> + +weak_alias (__stpcpy, stpcpy) +libc_hidden_def (__stpcpy) +libc_hidden_builtin_def (stpcpy) |