Commit Graph

28294 Commits

Author SHA1 Message Date
H.J. Lu 63180606ee Mention fix for BZ #17732 2014-12-30 08:25:40 -08:00
H.J. Lu 126f6c7288 Replace %ld with %jd and cast to intmax_t 2014-12-30 08:10:19 -08:00
H.J. Lu fe342f5013 Replace %ld with %jd and cast to intmax_t 2014-12-30 08:09:43 -08:00
H.J. Lu 37f469007d Replace %ld with %jd and cast to intmax_t 2014-12-30 08:09:06 -08:00
H.J. Lu ad86fbc3d5 Replace %ld with %jd and cast to intmax_t 2014-12-30 08:08:29 -08:00
H.J. Lu 5d619de461 Replace %ld/%lu with %jd/%ju and cast to intmax_t/uintmax_t 2014-12-30 08:07:50 -08:00
H.J. Lu 6490d94537 Replace %ld with %jd and cast to intmax_t 2014-12-30 08:07:05 -08:00
H.J. Lu e401d5ca5d Replace %ld with %jd and cast to intmax_t 2014-12-30 08:06:35 -08:00
H.J. Lu 41fad83083 Replace %ld with %jd and cast to intmax_t 2014-12-30 08:05:47 -08:00
H.J. Lu 8d2b2763fc Replace %ld with %jd and cast to intmax_t 2014-12-30 08:04:43 -08:00
Andrew Senkevich 8b4416d83c i386: memcpy functions with SSE2 unaligned load/store
These new memcpy functions are the 32-bit version of x86_64 SSE2 unaligned
memcpy.  Memcpy average performace benefit is 18% on Silvermont, other
platforms also improved about 35%, benchmarked on Silvermont, Haswell, Ivy
Bridge, Sandy Bridge and Westmere, performance results attached in

https://sourceware.org/ml/libc-alpha/2014-07/msg00157.html

	* sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S: New file.
	* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Likewise.
	* sysdeps/i386/i686/multiarch/memmove-sse2-unaligned.S: Likewise.
	* sysdeps/i386/i686/multiarch/mempcpy-sse2-unaligned.S: Likewise.
	* sysdeps/i386/i686/multiarch/bcopy.S: Select the sse2_unaligned
	version if bit_Fast_Unaligned_Load is set.
	* sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
	* sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
	* sysdeps/i386/i686/multiarch/memmove.S: Likewise.
	* sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
	* sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
	* sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
	* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
	bcopy-sse2-unaligned, memcpy-sse2-unaligned,
	memmove-sse2-unaligned and mempcpy-sse2-unaligned.
	* sysdeps/i386/i686/multiarch/ifunc-impl-list.c (MAX_IFUNC): Set
	to 4.
	(__libc_ifunc_impl_list): Test __bcopy_sse2_unaligned,
	__memmove_chk_sse2_unaligned, __memmove_sse2_unaligned,
	__memcpy_chk_sse2_unaligned, __memcpy_sse2_unaligned,
	__mempcpy_chk_sse2_unaligned, and __mempcpy_sse2_unaligned.
2014-12-30 07:19:38 -08:00
Chris Metcalf 6d6d7fde04 Fix a couple of -Wundef warnings. 2014-12-29 23:14:38 -05:00
Chris Metcalf cd2c37c979 tile: prefer inlines to macros in math_private.h. 2014-12-29 19:48:43 -05:00
Chris Metcalf e47b8d3bbc posix/Makefile: use $(objpfx) for files in before-compile.
This fixes a build failure with a separate build tree where
posix-conf-vars-def.h wasn't being built.
2014-12-29 10:58:25 -05:00
Siddhesh Poyarekar 7910c2ae73 Make type for spec variable size as size_t 2014-12-29 19:56:52 +05:30
Siddhesh Poyarekar 50cbbaa935 Use posix-conf-vars.list to generate spec array
This patch adds support to generate the spec array in getconf from the
conf.list.  The generated code is mostly unchanged.  the only changes
are due to the change in layout of the spec and val arrays in the ELF.

The val array can also be auto-generated from posix-conf-vars.list
once the remaining macros are added to it.

	* posix/posix-conf-vars.list (SPEC:XBS5): Add sysconf prefix.
	* posix/confstr.c: Define NEED_SPEC_ARRAY to 0.
	* posix/posix-envs.def: Likewise.
	* sysdeps/posix/sysconf.c: Likewise.
	* posix/getconf.c: Define NEED_SPEC_ARRAY to 1.
	(specs): Remove array.
	* scripts/gen-posix-conf-vars.awk: Support generation of specs
	array.
2014-12-29 19:56:27 +05:30
Siddhesh Poyarekar 3b566046c3 Add _POSIX namespace SYSCONF macros to posix-conf-vars.list
This fixes the remaining -Wundef warnings.  Tested on x86_64.

	* posix/posix-conf-vars.list: Add _POSIX sysconf namespace.
	* sysdeps/posix/sysconf.c: Include posix-conf-vars.h.
	(__sysconf): Use CONF_IS_* macros.
2014-12-29 19:56:01 +05:30
Siddhesh Poyarekar 4a6aca7bf8 Remove Wundef warnings for specification macros
This patch adds a file posix-conf-vars.list that is used to generate
macros to determine if a macro is defined as set, unset or not
defined.  gen-posix-conf-vars.awk processes this file and generates a
header (posix-conf-vars-def.h) with these macros.  A new header
posix-conf-vars.h includes this generated header and defines accessor
macros for the generated macros.

Tested on x86_64.

	* posix/Makefile (before-compile): Add posix-conf-vars-def.h.
	($(objpfx)posix-conf-vars-def.h): New target.
	* posix/posix-conf-vars.list: New file.
	* posix/posix-conf-vars.h: New file.
	* posix/confstr.c: Include posix-conf-vars.h.
	(confstr): Use CONF_IS_* macros.
	* posix/posix-envs.def: Include posix-conf-vars.h.  Use
	CONF_IS_* macros.
	* scripts/gen-posix-conf-vars.awk: New file.
2014-12-29 17:37:54 +05:30
Chris Metcalf 0025b4cc84 tile: add no-op fe*() routines for libc internal use
These avoid having tile generate real calls to the no-op
functions, which then causes linknamespace test failures.

It might make sense to factor all of these out into a common
header that can be shared by tile, microblaze, etc., but for
now just fix the test failures.
2014-12-26 18:39:47 -05:00
Chris Metcalf d8aaf74be9 linux/clock_settime: remove unnecessary vDSO definitions
These definitions were added back before __ASSUME_POSIX_CPU_TIMERS
was removed.  There used to be a vsyscall to clock_getres() in
maybe_syscall_settime_cpu(), but that function was removed in commit
26889eac.  The presence of the vsyscall definitions means that platforms
that don't provide clock_getres as a vsyscall hit a symbol redefinition
warning in this file, becoming fatal with -Werror.  Removing the
vsyscall definitions is the obvious fix.

No change to generated code on x86_64.
2014-12-26 16:34:02 -05:00
Chris Metcalf 5d24aa6056 tilegx: fix sysdep.h to avoid a redefinition warning
The symbol for HAVE_CLOCK_GETTIME_VSYSCALL was being
only conditionally defined under [SHARED].  However, it turns
out this causes a preprocessor symbol redefinition warning
when building clock_gettime.o.  Move the symbol definition
down to make it unconditional, like other platforms do.
2014-12-26 16:22:28 -05:00
Chris Metcalf 7c1395a7e4 tilegx32: avoid a a -Werror warning from unwinding
The _Unwind_GetCFA() routine returns a 64-bit value,
which we interpret as a pointer.  Add an intermediate
cast to long so that in ILP32 mode we don't get a warning
about casting a wrong-sized integer to a pointer.
2014-12-26 16:18:40 -05:00
Chris Metcalf 3c87c6167e tilegx: enable wordsize-64 support for ieee745 dbl-64.
I missed this during the initial port.  Some testing shows that
enabling this mode does, unsurprisingly, yield some nice speedups
on the math functions in question.
2014-12-23 14:04:35 -05:00
Richard Earnshaw f559d8cf29 * string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy. 2014-12-23 08:58:18 -08:00
Florian Weimer 7d81e8d6db iconvdata/run-iconv-test.sh: Actually test iconv modules
Arjun Shankar noticed that this test case was not testing anything
because iconv was invoked without the required arguments.
2014-12-23 16:16:32 +01:00
Joseph Myers 90aa3d0945 Make __ASSUME_UTIMES hppa-specific.
This patch makes __ASSUME_UTIMES hppa-specific, removing mentions of
the macro from architecture-independent code and code for other
architectures.  (All other architectures either have the utimes
syscall in all relevant kernel versions, or use the asm-generic
interface so only have utimensat and won't get the utimes syscall.)  A
similar approach is used to that used for futimesat for MicroBlaze: if
the kernel is recent enough that the utimes syscall can be assumed to
be present, use the implementation in terms of the utimes syscall, and
otherwise use the linux/generic implementation in terms of utimensat.

Tested x86_64 that the disassembly of installed shared libraries is
unchanged by the patch.  Not tested for hppa.

	* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Do
	not define.
	* sysdeps/unix/sysv/linux/utimes.c: Do not include
	<kernel-features.h>.
	(__utimes) [__NR_utimes]: Make code unconditional.
	(__utimes) [!__ASSUME_UTIMES]: Remove conditional code.
	* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
	(__ASSUME_UTIMES): Do not undefine.
	* sysdeps/unix/sysv/linux/tile/kernel-features.h
	(__ASSUME_UTIMES): Likewise.
	* sysdeps/unix/sysv/linux/hppa/kernel-features.h
	(__ASSUME_UTIMES): Define for [__LINUX_KERNEL_VERSION >= 0x030e00]
	instead of undefining for [__LINUX_KERNEL_VERSION < 0x030e00].
	* sysdeps/unix/sysv/linux/hppa/utimes.c: New file.
2014-12-22 21:42:03 +00:00
Steve Ellcey 4c0c0e2aef Fix preprocessor indentation in sysdeps/mips/memcpy.S.
Checked in as obvious.
2014-12-22 13:29:20 -08:00
Chris Metcalf e2c8fa2b1c NEWS: mention bug fix for 17747. 2014-12-22 16:24:32 -05:00
Chris Metcalf b638f96a76 Fix namespace conformance issue with Bessel functions.
[BZ #17747]
The y0/y1/yn and j0/j1/jn functions provided a strong_alias
to the "l"-suffixed variants when no long double support is
being compiled.  This breaks namespace conformance when the
basename versions conform but the l-suffixed ones don't.
Fixed by making them weak aliases instead.
2014-12-22 15:24:17 -05:00
Chris Metcalf 0dacd7a3b9 tilegx: remove implicit boolean conversion in strstr.
[BZ #17746]
The __builtin_expect() truncated a uint64_t to a 32-bit long
in ILP32 mode, discarding the high 32 bits, and potentially
missing the NUL terminator that we were searching for with SIMD
operations.  Explicitly compare to zero to fix the problem.
2014-12-22 14:50:26 -05:00
Chris Metcalf 929011700c Update NEWS and ChangeLog with two tile bug fixes.
I committed fixes without references to bug numbers.

Bug 17744: commit 95dee05f.
Bug 17745: commit e969965a.
2014-12-22 14:45:02 -05:00
Steve Ellcey 528479c472 2014-12-22 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Set
	to zero if not already defined.
2014-12-22 10:49:56 -08:00
Joseph Myers f56f91245a Split __kernel_standard* functions (fixes bug 17724).
Bug 17724 reports references to fesetround being brought in by
ldbl-128ibm rintl via references to __rintl from __kernel_standard_l.
Because all three __kernel_standard* functions are in the same file,
this gets brought in even though only the long double version
__kernel_standard_l needs __rintl, and the C90 functions use only
__kernel_standard.

This patch fixes this by splitting the three versions into separate
files; it's fine for long double functions to refer to fe* functions
directly, unless they get called by C90 double functions.

Tested for x86_64 (testsuite; the reordering of code means disassembly
of shared libraries can't usefully be compared).  Tested for powerpc
that the relevant issue disappears from the linknamespace test
output.

	[BZ #17724]
	* sysdeps/ieee754/k_standard.c: Don't include <float.h>.
	(__kernel_standard_f): Remove.  Moved to k_standardf.c.
	(__kernel_standard_l): Remove.  Moved to k_standardl.c with
	(char *) casts added.
	* sysdeps/ieee754/k_standardf.c: New file.
	* sysdeps/ieee754/k_standardl.c: Likewise.
	* math/Makefile (libm-support): Remove k_standard.
	(libm-calls): Add k_standard.
2014-12-22 18:45:50 +00:00
Steve Ellcey 9d1fc928a4 Remove trailing whitespace. 2014-12-22 10:36:49 -08:00
Steve Ellcey 2ef4b74a10 Add missing ChangeLog entries from Friday (Dec 19, 2014). 2014-12-22 10:35:32 -08:00
Wilco Dijkstra 8622d55688 Optimize to avoid an unnecessary FPCR read. 2014-12-22 17:14:55 +00:00
Wilco Dijkstra f3806bdbc1 Optimize to reduce FPCR/FPSR accesses. 2014-12-22 17:14:54 +00:00
Wilco Dijkstra 9b47df5814 Call libc_fetestexcept_aarch64. 2014-12-22 17:14:54 +00:00
Wilco Dijkstra 97be3cacec Call libc_fesetround_aarch64. 2014-12-22 16:57:41 +00:00
Joseph Myers 935ab81792 Fix resolver bind, getsockname namespace (bug 17733).
On Linux architectures using socketcall, the resolver ends up bringing
in strong symbols for bind and getsockname, which are not in
POSIX.1-1996.  This causes linknamespace test failures:

FAIL: conform/POSIX/pthread.h/linknamespace
FAIL: conform/POSIX/sched.h/linknamespace
FAIL: conform/POSIX/time.h/linknamespace

These functions are defined as strong symbols with __bind and
__getsockname as weak aliases.  This patch switches this to the other
way round by removing the NO_WEAK_ALIAS definitions and so letting the
default case in socket.S act; I see no reason for the existing
arrangements.

Tested for x86 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).

	[BZ #17733]
	* sysdeps/unix/sysv/linux/bind.S (NO_WEAK_ALIAS): Do not define.
	(__bind): Do not define as weak alias.
	* sysdeps/unix/sysv/linux/getsockname.S (NO_WEAK_ALIAS): Do not
	define.
	(__getsockname): Do not define as weak alias.
2014-12-22 12:46:27 +00:00
Will Newton cc8623f196 Require bison 2.7 or newer for regenerating intl/plural.y
The merge of the latest gettext code introduced changes to the yacc
parser source that are incompatible with versions of bison older
than 2.7. Add a configure check for the appropriate versions and
document the requirement in INSTALL.

ChangeLog:

2014-12-22  Will Newton  <will.newton@linaro.org>

	* manual/install.texi: Document that we require bison 2.7
	or above.
	* INSTALL: Regenerate.
	* configure.ac: Use AC_CHECK_PROG_VER instead of
	AC_PATH_PROG when checking for bison and check for
	version 2.7 or above.
	* configure: Regenerate.
2014-12-22 11:57:40 +00:00
Chris Metcalf e969965afd tile: separate ffsll from ffs
This avoids a linknamespace failure when ffs is legal
but ffsll is not.
2014-12-21 17:12:54 -05:00
Chris Metcalf a19ca65ade tile: remove localplt.data and use generic one again.
With the __tls_get_addr removed, it works for tile.
2014-12-21 16:09:36 -05:00
H.J. Lu 050f7298e1 Add hidden __tls_get_addr/___tls_get_addr alias
__tls_get_addr/___tls_get_addr is always defined in ld.so.  There is
no need to call them via PLT inside ld.so.  This patch adds the hidden
__tls_get_addr/___tls_get_addr aliases and calls them directly from
_dl_tlsdesc_dynamic.  There is no need to set up the EBX register in
i386 _dl_tlsdesc_dynamic when calling the hidden ___tls_get_addr.

	* elf/dl-tls.c (__tls_get_addr): Provide the hidden definition
	if not defined.
	* sysdeps/i386/dl-tls.h (___tls_get_addr): Provide the hidden
	definition.
	* sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the
	hidden ___tls_get_addr.
	* sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the
	hidden __tls_get_addr.
	* sysdeps/generic/localplt.data (__tls_get_addr): Removed.
	* sysdeps/unix/sysv/linux/i386/localplt.data (___tls_get_addr):
	Likewise.
2014-12-21 09:27:11 -08:00
Andreas Schwab 6df5547e93 m68k: remove @PLTPC from _dl_init call 2014-12-21 15:21:14 +01:00
Andreas Schwab c1764d5e79 Fix changelog typo 2014-12-21 15:21:14 +01:00
H.J. Lu 7432d613cd Remove @PLT from "call _dl_init@PLT" in _dl_start_user
_dl_start_user in ld.so calls the local function _dl_init.  There is no
need to go through PLT.

	* sysdeps/i386/dl-machine.h (_dl_start_user): Remove @PLT
	from "call _dl_init@PLT".
	* sysdeps/x86_64/dl-machine.h (_dl_start_user): Likewise.
	from "call _dl_init@PLT".
2014-12-21 05:27:31 -08:00
Anders Kaseorg 98fe149e34 manual: Correct guarantee about pointers compared by qsort()
C99, C11, POSIX, and the glibc implementation do guarantee that the
pointers passed to the qsort comparison function lie within the array.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2014-12-21 14:11:32 +01:00
Chris Metcalf d12455f596 tile: provide localplt.data with __tls_get_addr optional 2014-12-20 13:56:57 -05:00
Chris Metcalf 95dee05f17 tilegx: fix strstr to build and link better
The two_way_short_needle() routine included from str-two-way.h
is not used, so mark it so to avoid compiler warnings.

Calling strnlen() breaks linknamespace tests, so change it
to __strnlen().
2014-12-19 22:54:35 -05:00