diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-06-24 08:47:52 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-07-07 15:41:27 -0500 |
commit | 07aedd78b095093e866efd4809a80090e2b91a0b (patch) | |
tree | 3479a7be65a3556bf8361022b54f009dbfe40298 /sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c | |
parent | 17762f662582f72bbbc82b445e9113dbff01f46f (diff) | |
download | glibc-07aedd78b095093e866efd4809a80090e2b91a0b.tar glibc-07aedd78b095093e866efd4809a80090e2b91a0b.tar.gz glibc-07aedd78b095093e866efd4809a80090e2b91a0b.tar.bz2 glibc-07aedd78b095093e866efd4809a80090e2b91a0b.zip |
PowerPC: optimized memmove for POWER7/PPC32
This patch adds a optimized memmove for power7 by using the optimized
power7 memcpy for forward copying.
Diffstat (limited to 'sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c')
-rw-r--r-- | sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c new file mode 100644 index 0000000000..10701484ff --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c @@ -0,0 +1,34 @@ +/* Multiple versions of memmove. PowerPC32 version. + Copyright (C) 2014 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/>. */ + +#if defined SHARED && !defined NOT_IN_libc +/* Redefine memmove so that the compiler won't complain about the type + mismatch with the IFUNC selector in strong_alias, below. */ +# include <string.h> +# include "init-arch.h" + +extern __typeof (memmove) __memmove_ppc attribute_hidden; +extern __typeof (memmove) __memmove_power7 attribute_hidden; + +libc_ifunc (memmove, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memmove_power7 + : __memmove_ppc); +#else +# include <string/memmove.c> +#endif |