Commit Graph

8254 Commits

Author SHA1 Message Date
Adhemerval Zanella 1ab19dec57 Update powerpc-fpu ULPs. 2013-12-02 05:16:42 -06:00
Joseph Myers 176b0c7913 Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in. 2013-11-30 22:04:13 +00:00
Joseph Myers ea3bc4e821 Fix x86 sqrt rounding (bug 14032). 2013-11-29 16:31:16 +00:00
Andreas Krebbel acd98a8ed1 [BZ #16214] S/390: Fix TLS GOT pointer setup. 2013-11-29 09:57:04 +01:00
Joseph Myers 8bca7cd830 Remove unused ldbl-96 functions (bug 15004). 2013-11-28 20:50:03 +00:00
Joseph Myers 91a1f3fea0 Add powerpc-nofpu/e500 support functions for atomic compound assignment and FLT_ROUNDS. 2013-11-28 18:01:41 +00:00
Joseph Myers 3c1c46a64a Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271). 2013-11-28 16:50:38 +00:00
Adhemerval Zanella bd12ab55c0 PowerPC: Fix __fe_nomask_env missing symbol
This patch fix the missing symbol __fe_nomask_env from commit
41e8926aa4 for GLIBC_2.1.
2013-11-26 07:25:08 -06:00
Ondřej Bílka ab260039a8 Fix typo in _dl_tlsdesc_resolve_hold. 2013-11-26 12:42:45 +01:00
Ondřej Bílka d1d9eaf478 Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
Carlos O'Donell a7624ed987 Fix typo in sys/ptrace.h.
The event code is PTRACE_EVENT_SECCOMP, not PTRAVE_EVENT_SECCOMP.
This patch fixes the V->C typo. There are no ABI issues since the
number remains the same for the code. Code using the old wrong
name will need to be updated.
2013-11-25 14:57:42 -05:00
Joseph Myers 63cfe52b6d Fix powerpc-nofpu build. 2013-11-25 19:07:55 +00:00
Adhemerval Zanella 41e8926aa4 PowerPC: Set/restore rounding mode only when needed
This patch helps some math functions performance by adding the libc_fexxx
variant of inline functions to handle both FPU round and exception set/restore
and by using them on the libc_fexxx_ctx functions. It is based on already coded
fexxx family functions for PPC with fpu.

Here is the summary of performance improvements due this patch (measured on a
POWER7 machine):

Before:

cos(): ITERS:9.5895e+07: TOTAL:5116.03Mcy, MAX:77.6cy, MIN:49.792cy, 18744 calls/Mcy
exp(): ITERS:2.827e+07: TOTAL:5187.15Mcy, MAX:494.018cy, MIN:38.422cy, 5450.01 calls/Mcy
pow(): ITERS:6.1705e+07: TOTAL:5144.26Mcy, MAX:171.95cy, MIN:29.935cy, 11994.9 calls/Mcy
sin(): ITERS:8.6898e+07: TOTAL:5117.06Mcy, MAX:83.841cy, MIN:46.582cy, 16982 calls/Mcy
tan(): ITERS:2.9473e+07: TOTAL:5115.39Mcy, MAX:191.017cy, MIN:172.352cy, 5761.63 calls/Mcy

After:

cos(): ITERS:2.05265e+08: TOTAL:5111.37Mcy, MAX:78.754cy, MIN:24.196cy, 40158.5 calls/Mcy
exp(): ITERS:3.341e+07: TOTAL:5170.84Mcy, MAX:476.317cy, MIN:15.574cy, 6461.23 calls/Mcy
pow(): ITERS:7.6153e+07: TOTAL:5129.1Mcy, MAX:147.5cy, MIN:30.916cy, 14847.2 calls/Mcy
sin(): ITERS:1.58816e+08: TOTAL:5115.11Mcy, MAX:1490.39cy, MIN:22.341cy, 31048.4 calls/Mcy
tan(): ITERS:3.4964e+07: TOTAL:5114.18Mcy, MAX:177.422cy, MIN:146.115cy, 6836.68 calls/Mcy
2013-11-25 06:34:41 -06:00
Roland McGrath 6851bd4d97 Adjust generic swapon prototype to match Linux version. 2013-11-21 15:44:26 -08:00
Guy Martin daf75146de Don't use broken DL_AUTO_FUNCTION_ADDRESS()
On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr[2] in it's own scope.

The content of fptr[] is thus undefined right after the macro exits.
Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
a segmentation fault in dl-init.c:69.

To fix this we rewrite the macros to make the call directly to init
and fini without needing to pass back a constructed function pointer.
2013-11-21 15:52:31 -05:00
Siddhesh Poyarekar f3fd2628d8 Add systemtap probe markers for sin, cos, asin and acos 2013-11-20 07:46:48 +05:30
Joseph Myers 73c1ce4fdb Make powerpc-nofpu floating-point state thread-local (bug 15483). 2013-11-19 13:39:56 +00:00
Joseph Myers 6629449166 Fix spurious "inexact" exceptions from x86 pow with NaN argument (bug 16167). 2013-11-16 12:45:11 +00:00
Adhemerval Zanella 7ab44563a9 PowerPC: Fix __fe_mask_env export
Change SHLIB_COMPAT calls to GLIBC_2_19 for __fe_nomask_env symbol.
2013-11-13 12:58:56 -06:00
H.J. Lu 17c1d9f03e Set arch_minimum_kernel to 3.4.0 for x32
x32 ABI support was added in Linux kernel 3.4.0.
2013-11-13 05:43:58 -08:00
Adhemerval Zanella 7a2ad8cf39 PowerPC: Fix __fe_mask_env export
This patch does not export __fe_mask_env anymore, only providing a
compatibility symbol. It fixes BZ#14143.
2013-11-13 06:45:19 -06:00
David S. Miller 7ddace62b0 Fix sparc 64-bit GMP ifunc resolution in static builds.
[BZ #16150]
	* sysdeps/sparc/sparc64/multiarch/add_n.S: Resolve to the correct generic
	symbol in the non-vis3 case in static builds.
	* sysdeps/sparc/sparc64/multiarch/addmul_1.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/mul_1.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/sub_n.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/submul_1.S: Likewise.
2013-11-12 12:48:01 -08:00
Adhemerval Zanella 76a9b99861 PowerPC: Fix vDSO missing ODP entries
This patch fixes the vDSO symbol used directed in IFUNC resolver where
they do not have an associated ODP entry leading to undefined behavior
in some cases. It adds an artificial OPD static entry to such cases
and set its TOC to non 0 to avoid triggering lazy resolutions.
2013-11-08 05:04:25 -06:00
David S. Miller 8d6bb57c44 Fix build on pre-v9 32-bit Sparc.
We cannot use fnegd in this code, as fnegd was added in v9.
Only fnegs exists in v8 and earlier.

	[BZ #15985]
	* sysdeps/sparc/sparc32/fpu/s_fdim.S (__fdim): Do not use fnegd
	on pre-v9 cpus, use a fnegs+fmovs sequence instead.
2013-11-06 13:23:36 -08:00
Ondřej Bílka 5d30d85329 Restrict shm_open and shm_unlink to SHMDIR. Fixes bugs 14752 and 15763. 2013-10-31 13:59:01 +01:00
Mike Frysinger cb8a6dbd17 rename configure.in to configure.ac
Autoconf has been deprecating configure.in for quite a long time.
Rename all our configure.in and preconfigure.in files to .ac.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-30 17:32:08 +10:00
Siddhesh Poyarekar c79a12040c Consolidate conditionals in mp sin/cos functions
Consolidate conditionals in multiple precision sin and cos functions
to prepare the code for addition of probe points.
2013-10-28 16:21:54 +05:30
Adhemerval Zanella 69f13dbf06 PowerPC: strcpy/stpcpy optimization for PPC64/POWER7
This patch intends to unify both strcpy and stpcpy implementationsi
for PPC64 and PPC64/POWER7. The idead default powerpc64 implementation
is to provide both doubleword and word aligned memory access.

For PPC64/POWER7 is also provide doubleword and word memory access,
remove the branch hints, use the cmpb instruction for compare
doubleword/words, and add an optimization for inputs of same alignment.
2013-10-25 13:28:24 -05:00
Siddhesh Poyarekar 7cbcdb3699 Fix stack overflow due to large AF_INET6 requests
Resolves #16072 (CVE-2013-4458).

This patch fixes another stack overflow in getaddrinfo when it is
called with AF_INET6.  The AF_UNSPEC case was fixed as CVE-2013-1914,
but the AF_INET6 case went undetected back then.
2013-10-25 10:22:12 +05:30
Allan McRae 894f3f1049 Fix incorrect getaddrinfo assertion trigger
[BZ #9954]

With the following /etc/hosts:
127.0.0.1       www.my-domain.es
127.0.1.1       www.my-domain.es
192.168.0.1     www.my-domain.es

Using getaddrinfo() on www.my-domain.es, trigger the following assertion:
../sysdeps/posix/getaddrinfo.c:1473: rfc3484_sort: Assertion
`src->results[i].native == -1 || src->results[i].native == a1_native' failed.

This is due to two different bugs:
- In rfc3484_sort() rule 7, src->results[i].native is assigned even if
src->results[i].index is -1, meaning that no interface is associated.
- In getaddrinfo() the source IP address used with the lo interface needs a
special case, as it can be any IP within 127.X.Y.Z.
2013-10-25 14:28:32 +10:00
Joseph Myers 3c8325fb47 Add e500 port. 2013-10-18 21:04:22 +00:00
Andreas Schwab b957ced889 Don't use gethostbyaddr to determine canonical name 2013-10-17 16:34:27 +02:00
Ondřej Bílka c5d5d574cb Format floating routines. 2013-10-17 16:03:24 +02:00
Siddhesh Poyarekar 10e1cf6b73 Add systemtap markers to math function slow paths
Add systemtap probes to various slow paths in libm so that application
developers may use systemtap to find out if their applications are
hitting these slow paths.  We have added probes for pow, exp, log,
tan, atan and atan2.
2013-10-11 22:37:53 +05:30
David S. Miller 75b4202ab0 Fix readdir regressions on sparc 32-bit.
* sysdeps/posix/dirstream.h (struct __dirstream): Fix alignment of
	directory block.
2013-10-10 22:32:36 -07:00
David S. Miller 3bf78b7174 Update sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-10-10 14:42:58 -07:00
Joseph Myers bd878fc030 Extend powerpc-nofpu -fno-builtin-fabsl workaround to more files. 2013-10-10 19:12:09 +00:00
Joseph Myers 6f10289efb Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl. 2013-10-10 19:11:30 +00:00
Joseph Myers 2ae21ed2d2 soft-fp: fix negation NaN handling (bug 16034). 2013-10-10 11:38:56 +00:00
Ondřej Bílka e7044ea76b Use p2align instead ALIGN 2013-10-08 15:46:48 +02:00
Siddhesh Poyarekar 885766357d Format e_pow.c 2013-10-08 16:23:16 +05:30
Siddhesh Poyarekar e7b2d1dd62 Format e_exp.c 2013-10-08 16:22:28 +05:30
Siddhesh Poyarekar 09544cbcd6 Consolidate multiple precision sin/cos functions 2013-10-08 11:50:17 +05:30
Samuel Thibault 7b7bab1391 Add fork hooks for pthread_atfork
pthread_atfork needs application callbacks to be called outside any locking.
2013-10-04 22:29:51 +02:00
Joseph Myers 29d73d867e Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
Joseph Myers e246b34759 e500 port: adjust sysdeps/unix/sysv/linux/configure.in case. 2013-10-04 15:57:50 +00:00
Joseph Myers 89c2003e84 e500 port: fix fpu_control.h constant values. 2013-10-04 15:56:48 +00:00
Joseph Myers cd78f7e767 e500 port: getcontext / setcontext / swapcontext. 2013-10-04 15:55:15 +00:00
Alan Modra 4cb81307b3 Use stdint.h types in union unaligned.
* sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela):
	Use stdint types in rather than __attribute__((mode())).
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
2013-10-04 12:51:11 +09:30
Alan Modra f8e3e9f31b Correct little-endian relocation of UADDR64,32,16.
* sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela):
	Correct handling of unaligned relocs for little-endian.
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
2013-10-04 11:33:12 +09:30