Commit Graph

9613 Commits

Author SHA1 Message Date
Joseph Myers
cf36e5034f Fix powf (close to -1, large) (bug 18647).
The flt-32 implementation of powf wrongly uses x-1 instead of |x|-1
when computing log (x) for the case where |x| is close to 1 and y is
large.  This patch fixes the logic accordingly.  Relevant tests
existed for x close to 1, and corresponding tests are added for x
close to -1, as well as for some new variant cases.

Tested for x86_64 and x86.

	[BZ #18647]
	* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): For large y
	and |x| close to 1, use absolute value of x when computing log.
	* math/auto-libm-test-in: Add more tests of pow.
	* math/auto-libm-test-out: Regenerated.
2015-08-05 15:01:58 +00:00
Adhemerval Zanella
2aa6c8af26 arm: Assembly implementation cleanup
This patch removes arm assembly implementation of mmap and mmap64.
The new implementation used is the wordsize-32 generic linux one.

Tested on armhf.
2015-08-05 10:41:03 -03:00
Mike Frysinger
182d6096fe mmap64: fix undef warnings
The only target that defines this is m68k, so move the existing fallback
define up to avoid warnings on other systems.
2015-08-05 04:38:56 -04:00
Chris Metcalf
0d261f406d tilepro: fix warnings in sysdeps/tile/tilepro/bits/atomic.h
Using a ({ }) structure avoids the "value computed is not used"
that a simple () structure causes.
2015-08-04 12:07:53 -04:00
Andreas Schwab
bbab82c25d Properly terminate FDE in makecontext for ix86 (bug 18635) 2015-08-04 17:46:56 +02:00
Andrew Senkevich
a9e8ea51cc Prevent runtime fail of SSE vector math tests on non SSE4.1 machine.
[BZ #18740]
    * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
    float-vlen4-arch-ext-cflags): Removed.
    * math/Makefile (CFLAGS-test-double-vlen2-wrappers.c,
    CFLAGS-test-float-vlen4-wrappers.c): Likewise.
2015-07-30 18:00:24 +03:00
Mike Frysinger
243cc404ca hppa: fix pthreadtypes.h namespace failures
The conform tests flag the "aligned" symbol used inside the attributes,
so rename it to __aligned__ like other headers.
2015-07-30 05:03:43 -04:00
Torvald Riegel
87ab9d55f7 hppa: Remove custom lowlevellock.h.
This untested patch removes the custom lowlevellock.h on hppa.  It seems
to contain an implementation equivalent to the generic lowlevellock.h.
2015-07-30 03:37:27 -04:00
Mike Frysinger
827e01851f hppa: sigaction.h: change sa_flags to an int
This fixes the conform test for the sigaction.h header and makes it match
all the other arches.
2015-07-29 23:14:03 -04:00
Mike Frysinger
979900af98 hppa: fix sysdep.h header setup
The semi-recent SYSCALL_CANCEL inclusion broke hppa due to the sysdep.h
headers not including the unix/sysdep.h headers.  Rework the includes so
we match the other ports:
* hppa/sysdep.h:
	- Do not include sys/syscall.h as the unix sysdep.h headers do it.
	- Do not include config.h as libc-symbols.h does it, and it has no
	#ifdef multiple-include protection, and it breaks when some files
	do things like #undef __OPTIMIZE__.
* sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h:
	- Drop the generic/sysdep.h as the unix sysdep.h headers include it.
* sysdeps/unix/sysv/linux/hppa/sysdep.h:
	- Change to the unix & core hppa sysdep header stacks.
	- Undef a few defines that the core headers already set up for us.
2015-07-29 23:09:16 -04:00
Mike Frysinger
a822b0187a hppa: rewrite INLINE_SYSCALL
The semi-recent SYSCALL_CANCEL macro imposes a slight nuance on the
implementation of INLINE_SYSCALL: the nr argument cannot be expanded
directly but must be passed on to another macro which may expand it.
Most arches don't notice because INLINE_SYSCALL is defined in terms
of INTERNAL_SYSCALL which has the additional layer of expansion, but
on hppa, it was attempting to expand it directly.  That causes build
errors like so:
../sysdeps/unix/sysv/linux/sigsuspend.c: In function '__sigsuspend':
../sysdeps/unix/sysv/linux/sigsuspend.c:31:62: error:
	implicit declaration of function 'LOAD_ARGS___SYSCALL_NARGS'
../sysdeps/unix/sysv/linux/sigsuspend.c:31:304: error:
	called object 'LOAD_ARGS___SYSCALL_NARGS(set, 8)' is not a function

So rewrite hppa's INLINE_SYSCALL to use INTERNAL_SYSCALL like other
arches do.  This is also a nice clean up as the two macros had quite
a bit of duplicated logic.
2015-07-29 23:08:15 -04:00
H.J. Lu
9637d8a253 Extend local PLT reference check
On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with
R_*_GLOB_DAT relocation against the same symbol.  This patch extends
local PLT reference check to support alternate relocations.

	[BZ #18078]
	* scripts/check-localplt.awk: Support alternate relocations.
	* scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL
	sections.
	* sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and
	malloc entries with + REL R_386_GLOB_DAT.
	* sysdeps/x86_64/localplt.data: New file.
2015-07-29 11:58:06 -07:00
Andrew Senkevich
febce2ac5f Added runtime check for AVX vector math tests.
[BZ #18731]
    * sysdeps/x86_64/fpu/math-tests-arch.h: Added AVX runtime check.
    * sysdeps/x86_64/fpu/test-double-vlen4.c: Likewise.
    * sysdeps/x86_64/fpu/test-float-vlen8.c: Likewise.
2015-07-29 19:47:29 +03:00
Mike Frysinger
95d8f022bf ia64: drop __tls_get_addr from expected ld.so plt usage
This file was updated with an educated guess as to the symbols needed,
but on ia64, we don't have __tls_get_addr calls, so drop it from the
list.
2015-07-28 05:30:14 -04:00
Mike Frysinger
cf31a2c799 ia64: atomic.h: fix atomic_exchange_and_add 64bit handling
Way back in 2005 the atomic_exchange_and_add function was cleaned up to
avoid the explicit size checking and instead let gcc handle things itself.
Unfortunately that change ended up leaving beyond a cast to int, even when
the incoming value was a long.  This has flown under the radar for a long
time due to the function not being heavily used in the tree (especially as
a full 64bit field), but a recent change to semaphores made some nptl tests
fail reliably.  This is due to the code packing two 32bit values into one
64bit variable (where the high 32bits contained the number of waiters), and
then the whole variable being atomically updated between threads.  On ia64,
that meant we never atomically updated the count, so sometimes the sem_post
would not wake up the waiters.
2015-07-28 02:30:15 -04:00
Mike Frysinger
18855eca32 ia64: clean up old kernel headers cruft
This define made more sense in the pre-sanitized kernel headers days,
but since we require kernel versions that are sanitized, we don't need
this hack anymore.
2015-07-28 02:29:30 -04:00
Chung-Lin Tang
ae5eae7cfc Fixes extern protected data handling testcases elf/tst-protected1a
and elf/tst-protected1b for Nios II.
2015-07-26 05:27:18 -07:00
Chung-Lin Tang
1d4bbc54bd Update Nios II ulps file. 2015-07-25 07:14:29 -07:00
Chung-Lin Tang
3f96834346 Fix order of arguments to rt_sigprocmask syscall when setting the signal mask
in setcontext/swapcontext.
2015-07-24 23:19:50 -07:00
Roland McGrath
6b183b8339 NaCl: Remove bogus O_SHLOCK, O_EXLOCK definitions. 2015-07-24 12:31:23 -07:00
Adhemerval Zanella
48f5f7a63c Update powerpc-fpu libm-test-ulps. 2015-07-24 10:22:55 -03:00
Andrew Senkevich
9901716135 Fixed several libmvec bugs found during testing on KNL hardware.
AVX512 IFUNC implementations, implementations of wrappers to
AVX2 versions and KNL expf implementation fixed.

    * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S: Fixed AVX512 IFUNC.
    * sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S: Likewise.
    * sysdeps/x86_64/fpu/svml_d_wrapper_impl.h: Fixed wrappers to AVX2.
    * sysdeps/x86_64/fpu/svml_s_wrapper_impl.h: Likewise.
    * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S: Fixed KNL
    implementation.
2015-07-24 14:47:23 +03:00
Szabolcs Nagy
3bcea719dd [ARM][BZ #17711] Fix extern protected data handling
Fixes elf/tst-protected1a and elf/tst-protected1b tests.

Depends on a gcc patch that makes protected visibility data non-local:
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html
and on a binutils patch so R_*_GLOB_DAT relocs are used for it:
https://sourceware.org/ml/binutils/2015-07/msg00247.html
2015-07-24 10:05:07 +01:00
Szabolcs Nagy
0910702c4d [AArch64][BZ #17711] Fix extern protected data handling
Fixes elf/tst-protected1a and elf/tst-protected1b tests.

Depends on a gcc patch that makes protected visibility data non-local:
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html
and on a binutils patch so R_*_GLOB_DAT relocs are used for it:
https://sourceware.org/ml/binutils/2015-07/msg00246.html
2015-07-24 09:57:32 +01:00
Roland McGrath
b301e68e4b Make sysdeps/posix bring in login subdir. 2015-07-23 17:04:22 -07:00
Roland McGrath
f8c3be3f23 NaCl: Fix missing getdtablesize symbol. 2015-07-23 15:54:21 -07:00
Mike Frysinger
992f71ddd3 ia64: sigaction.h: fix sa_flags ordering
Since ia64 is little endian, sa_flags has to come before the padding
when splitting it from 64bits to 32bits.

Reported-by: Joseph Myers <joseph@codesourcery.com>
2015-07-23 03:28:13 -04:00
Mike Frysinger
9c9184b449 ia64: msg.h: fix msg_qnum/msg_qbytes types
These two fields have dedicated types, so change the ia64 header to match
all the other arches.  This fixes the conform test for msg.h.
2015-07-21 22:46:58 -04:00
Mike Frysinger
43ef687581 ia64: stat.h: rename pad0 to __glibc_reserved0
This fixes the conform test for the stat.h header and makes it match
all the other arches.
2015-07-21 22:43:21 -04:00
Mike Frysinger
1a5cb6c7d5 ia64: sifaction.h: change sa_flags to an int
This fixes the conform test for the sigaction.h header and makes it match
all the other arches.
2015-07-21 22:40:25 -04:00
Mike Frysinger
15fdf937b4 ia64: siginfo.h: delete siginfo name
This fixes the conform test for the siginfo.h header and makes it match
all the other arches.
2015-07-21 22:34:48 -04:00
Roland McGrath
0b24551cf3 NaCl: Use only nacl_irt_dev_filename, never nacl_irt_filename. 2015-07-21 15:48:56 -07:00
Roland McGrath
7493ab257e Add abilist files and NEWS item for arm-nacl port. 2015-07-21 13:31:21 -07:00
Chris Metcalf
0ac4f1dab3 tile: Fix BZ #18508 (makecontext yield infinite backtrace)
It turns out tile suffered from the same problem as S390.  However,
disabling CFI information for the __startcontext on tile was not
sufficient to fix the problem; I think the backtracer will just
blindly try to follow the link register (lr) in that case.

Instead, the change adds a cfi_undefined directive for "lr"
and then arranges to call __startcontext directly when the new
context starts, rather than just synthesizing a return to it.
In addition to being a bit easier now to understand the control
flow, this also allows the cfi_undefined directive to be placed in
a way that causes it to be in force at the address that the "lr"
from the called function points to.
2015-07-21 12:11:55 -04:00
Mike Frysinger
7fde904c73 sparc: fix sigaction for 32bit builds [BZ #18694]
Commit a059d359d8 changed the sigaction
struct to pass conform tests, but it ended up also changing the ABI for
32 bit builds.  For 64 bit builds, changing the long to two ints works,
but for 32 bit builds, it inserts 4 extra bytes.  This leads to many
packages randomly failing like bash that spews things like:
	configure: line 471: wait_for: No record of process 0

Bracket the new member by a wordsize check to fix the ABI for 32bit.
2015-07-20 21:53:47 -04:00
Andreas Schwab
530deb962f m68k: update libm test ULPs 2015-07-21 00:20:24 +02:00
H.J. Lu
d4358b51c2 Add si_addr_bnd to _sigfault in x86 struct siginfo
X86 struct siginfo in kernel 3.19 has been changed by

commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83
Author: Qiaowei Ren <qiaowei.ren@intel.com>
Date:   Fri Nov 14 07:18:19 2014 -0800

    mpx: Extend siginfo structure to include bound violation information

    This patch adds new fields about bound violation into siginfo
    structure. si_lower and si_upper are respectively lower bound
    and upper bound when bound violation is caused.

This patch updates x86 struct siginfo to enable GDB with MPX support.

	[BZ #18696]
	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add
	si_addr_bnd.
	(si_lower): New.
	(si_upper): Likewise.
2015-07-20 11:54:53 -07:00
David S. Miller
d87630edc4 Regenerate SPARC ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Regenerated.
2015-07-16 12:03:33 -07:00
Rajalakshmi Srinivasaraghavan
b42f8cad52 powerpc: strstr optimization
This patch optimizes strstr function for power >= 7 systems.  Performance
gain is obtained using aligned memory access and usage of cmpb
instruction for quicker comparison.  The average improvement of this
optimization is ~40%.  Tested on ppc64 and ppc64le.

2015-07-16  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	* sysdeps/powerpc/powerpc64/multiarch/Makefile: Add strstr().
	* sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Likewise.
	* sysdeps/powerpc/powerpc64/power7/strstr.S: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-ppc64.c: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr.c: New File.
2015-07-16 13:43:51 -03:00
Mike Frysinger
6b96d6de8c hppa/ia64: _dl_unmap: make it hidden
This symbol is only used by DL_UNMAP which in turn is only used by
_dl_close_worker in dl-close.c, and _dl_close_worker itself is marked
hidden as it is only used by the ldso.  That means _dl_unmap should
be marked hidden.  Without this, the elf/check-localplt test fails.
2015-07-16 09:03:46 -04:00
Mike Frysinger
2a6ad8142d hppa/ia64: _dl_symbol_address: add PLT bypass for rtld
This symbol is defined in the ldso, and is used both there and libc.so.
There is no hidden symbol for it though which leads to relocations in
the ldso and the elf/check-localplt test failing.  Add a hidden def for
rtld to fix all of that.

This function/file is only used by hppa & ia64, so no testing is needed
for other arches.
2015-07-16 09:03:08 -04:00
David S. Miller
c59f721c73 Fix sparc build.
* sysdeps/sparc/nptl/pthread_barrier_init.c: Include
	futex-intenal.h
	* sysdeps/sparc/sparc32/sparcv9/Makefile (nscd): Add cpu_relax.
	* sysdeps/sparc/sparc64/Makefile: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (atomic_spin_nop):
	Remove space from macro define.
	* sysdeps/sparc/sparc64/bits/atomic.h (atomic_spin_nop): Likewise.
2015-07-15 16:07:32 -07:00
Arjun Shankar
0035851c3c Modify several tests to use test-skeleton.c
These tests were skipped by the use-test-skeleton conversion done in
commit 29955b5d because they were reused in other tests via the #include
directive, and so deemed worth an inspection before they were modified.
This has now been done.

ChangeLog:

2015-07-09  Arjun Shankar  <arjun.is@lostca.se>

	* elf/tst-leaks1.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* localedata/tst-langinfo.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-fpucw.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-tgmath.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-tgmath2.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* setjmp/tst-setjmp.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* stdio-common/tst-sscanf.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* sysdeps/x86_64/tst-audit6.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
2015-07-15 15:10:23 +05:30
Stefan Liebler
f6267fd880 i686: Mark stdlib/tst-makecontext as XFAIL.
The testcase stdlib/tst-makecontext fails on i686 because
_Unwind_Backtrace from libgcc produces a segmentation fault if it was
called within a context created by makecontext. See Bug 18635.

ChangeLog:

	* sysdeps/i386/i686/Makefile (test-xfail-tst-makecontext):
	New variable.
2015-07-15 09:33:15 +02:00
Stefan Liebler
ed95ec72fb S390: Regenerate ULPs
I've regenerated the ulps for s390 from scratch.

ChangeLog:

	* sysdeps/s390/fpu/libm-test-ulps: Regenerated.
2015-07-15 09:33:14 +02:00
Roland McGrath
c01ae97eb8 Factor file identity rules out of generic rtld code. 2015-07-14 13:15:26 -07:00
Wilco Dijkstra
82641e16aa Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via memory. 2015-07-13 12:48:33 +01:00
Wilco Dijkstra
c435989f52 Optimize the strlen implementation by using a page cross check and a fast check
for nul bytes which reverts to separate loop when a non-ASCII char is encountered.
Speedup on test-strlen is ~10%, long ASCII strings are processed ~60% faster,
and on random tests it is ~80% better.
2015-07-13 12:38:12 +01:00
Roland McGrath
398a80fec8 NaCl: Make pthread_condattr_setclock reject CLOCK_MONOTONIC. 2015-07-10 14:18:14 -07:00
Chris Metcalf
ef115d3ade tile: Regenerate ULPs.
Regenerated from scratch on tilegx.
2015-07-10 16:16:37 -04:00