Commit Graph

9757 Commits

Author SHA1 Message Date
Roland McGrath bd9e69abb8 BZ#18921: Fix opendir inverted o_directory_works test. 2015-09-04 14:37:56 -07:00
Joseph Myers 522e02ab8a Rename bits/linkmap.h to linkmap.h (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/linkmap.h to plain linkmap.h to follow that
convention.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/linkmap.h: Move to ...
	* sysdeps/generic/linkmap.h: ...here.
	* sysdeps/aarch64/bits/linkmap.h: Move to ...
	* sysdeps/aarch64/linkmap.h: ...here.
	* sysdeps/arm/bits/linkmap.h: Move to ...
	* sysdeps/arm/linkmap.h: ...here.
	* sysdeps/hppa/bits/linkmap.h: Move to ...
	* sysdeps/hppa/linkmap.h: ...here.
	* sysdeps/ia64/bits/linkmap.h: Move to ...
	* sysdeps/ia64/linkmap.h: ...here.
	* sysdeps/mips/bits/linkmap.h: Move to ...
	* sysdeps/mips/linkmap.h: ...here.
	* sysdeps/s390/bits/linkmap.h: Move to ...
	* sysdeps/s390/linkmap.h: ...here.
	* sysdeps/sh/bits/linkmap.h: Move to ...
	* sysdeps/sh/linkmap.h: ...here.
	* sysdeps/x86/bits/linkmap.h: Move to ...
	* sysdeps/x86/linkmap.h: ...here.
	* include/link.h: Include <linkmap.h> instead of <bits/linkmap.h>.
2015-09-04 19:44:27 +00:00
Andreas Schwab b4b522f610 Terminate FDE before return trampoline in makecontext for powerpc (bug 18635)
This fixes tst-makecontext for PowerPC.

	[BZ #18635]
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
	(__makecontext): Terminate FDE before return label.
	(__novec_makecontext): Likewise.
2015-09-04 16:03:00 -03:00
Carlos Eduardo Seo 41a4f0d493 powerpc: Fix compiler warning in some syscalls.
Commit f4491417cc introduced some warnings
when building GLIBC with GCC 5.x. similar to those fixed by commit
dd6e8af6ba.  This patch fixes those warnings.

	* sysdeps/unix/sysv/linux/socketpair.c: Use the address of the
	first member of struct sv in syscall macro.
2015-09-04 15:19:30 -03:00
Joseph Myers 81503d1e44 Rename bits/stdio-lock.h to stdio-lock.h (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/stdio-lock.h to plain stdio-lock.h to follow
that convention.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/stdio-lock.h: Move to ...
	* sysdeps/generic/stdio-lock.h: ...here.
	(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
	* sysdeps/nptl/bits/stdio-lock.h: Move to ...
	* sysdeps/nptl/stdio-lock.h: ...here.
	(_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H.
	* include/libio.h: Include <stdio-lock.h> instead of
	<bits/stdio-lock.h>.
	* sysdeps/nptl/fork.c: Likewise.
	* sysdeps/pthread/flockfile.c: Likewise.
	* sysdeps/pthread/ftrylockfile.c: Likewise.
	* sysdeps/pthread/funlockfile.c: Likewise.
2015-09-04 16:21:14 +00:00
Joseph Myers 0f4341fbec Rename bits/m68k-vdso.h to m68k-vdso.h (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/m68k-vdso.h to plain m68k-vdso.h to follow
that convention.

	[BZ #14912]
	* sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Move to ...
	* sysdeps/unix/sysv/linux/m68k/m68k-vdso.h: ...here.
	* sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h: Include
	<m68k-vdso.h> instead of <bits/m68k-vdso.h>.
	* sysdeps/unix/sysv/linux/m68k/init-first.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: Likewise.
2015-09-04 14:46:21 +00:00
Joseph Myers 02d55fe04e Rename bits/libc-tsd.h to libc-tsd.h (bug 14912).
It was noted in
<https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the
bits/*.h naming scheme should only be used for installed headers.
This patch renames bits/libc-tsd.h to plain libc-tsd.h to follow that
convention.

Tested for x86_64 (testing, and that installed stripped shared
libraries are unchanged by the patch).

	[BZ #14912]
	* bits/libc-tsd.h: Move to ...
	* sysdeps/generic/libc-tsd.h: ...here.
	(_GENERIC_BITS_LIBC_TSD_H): Rename macro to _GENERIC_LIBC_TSD_H.
	* sysdeps/mach/hurd/bits/libc-tsd.h: Move to ...
	* sysdeps/mach/hurd/libc-tsd.h: ...here.
	(_BITS_LIBC_TSD_H): Rename macro to _LIBC_TSD_H.
	* include/ctype.h: Include <libc-tsd.h> instead of
	<bits/libc-tsd.h>.
	* include/rpc/rpc.h: Likewise.
	* locale/localeinfo.h: Likewise.
	* sunrpc/rpc_thread.c: Likewise.
	* sysdeps/mach/hurd/malloc-machine.h: Likewise.
	* sysdeps/nptl/malloc-machine.h: Likewise.
2015-09-03 20:33:46 +00:00
Joseph Myers 04d9a38baf Add netinet/in.h values from Linux 4.2.
This patch adds new constants from Linux 4.2 to netinet/in.h:
IPPROTO_MPLS and IP_BIND_ADDRESS_NO_PORT (both in
include/uapi/linux/in.h in Linux; one directly in netinet/in.h, one in
bits/in.h in glibc).

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	* inet/netinet/in.h (IPPROTO_MPLS): New enum value and macro.
	* sysdeps/unix/sysv/linux/bits/in.h (IP_BIND_ADDRESS_NO_PORT): New
	macro.
2015-09-01 13:47:25 +00:00
Joseph Myers 5be255c28b Add more TCP_* values to netinet/tcp.h.
This patch adds move TCP_* values to sysdeps/gnu/netinet/tcp.h to
bring it up to date with Linux 4.2.  TCP_SAVE_SYN and TCP_SAVED_SYN
are new in 4.2, TCP_NOTSENT_LOWAT and TCP_CC_INFO are older (Szabolcs
previously noted in
<https://sourceware.org/ml/libc-alpha/2015-06/msg00938.html> that this
header was out of date in glibc).

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	* sysdeps/gnu/netinet/tcp.h (TCP_NOTSENT_LOWAT): New macro.
	(TCP_CC_INFO): Likewise.
	(TCP_SAVE_SYN): Likewise.
	(TCP_SAVED_SYN): Likewise.
2015-09-01 13:45:49 +00:00
Brett Neumeier 3f512ca79f Fix non-v9 32-bit sparc build.
[BZ #18870]
	* sysdeps/sparc/sparc32/sem_open.c: Add missing #include
2015-08-31 15:27:47 -07:00
Paul Eggert 543ef578c3 Fix broken overflow check in posix_fallocate [BZ 18873]
* sysdeps/posix/posix_fallocate.c (posix_fallocate):
* sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64):
Fix parenthesization typo.
2015-08-31 17:47:42 +02:00
Adhemerval Zanella d3573f61ac Fix wordsize-32 mmap offset for negative value (BZ#18877)
This patch fixes the default wordsize-32 mmap implementation offset
calculation for negative values.  Current code uses signed shift
operation to calculate the multiple size to use with syscall and
it is implementation defined.  Change it to use a division base
on mmap page size (default being as before, 4096).

Tested on armv7hf.

	[BZ #18877]
	* posix/Makefile (tests): Add tst-mmap-offset.
	* posix/tst-mmap.c: New file.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c (__mmap): Fix
	offset calculation for negative values.
2015-08-28 10:42:07 -03:00
H.J. Lu 75dd0a8f3d Detect and select i586/i686 implementation at run-time
We detect i586 and i686 features at run-time by checking CX8 and CMOV
CPUID features bits.  We can use these information to select the best
implementation in ix86 multiarch.  HAS_I586/HAS_I686 is true if i586/i686
instructions are available on the processor.

Due to the reordering and the other nifty extensions in i686, it is not
really good to use heavily i586 optimized code on an i686.  It's better
to use i486 code if it isn't an i586.  USE_I586/USE_I686 is true if
i586/i686 implementation should be used for the processor.  USE_I586
is true only if i686 instructions aren't available.  If i686 instructions
are available, we always choose i686 or i486 implementation, in that order,
and we never choose i586 implementation for i686-class processors.

	* sysdeps/i386/init-arch.h: New file.
	* sysdeps/i386/i586/init-arch.h: Likewise.
	* sysdeps/i386/i686/init-arch.h: Likewise.
	* sysdeps/x86/cpu-features.c (init_cpu_features): Set bit_I586
	bit if CX8 is available.  Set bit_I686 bit if CMOV is available.
	* sysdeps/x86/cpu-features.h (bit_I586): New.
	(bit_I686): Likewise.
	(bit_CX8): Likewise.
	(bit_CMOV): Likewise.
	(index_CX8): Likewise.
	(index_CMOV): Likewise.
	(index_I586): Likewise.
	(index_I686): Likewise.
	(reg_CX8): Likewise.
	(reg_CMOV): Likewise.
	(HAS_I586): Defined as HAS_ARCH_FEATURE (I586) if i586 isn't
	available at compile-time.
	(HAS_I686): Defined as HAS_ARCH_FEATURE (I686) if i686 isn't
	available at compile-time.
	* sysdeps/x86/init-arch.h (USE_I586): New macro.
	(USE_I686): Likewise.
2015-08-27 09:06:44 -07:00
H.J. Lu d226114b9b Add i386 memset and memcpy assembly functions
Add i386 memset and memcpy assembly functions with REP MOVSB/STOSB
instructions.

	* sysdeps/i386/bcopy.S: New file.
	* sysdeps/i386/bzero.S: Likewise.
	* sysdeps/i386/memcpy.S: Likewise.
	* sysdeps/i386/memmove.S: Likewise.
	* sysdeps/i386/mempcpy.S: Likewise.
	* sysdeps/i386/memset.S: Likewise.
	* sysdeps/i386/bzero.c: Removed.
	* sysdeps/i386/memset.c: Likewise.
	* sysdeps/i386/i586/memcpy_chk.S: Likewise.
	* sysdeps/i386/i586/mempcpy_chk.S: Likewise.
	* sysdeps/i386/i586/memset_chk.S: Likewise.
	* sysdeps/i386/i686/memcpy_chk.S: Moved to ...
	* sysdeps/i386/memcpy_chk.S: Here.
	* sysdeps/i386/i686/memmove_chk.S: Moved to ...
	* sysdeps/i386/memmove_chk.S: Here.
	* sysdeps/i386/i686/mempcpy_chk.S: Moved to ...
	* sysdeps/i386/mempcpy_chk.S: Likewise.
	* sysdeps/i386/i686/memset_chk.S: Moved to ...
	* sysdeps/i386/memset_chk.S: Likewise.
2015-08-27 09:04:54 -07:00
H.J. Lu ae857215dd Remove i486 subdirectory
Since glibc doesn't support i386 any more, we can remove i486 subdirectory.

	* sysdeps/i386/i586/Implies: Removed.
	* sysdeps/i386/i686/Implies: Likewise.
2015-08-27 07:59:29 -07:00
H.J. Lu 892bb11e4e Move i486/strlen.S to strlen.S
Since glibc doesn't support i386 any more, we can move i486/strlen.S
to strlen.S.

	* sysdeps/i386/i486/strlen.S: Moved to ...
	* sysdeps/i386/strlen.S: Here.
2015-08-27 07:57:55 -07:00
H.J. Lu 8964482ab8 Move i486/strcat.S to strcat.S
Since glibc doesn't support i386 any more, we can move i486/strcat.S
to strcat.S.

	* sysdeps/i386/i486/strcat.S: Moved to ...
	* sysdeps/i386/strcat.S: Here.
	* sysdeps/i386/i686/multiarch/strcat.S: Updated.
2015-08-27 07:56:41 -07:00
H.J. Lu 413db45d1b Move i486/pthread_spin_trylock.S to pthread_spin_trylock.S
Since glibc doesn't support i386 any more, we can move
i486/pthread_spin_trylock.S to pthread_spin_trylock.S

	* sysdeps/i386/i486/pthread_spin_trylock.S: Moved to ...
	* sysdeps/i386/pthread_spin_trylock.S: Here.
	* sysdeps/i386/i586/pthread_spin_trylock.S: Removed.
	* sysdeps/i386/i686/pthread_spin_trylock.S: Updated.
2015-08-27 07:55:29 -07:00
H.J. Lu 1894b3ea3c Move i486/string-inlines.c to string-inlines.c
Since glibc doesn't support i386 any more, we can move
i486/string-inlines.c to string-inlines.c.

	* sysdeps/i386/i486/string-inlines.c: Moved to ...
	* sysdeps/i386/string-inlines.c: Here.
2015-08-27 07:51:55 -07:00
H.J. Lu 267dfab1bd Move i486/htonl.S to htonl.S
Since glibc doesn't support i386 any more, we can move i486/htonl.S to
htonl.S.

	* sysdeps/i386/i486/htonl.S: Moved ...
	* sysdeps/i386/htonl.S: here.
2015-08-27 07:50:34 -07:00
H.J. Lu e30680c07a Move i486/bits/atomic.h to bits/atomic.h
Since glibc doesn't support i386 any more, we can move i486/bits/atomic.h
to bits/atomic.h.

	* sysdeps/i386/i486/bits/atomic.h: Moved to ...
	* sysdeps/i386/bits/atomic.h: Here.
2015-08-27 07:49:22 -07:00
H.J. Lu 4d374e4d38 Remove sysdeps/i386/i486/Versions
sysdeps/i386/i486/Versions isn't needed since it duplicates contents
in sysdeps/i386/Versions.

	* sysdeps/i386/i486/Versions: Removed.
2015-08-27 07:45:14 -07:00
Stan Shebs fff289f358 Disable uninitialized warning with GCC 4.8
As with other spots in the code, GCC 4.8 unnecessarily complains about
an uninitialized variable in tanl calcs, so this patch disables.  With
it, the library and sees the usual set of test passes.

	* sysdeps/ieee754/ldbl-96/k_tanl.c: Include <libc-internal.h>.
	(__kernel_tanl): Ignore uninitialized warnings around use of SIGN.
2015-08-26 16:10:43 -07:00
Carlos Eduardo Seo 3c13f28c8e powerpc: Sync hwcap.h with kernel
Linux commit b4b56f9ecab40f3b4ef53e130c9f6663be491894 introduced
a new HWCAP2 bit to indicate that the kernel now aborts a memory
transaction when a syscall is made.  This patch adds that bit to
sysdeps/powerpc/bits/hwcap.h.

2015-08-26  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>

	* sysdeps/powerpc/bits/hwcap.h: Add PPC_FEATURE2_HTM_NOSC.
	* sysdeps/powerpc/dl-procinfo.c:
	(_dl_powerpc_cap_flags): Added descriptor for this hwcap
	feature so it shows when LD_SHOW_AUXV=1.
2015-08-26 14:55:40 -03:00
Paul E. Murphy 6eb901de9b powerpc: Revert to default atomic ops in elision code
Power ISA 2.07B section B.5.5 relaxed the barrier requirement around a
TLE enabled lock.  It is now identical to a traditional lock.

2015-08-26  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>

	* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
	(__arch_compare_and_exchange_val_32_acq): Remove and use common
	definition.  ISA 2.07B no longer requires full sync.
2015-08-26 14:55:33 -03:00
Mike Frysinger a2ab38c9b8 mips: siginfo.h: add SIGSYS details [BZ #18863]
Linux 3.13 added SIGSYS details to siginfo_t; update glibc's copy to
keep in sync with it.
2015-08-26 13:33:54 -04:00
H.J. Lu f6b71eada3 Replace BZERO_P/PIC with USE_AS_BZERO/SHARED
Replace BZERO_P with USE_AS_BZERO in i586/i686 memset.S to support i386
multi-arch memset.  Also we should check SHARED not PIC for libc.so
since libc.a may be compiled with PIC.

	* sysdeps/i386/i586/bzero.S (USE_AS_BZERO): New.
	* sysdeps/i386/i686/bzero.S (USE_AS_BZERO): Likewise.
	* sysdeps/i386/i586/memset.S (BZERO_P): Removed.
	Check USE_AS_BZERO/SHARED instead of BZERO_P/PIC.
	(__memset_zero_constant_len_parameter): New.
	* sysdeps/i386/i686/memset.S (BZERO_P): Removed.
	Check USE_AS_BZERO/SHARED instead of BZERO_P/PIC.
	(__memset_zero_constant_len_parameter): Don't define if
	__memset_chk or USE_AS_BZERO are defined.
2015-08-26 08:01:03 -07:00
H.J. Lu b6e19c4bdc Replace MEMPCPY_P/PIC with USE_AS_MEMPCPY/SHARED
Replace MEMPCPY_P with USE_AS_MEMPCPY in i586 memcpy.S to support i386
multi-arch memcpy.  Also we should check SHARED not PIC for libc.so
since libc.a may be compiled with PIC.

	* sysdeps/i386/i586/memcpy.S (MEMPCPY_P): Removed.
	Check USE_AS_MEMPCPY/SHARED instead of MEMPCPY_P/PIC.
	* sysdeps/i386/i586/mempcpy.S (USE_AS_MEMPCPY): New.
2015-08-26 07:59:32 -07:00
H.J. Lu 38d22f9f48 Don't disable SSE in x86-64 ld.so
Since x86-64 ld.so preserves vector registers now, we can use SSE in
x86-64 ld.so.  We should run tst-ld-sse-use.sh only on i386.

	* sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os,
	tests-special, $(objpfx)tst-ld-sse-use.out): Moved to ...
	* sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os,
	tests-special, $(objpfx)tst-ld-sse-use.out): Here.  Update
	comments.
	* sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add
	-mno-mmx for $(all-rtld-routines).
	* sysdeps/x86/tst-ld-sse-use.sh: Moved to ...
	* sysdeps/i386/tst-ld-sse-use.sh: Here.  Replace x86-64 with
	i386.
2015-08-26 07:55:42 -07:00
Stefan Liebler b022830beb Adjust _Unwind_Word in unwind.h to version in libgcc.
Building glibc on s390-32 with gcc option -mzarch produces the error due to
sysdeps/s390/jmpbuf-unwind.h:37:10: (void *) (_Unwind_GetCFA  (_context):
cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

Building on s390-32 in esa-mode or s390-64 is fine.

_Unwind_GetCFA returns an _Unwind_Word which is an unsigned
with a size of 4 bytes on s390-32 (esa-mode) and 8 bytes on s390-64.
On s390-32 (zarch-mode), _Unwind_Word has a size of 8 bytes, too.

_Unwind_Word is defined in sysdeps/generic/unwind.h as
typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));

In libgcc unwind header (<gcc-src>/libgcc/unwind-generic.h) this typedef has
changed to "typedef unsigned _Unwind_Word __attribute__((__mode__(__unwind_word__)));"
in June 2008.

With this mode, _Unwind_Word has a size of 4 bytes on s390-32 (zarch-mode).
The same change applies to _Unwind_Sword.
Thus this patch updates the unwind header according to these changes.

Afterwards, the int-to-pointer-cast-warning is gone away on s390-32 (zarch-mode)
and the testsuite runs with the same test-failures as s390-32 (esa-mode)
plus FAIL: c++-types-check. Here register_t is expected to has a size of 4 bytes,
but it has a size of 8 bytes due to:
posix/sys/types.h:205:typedef int register_t __attribute__ ((__mode__ (__word__)));

The libgcc-patch for gcc 4.4 can be found here:
"[PATCH, spu, unwind] Remove attribute ((mode (word))) from unwind.h"
https://gcc.gnu.org/ml/gcc-patches/2008-06/msg00969.html

ChangeLog:

	* sysdeps/generic/unwind.h
	(_Unwind_Word): Use __mode__(__unwind_word__)
	instead of __mode__(__word__).
	(_Unwind_Sword): Likewise.
2015-08-26 10:26:26 +02:00
Stefan Liebler 808d702288 S390: Fix build error with gcc6 in utf8_utf16-z9.c.
This patch fixes the build error with gcc6:
array subscript is above array bounds [-Werror=array-bounds]

While including loop.c to construct the SINGLE(LOOPFCT) method
for converting from UTF-16 to UTF-8, the bytebuf array with length
MAX_NEEDED_INPUT is used as inptr. MAX_NEEDED_INPUT defaults to
MIN_NEEDED_INPUT if not defined before including loop.c.
Thus bytebuf has a length of 2.
This patch defines MAX_NEEDED_INPUT to MAX_NEEDED_TO, which is 4.

ChangeLog:

	* sysdeps/s390/s390-64/utf8-utf16-z9.c
	(MAX_NEEDED_INPUT): New define.
	(MAX_NEEDED_OUTPUT): New define.
2015-08-26 10:26:26 +02:00
Stefan Liebler 798f5b4b5d S390: Optimize memrchr.
This patch provides optimized version of memrchr with the z13 vector
instructions.

ChangeLog:

	* sysdeps/s390/multiarch/memrchr-c.c: New File.
	* sysdeps/s390/multiarch/memrchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/memrchr.c: Likewise.
	* sysdeps/s390/multiarch/Makefile
	(sysdep_routines): Add memrchr functions.
	* sysdeps/s390/multiarch/ifunc-impl-list-common.c
	(__libc_ifunc_impl_list_common): Add ifunc test for memrchr.
2015-08-26 10:26:26 +02:00
Stefan Liebler f21216015b S390: Optimize wmemcmp.
This patch provides optimized version of wmemcmp with the z13 vector
instructions.

ChangeLog:

	* sysdeps/s390/multiarch/wmemcmp-c.c: New File.
	* sysdeps/s390/multiarch/wmemcmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/wmemcmp.c: Likewise.
	* sysdeps/s390/multiarch/Makefile
	(sysdep_routines): Add wmemcmp functions.
	* sysdeps/s390/multiarch/ifunc-impl-list-common.c
	(__libc_ifunc_impl_list_common): Add ifunc test for wmemcmp.
	* benchtests/bench-wmemcmp.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wmemcmp.
2015-08-26 10:26:25 +02:00
Stefan Liebler 2e9e166761 S390: Optimize wmemset.
This patch provides optimized version of wmemset with the z13 vector
instructions.

ChangeLog:

	* sysdeps/s390/multiarch/wmemset-c.c: New File.
	* sysdeps/s390/multiarch/wmemset-vx.S: Likewise.
	* sysdeps/s390/multiarch/wmemset.c: Likewise.
	* sysdeps/s390/multiarch/Makefile
	(sysdep_routines): Add wmemset functions.
	* sysdeps/s390/multiarch/ifunc-impl-list-common.c
	(__libc_ifunc_impl_list_common): Add ifunc test for wmemset.
	* wcsmbs/wmemset.c: Use WMEMSET if defined.
	* string/test-memset.c: Add wmemset support.
	* wcsmbs/test-wmemset.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wmemset.
	* benchtests/bench-memset.c: Add wmemset support.
	* benchtests/bench-wmemset.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wmemset.
2015-08-26 10:26:25 +02:00
Stefan Liebler 9b593dc305 S390: Optimize memccpy.
This patch provides optimized versions of memccpy with the z13 vector
instructions.

ChangeLog:

	* sysdeps/s390/multiarch/memccpy-c.c: New File.
	* sysdeps/s390/multiarch/memccpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/memccpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile
	(sysdep_routines): Add memccpy functions.
	* sysdeps/s390/multiarch/ifunc-impl-list-common.c
	(__libc_ifunc_impl_list_common): Add ifunc test for memccpy.
	* string/memccpy.c: Use MEMCCPY if defined.
2015-08-26 10:26:25 +02:00
Stefan Liebler 88eefd344b S390: Optimize memchr, rawmemchr and wmemchr.
This patch provides optimized versions of memchr, rawmemchr and wmemchr with the
z13 vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/memchr-vx.S: New File.
	* sysdeps/s390/multiarch/memchr.c: Likewise.
	* sysdeps/s390/multiarch/rawmemchr-c.c: Likewise.
	* sysdeps/s390/multiarch/rawmemchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/rawmemchr.c: Likewise.
	* sysdeps/s390/multiarch/wmemchr-c.c: Likewise.
	* sysdeps/s390/multiarch/wmemchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/wmemchr.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/memchr.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/memchr.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memchr, wmemchr
	and rawmemchr functions.
	* sysdeps/s390/multiarch/ifunc-impl-list-common.c
	(__libc_ifunc_impl_list_common): Add ifunc test for memchr, rawmemchr
	and wmemchr.
	* wcsmbs/wmemchr.c: Use WMEMCHR if defined.
	* string/test-memchr.c: Add wmemchr support.
	* wcsmbs/test-wmemchr.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wmemchr.
	* benchtests/bench-memchr.c: Add wmemchr support.
	* benchtests/bench-wmemchr.c: New File.
	* benchtests/Makefile (wcsmbs-bench): wmemchr.
2015-08-26 10:26:24 +02:00
Stefan Liebler b4c21601b1 S390: Optimize strcspn and wcscspn.
This patch provides optimized versions of strcspn and wcscspn with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strcspn-c.c: New File.
	* sysdeps/s390/multiarch/strcspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/strcspn.c: Likewise.
	* sysdeps/s390/multiarch/wcscspn-c.c: Likewise.
	* sysdeps/s390/multiarch/wcscspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcscspn.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcspn and
	wcscspn functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strcspn, wcscspn.
	* wcsmbs/wcscspn.c: Use WCSCSPN if defined.
	* string/test-strcspn.c: Add wcscspn support.
	* wcsmbs/test-wcscspn.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcscspn.
	* benchtests/bench-strcspn.c: Add wcscspn support.
	* benchtests/bench-wcscspn.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcscspn.
2015-08-26 10:26:24 +02:00
Stefan Liebler f0ba659847 S390: Optimize strpbrk and wcspbrk.
This patch provides optimized versions of strpbrk and wcspbrk with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strpbrk-c.c: New File.
	* sysdeps/s390/multiarch/strpbrk-vx.S: Likewise.
	* sysdeps/s390/multiarch/strpbrk.c: Likewise.
	* sysdeps/s390/multiarch/wcspbrk-c.c: Likewise.
	* sysdeps/s390/multiarch/wcspbrk-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcspbrk.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strpbrk and
	wcspbrk functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strpbrk, wcspbrk.
	* wcsmbs/wcspbrk.c: Use WCSPBRK if defined.
	* string/test-strpbrk.c: Add wcspbrk support.
	* wcsmbs/test-wcspbrk.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcspbrk.
	* benchtests/bench-strpbrk.c: Add wcspbrk support.
	* benchtests/bench-wcspbrk.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcspbrk.
2015-08-26 10:26:24 +02:00
Stefan Liebler f1ffad98be S390: Optimize strspn and wcsspn.
This patch provides optimized versions of strspn and wcsspn with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strspn-c.c: New File.
	* sysdeps/s390/multiarch/strspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/strspn.c: Likewise.
	* sysdeps/s390/multiarch/wcsspn-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsspn.c: Likewise.
	* wcsmbs/wcsspn.c: Use WCSSPN if defined.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strspn and
	wcsspn functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strspn, wcsspn.
	* string/test-strspn.c: Add wcsspn support.
	* wcsmbs/test-wcsspn.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsspn.
	* benchtests/bench-strspn.c: Add wcsspn support.
	* benchtests/bench-wcsspn.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsspn.
2015-08-26 10:26:24 +02:00
Stefan Liebler f40132d4bd S390: Optimize strrchr and wcsrchr.
This patch provides optimized versions of strrchr and wcsrchr with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strrchr-c.c: New File.
	* sysdeps/s390/multiarch/strrchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/strrchr.c: Likewise.
	* sysdeps/s390/multiarch/wcsrchr-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsrchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsrchr.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strrchr and
	wcsrchr functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strrchr, wcsrchr.
	* benchtests/bench-wcsrchr.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsrchr.
2015-08-26 10:26:23 +02:00
Stefan Liebler d23d4ef19f S390: Optimize strchrnul and wcschrnul.
This patch provides optimized versions of strchrnul and wcschrnul with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strchrnul-c.c: New File.
	* sysdeps/s390/multiarch/strchrnul-vx.S: Likewise.
	* sysdeps/s390/multiarch/strchrnul.c: Likewise.
	* sysdeps/s390/multiarch/wcschrnul-c.c: Likewise.
	* sysdeps/s390/multiarch/wcschrnul-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcschrnul.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strchrnul and
	wcschrnul functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strchrnul, wcschrnul.
	* wcsmbs/wcschrnul.c: Use WCSCHRNUL if defined.
	* string/test-strchr.c: Add wcschrnul support.
	* wcsmbs/test-wcschrnul.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcschrnul.
	* benchtests/bench-strchr.c: Add wcschrnul support.
	* benchtests/bench-wcschrnul.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcschrnul.
2015-08-26 10:26:23 +02:00
Stefan Liebler cf150d45a9 S390: Optimize strchr and wcschr.
This patch provides optimized versions of strchr and wcschr with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strchr-c.c: New File.
	* sysdeps/s390/multiarch/strchr-vx.S: Likewise.
	* sysdeps/s390/multiarch/strchr.c: Likewise.
	* sysdeps/s390/multiarch/wcschr-c.c: Likewise.
	* sysdeps/s390/multiarch/wcschr-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcschr.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strchr and
	wcschr functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strchr, wcschr.
	* string/strchr.c (STRCHR): Define and use macro.
	* benchtests/bench-wcschr.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcschr.
2015-08-26 10:26:23 +02:00
Stefan Liebler cee82e70cc S390: Optimize strncmp and wcsncmp.
This patch provides optimized versions of strncmp and wcsncmp with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncmp-c.c: New File.
	* sysdeps/s390/multiarch/strncmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/strncmp.c: Likewise.
	* sysdeps/s390/multiarch/wcsncmp-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncmp.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncmp and
	wcsncmp functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncmp, wcsncmp.
	* wcsmbs/wcsncmp.c (WCSNCMP): Define and use macro.
	* benchtests/bench-strncmp.c: Add wcsncmp support.
	* benchtests/bench-wcsncmp.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncmp.
2015-08-26 10:26:22 +02:00
Stefan Liebler 63724a6db6 S390: Optimize strcmp and wcscmp.
This patch provides optimized versions of strcmp and wcscmp with the z13
vector instructions.

The architecture specific string.h had a typo, which leads to ommiting the
inline version in this file if __USE_STRING_INLINES is defined.
Tested this inline version by tweaking test-strcmp.c.

ChangeLog:

	* sysdeps/s390/multiarch/strcmp-vx.S: New File.
	* sysdeps/s390/multiarch/strcmp.c: Likewise.
	* sysdeps/s390/multiarch/wcscmp-c.c: Likewise.
	* sysdeps/s390/multiarch/wcscmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcscmp.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/strcmp.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/strcmp.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcmp and
	wcscmp functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strcmp, wcscmp.
	* string/strcmp.c (STRCMP): Define and use macro.
	* benchtests/bench-wcscmp.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcscmp.
	* sysdeps/s390/bits/string.h: Fix typo: _HAVE_STRING_ARCH_strcmp
	instead of _HAVE_STRING_ARCH_memchr.
2015-08-26 10:26:22 +02:00
Stefan Liebler e1fe91180e S390: Optimize strncat wcsncat.
This patch provides optimized versions of strncat and wcsncat with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncat-c.c: New File.
	* sysdeps/s390/multiarch/strncat-vx.S: Likewise.
	* sysdeps/s390/multiarch/strncat.c: Likewise.
	* sysdeps/s390/multiarch/wcsncat-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncat-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncat.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncat and
	wcsncat functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncat, wcsncat.
	* wcsmbs/wcsncat.c (WCSNCAT): Define and use macro.
	* string/test-strncat.c: Add wcsncat support.
	* wcsmbs/test-wcsncat.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsncat.
	* benchtests/bench-strncat.c: Add wcsncat support.
	* benchtests/bench-wcsncat.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncat.
2015-08-26 10:26:22 +02:00
Stefan Liebler d626a24f23 S390: Optimize strcat and wcscat.
This patch provides optimized versions of strcat and wcscat with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strcat-c.c: New File.
	* sysdeps/s390/multiarch/strcat-vx.S: Likewise.
	* sysdeps/s390/multiarch/strcat.c: Likewise.
	* sysdeps/s390/multiarch/wcscat-c.c: Likewise.
	* sysdeps/s390/multiarch/wcscat-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcscat.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcat and
	wcscat functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strcat, wcscat.
	* string/strcat.c (STRCAT): Define and use macro.
	* wcsmbs/wcscat.c: Use WCSCAT if defined.
	* string/test-strcat.c: Add wcscat support.
	* wcsmbs/test-wcscat.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcscat.
	* benchtests/bench-strcat.c: Add wcscat support.
	* benchtests/bench-wcscat.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcscat.
2015-08-26 10:26:21 +02:00
Stefan Liebler b3a0c176d1 S390: Optimize stpncpy and wcpncpy.
This patch provides optimized versions of stpncpy and wcpncpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/stpncpy-c.c: New File.
	* sysdeps/s390/multiarch/stpncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/stpncpy.c: Likewise.
	* sysdeps/s390/multiarch/wcpncpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcpncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcpncpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpncpy and
	wcpncpy functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for stpncpy, wcpncpy.
	* wcsmbs/wcpncpy.c: Use WCPNCPY if defined.
	* string/test-stpncpy.c: Add wcpncpy support.
	* wcsmbs/test-wcpncpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcpncpy.
	* benchtests/bench-stpncpy.c: Add wcpncpy support.
	* benchtests/bench-wcpncpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcpncpy.
2015-08-26 10:26:21 +02:00
Stefan Liebler d183b96ee6 S390: Optimize strncpy and wcsncpy.
This patch provides optimized versions of strncpy and wcsncpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncpy-vx.S: New File.
	* sysdeps/s390/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/multiarch/wcsncpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncpy.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncpy and
	wcsncpy functions.
	* wcsmbs/wcsncpy.c: Use WCSNCPY if defined.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncpy, wcsncpy.
	* string/test-strncpy.c: Add wcsncpy support.
	* wcsmbs/test-wcsncpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsncpy.
	* benchtests/bench-strncpy.c: Add wcsncpy support.
	* benchtests/bench-wcsncpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncpy
2015-08-26 10:26:21 +02:00
Stefan Liebler 8ade3db78d S390: Optimize stpcpy and wcpcpy.
This patch provides optimized versions of stpcpy and wcpcpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/stpcpy-c.c: New File.
	* sysdeps/s390/multiarch/stpcpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/stpcpy.c: Likewise.
	* sysdeps/s390/multiarch/wcpcpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcpcpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcpcpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpcpy and
	wcpcpy functions.
	* string/stpcpy.c: Use STPCPY if defined.
	* wcsmbs/wcpcpy.c: Use WCPCPY if defined.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for stpcpy, wcpcpy.
	* string/test-stpcpy.c: Add wcpcpy support.
	* wcsmbs/test-wcpcpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcpcpy.
	* benchtests/bench-stpcpy.c: Add wcpcpy support.
	* benchtests/bench-wcpcpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcpcpy.
2015-08-26 10:26:21 +02:00
Stefan Liebler 680df122ab S390: Optimize strcpy and wcscpy.
This patch provides optimized versions of strcpy and wcscpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strcpy-vx.S: New File.
	* sysdeps/s390/multiarch/strcpy.c: Likewise.
	* sysdeps/s390/multiarch/wcscpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcscpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcscpy.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/strcpy.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/strcpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcpy and
	wcscpy functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strcpy, wcscpy.
	* benchtests/bench-wcscpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcscpy.
2015-08-26 10:26:20 +02:00