Skip to content

Commit

Permalink
powerpc: wordcopy/memmove cleanup for ppc32
Browse files Browse the repository at this point in the history
This patch cleanup some multiarch code related to memmmove
optimization. Initial IFUNC support added specialized wordcopy
symbols which turned in local IFUNC calls used by memmove default
implementation.  The patch removes the internal IFUNC for wordcopy
symbols and uses local branches in the memmmove optimization instead.
  • Loading branch information
Adhemerval Zanella committed Feb 9, 2015
1 parent 8548a53 commit 1016993
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 119 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
2015-02-09 Adhemerval Zanellla <azanella@linux.vnet.ibm.com>

* sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
[sysdep_routines]: Remove wordcopy-power6 object.
* sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
(__memmove_power7): Use local call for wordcopy and memcpy symbols.
* sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c
(__memmove_ppc32): Likewise.
* sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power6.c: Remove
file.
* sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c: Remove file.
* sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c [IS_IN (libc)]:
Remove preprocessor.

* sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
[sysdep_routines]: Remove wide chars objects.
[wcsmbs]: New rule for wide char objects.
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
strcasecmp-power7 strcasecmp_l-power7 strncase-power7 \
strncase_l-power7 strchrnul-power7 strchrnul-ppc32 \
strchr-power7 strchr-ppc32 \
wordcopy-power7 wordcopy-power6 wordcopy-ppc32 \
wordcopy-power7 wordcopy-ppc32 \
memmove-power7 memmove-ppc

CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops
Expand Down
11 changes: 11 additions & 0 deletions sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
not, see <http://www.gnu.org/licenses/>. */

#include <string.h>
#include <memcopy.h>

extern __typeof (_wordcopy_fwd_aligned) _wordcopy_fwd_aligned_power7;
extern __typeof (_wordcopy_fwd_dest_aligned) _wordcopy_fwd_dest_aligned_power7;
extern __typeof (_wordcopy_bwd_aligned) _wordcopy_bwd_aligned_power7;
extern __typeof (_wordcopy_bwd_dest_aligned) _wordcopy_bwd_dest_aligned_power7;

#define _wordcopy_fwd_aligned _wordcopy_fwd_aligned_power7
#define _wordcopy_fwd_dest_aligned _wordcopy_fwd_dest_aligned_power7
#define _wordcopy_bwd_aligned _wordcopy_bwd_aligned_power7
#define _wordcopy_bwd_dest_aligned _wordcopy_bwd_dest_aligned_power7

extern __typeof (memcpy) __memcpy_power7;
#define memcpy __memcpy_power7
Expand Down
11 changes: 11 additions & 0 deletions sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
not, see <http://www.gnu.org/licenses/>. */

#include <string.h>
#include <memcopy.h>

extern __typeof (_wordcopy_fwd_aligned) _wordcopy_fwd_aligned_ppc;
extern __typeof (_wordcopy_fwd_dest_aligned) _wordcopy_fwd_dest_aligned_ppc;
extern __typeof (_wordcopy_bwd_aligned) _wordcopy_bwd_aligned_ppc;
extern __typeof (_wordcopy_bwd_dest_aligned) _wordcopy_bwd_dest_aligned_ppc;

#define _wordcopy_fwd_aligned _wordcopy_fwd_aligned_ppc
#define _wordcopy_fwd_dest_aligned _wordcopy_fwd_dest_aligned_ppc
#define _wordcopy_bwd_aligned _wordcopy_bwd_aligned_ppc
#define _wordcopy_bwd_dest_aligned _wordcopy_bwd_dest_aligned_ppc

extern __typeof (memcpy) __memcpy_ppc;
#define memcpy __memcpy_ppc
Expand Down
23 changes: 0 additions & 23 deletions sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power6.c

This file was deleted.

14 changes: 9 additions & 5 deletions sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */

#define WORDCOPY_FWD_ALIGNED _wordcopy_fwd_aligned_ppc
#define WORDCOPY_FWD_DEST_ALIGNED _wordcopy_fwd_dest_aligned_ppc
#define WORDCOPY_BWD_ALIGNED _wordcopy_bwd_aligned_ppc
#define WORDCOPY_BWD_DEST_ALIGNED _wordcopy_bwd_dest_aligned_ppc
#if IS_IN (libc)
# define WORDCOPY_FWD_ALIGNED _wordcopy_fwd_aligned_ppc
# define WORDCOPY_FWD_DEST_ALIGNED _wordcopy_fwd_dest_aligned_ppc
# define WORDCOPY_BWD_ALIGNED _wordcopy_bwd_aligned_ppc
# define WORDCOPY_BWD_DEST_ALIGNED _wordcopy_bwd_dest_aligned_ppc

#include <sysdeps/powerpc/power4/wordcopy.c>
# include <sysdeps/powerpc/power4/wordcopy.c>
#else
# include <string/wordcopy.c>
#endif
86 changes: 0 additions & 86 deletions sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c

This file was deleted.

4 changes: 0 additions & 4 deletions sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */

#if IS_IN (libc)
#include <sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c>
#else
#include <string/wordcopy.c>
#endif

0 comments on commit 1016993

Please sign in to comment.