Commit Graph

15376 Commits

Author SHA1 Message Date
Siddhesh Poyarekar
48a18de1e1 Prevent optimizing out of benchmark function call
Resolves: #15424

The compiler would optimize the benchmark function call out of the
loop and call it only once, resulting in blazingly fast times for some
benchmarks (notably atan, sin and cos).  Mark the inputs as volatile
so that the code is forced to read again from the input for each
iteration.
2013-05-17 19:10:33 +05:30
Adhemerval Zanella
13d3b41a36 PowerPC: fix hypot/hypotf check for -INF 2013-05-17 08:15:59 -05:00
Maciej W. Rozycki
2848b10585 MIPS: soft-fp NaN representation corrections
[BZ #15442] This adds support for the inverse interpretation of the
quiet bit of IEEE 754 floating-point NaN data that some processors
use.  This includes in particular MIPS architecture processors; the
payload used for the canonical qNaN encoding is updated accordingly
so as not to interfere with the quiet bit.
2013-05-16 23:33:55 +01:00
Joseph Myers
c58b274f01 Test for errno setting in more pole error cases. 2013-05-16 21:57:25 +00:00
Joseph Myers
0ab349044b Remove ENOSYS tests in libm-test.inc. 2013-05-16 19:09:54 +00:00
Joseph Myers
323e5cb792 Remove libm-test support for TEST_* inside functions. 2013-05-16 19:09:03 +00:00
Ryan S. Arnold
e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Joseph Myers
8c75f67421 Convert TEST_extra tests from code to data. 2013-05-16 15:53:40 +00:00
Richard Henderson
e6e49e59c1 De-stringify constants in math/atest-exp2.c. 2013-05-16 06:34:01 -07:00
Joseph Myers
105a07dfc0 Support testing "inexact" exceptions in libm-test.inc. 2013-05-16 13:19:38 +00:00
Joseph Myers
e9eee333b9 Test for errno setting in more overflow error cases. 2013-05-16 13:18:48 +00:00
Joseph Myers
1c38ff73fd Convert TEST_cc_c tests from code to data. 2013-05-16 13:17:55 +00:00
Joseph Myers
15c7c18dc6 Convert TEST_f_L tests from code to data. 2013-05-16 13:16:56 +00:00
Peter Collingbourne
f137ff1383 Remove const attribute on get_log2
This function is not const, as it can modify log2_m and log2_m_inited.
2013-05-15 14:27:53 -07:00
Joseph Myers
3608cb241e Convert TEST_f_l tests from code to data. 2013-05-15 19:48:17 +00:00
Peter Collingbourne
1deff3dca1 Use movq for 64-bit operations
The EXTRACT_WORDS64 and INSERT_WORDS64 macros use movd for a 64-bit
operation.  Somehow gcc manages to turn this into movq, but LLVM won't.

2013-05-15  Peter Collingbourne  <pcc@google.com>

	* sysdeps/x86_64/fpu/math_private.h (MOVQ): New macro.
	(EXTRACT_WORDS64) Use where appropriate.
	(INSERT_WORDS64) Likewise.
2013-05-15 20:33:45 +02:00
Peter Collingbourne
791f3ba0db Use x constraints for operands to vfmaddss and vfmaddsd
While these instructions accept memory operands, only one operand
may be a memory operand.  Giving two operands xm constraints gives
the compiler the option of using memory for both operands, which
would result in invalid assembly code.  Using x for all operands is
more appropriate, as most x86_64 calling conventions will pass the
arguments in registers anyway.

2013-05-15  Peter Collingbourne  <pcc@google.com>

	* sysdeps/x86_64/fpu/multiarch/s_fma.c (__fma_fma4): Replace xm
	constraints with x constraints.
	* sysdeps/x86_64/fpu/multiarch/s_fmaf.c (__fmaf_fma4): Likewise.
2013-05-15 20:31:53 +02:00
Peter Collingbourne
39b1f6172a Move _obstack_compat out of common
it is impossible to create an alias of a common symbol (as
compat_symbol does), because common symbols do not have a section or
an offset until linked.  GNU as tolerates aliases of common symbols by
simply creating another common symbol, but other assemblers (notably
LLVM's integrated assembler) are less tolerant.

2013-05-15  Peter Collingbourne  <pcc@google.com>

	* malloc/obstack.c (_obstack_compat): Add initializer.
-
2013-05-15 20:29:20 +02:00
Edjunior Machado
12fba011bd Update s390/bits/siginfo.h
2013-05-15  Edjunior Machado  <emachado@linux.vnet.ibm.com>

	* sysdeps/unix/sysv/linux/s390/bits/siginfo.h (siginfo_t):
	Remove si_trapno and add si_addr_lsb to _sifields.sigfault.
	(si_trapno): Remove macro.
	(si_addr_lsb): Define new macro.
	(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
2013-05-15 20:15:19 +02:00
Joseph Myers
b861c6c4c9 Consistently use TEST_f_L in tests of llrint and llround. 2013-05-15 16:58:41 +00:00
Joseph Myers
7abeee129e Convert TEST_f_b tests from code to data. 2013-05-15 12:04:07 +00:00
Joseph Myers
cbe8c4d333 Test for errno setting in more domain error cases. 2013-05-15 10:43:19 +00:00
Joseph Myers
5575c0e5cd Disable libm-test errno testing for TEST_INLINE. 2013-05-15 10:42:18 +00:00
Joseph Myers
d369f53178 Convert TEST_ff_i tests from code to data. 2013-05-15 10:41:39 +00:00
David S. Miller
781fd74820 Update Sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-05-14 15:44:29 -07:00
Joseph Myers
5e90827081 Fix whitespace in RUN_TEST_LOOP_2_f. 2013-05-14 21:17:19 +00:00
Joseph Myers
f71172e551 Correct types of fields in libm-test.inc structures. 2013-05-14 21:00:56 +00:00
Joseph Myers
8cfa635ab8 Convert TEST_ffI_f1 tests from code to data. 2013-05-14 20:36:03 +00:00
Joseph Myers
2bcb36b265 Add test for setjmp / longjmp and floating-point state. 2013-05-14 19:49:09 +00:00
Joseph Myers
acbd839a07 Convert TEST_f_i tests from code to data. 2013-05-14 19:13:43 +00:00
Joseph Myers
e414d745ee Fix function name in scalbln_test call to END. 2013-05-14 19:12:54 +00:00
Joseph Myers
d9c2a0fd2c Convert TEST_fI_f1 tests from code to data. 2013-05-14 19:12:10 +00:00
Joseph Myers
9dc9095d56 Convert TEST_fF_f1 tests from code to data. 2013-05-14 14:49:26 +00:00
Joseph Myers
87aa21df6f Convert TEST_f_f1 tests from code to data. 2013-05-14 12:01:19 +00:00
Carlos O'Donell
141af660d8 Add comments to vDSO hwcap loading process.
Loading of the vDSO pseudo-hwcap from the type 2 GNU note is
a rather arcane and poorly documented process. Given that I had
a chance to review this code today I thought I would add all
of the things I had to lookup to verify the validity of the
process.

With a single .note.GNU the vDSO can register up to 64 flags,
though in practice you are limited to 64 - _DL_FIRST_EXTRA
bits which on x86 is 12 bits.

The only use of this that I know of is in the Xen support
in Linux where they use the 1st bit to indicate "nosegneg".
I see "We use bit 1 to avoid bugs in some versions of glibc
when bit 0 is used; the choice is otherwise arbitrary.", but
no reference to a glibc bug anywhere. The code as-is should
support bit zero, so we still have that free for future use.

The kernel, glibc, and ld.so.cache must coordinate to ensure
that bit values don't go too high and are used consistently.

---

2013-05-13  Carlos O'Donell  <carlos@redhat.com>

	* elf/dl-hwcaps.c (_dl_important_hwcaps): Comment vDSO hwcap loading.
	* elf/ldconfig.c (is_hwcap_platform): Comment each hwcap check.
	(main): Comment "tls" pseudo-hwcap.
2013-05-14 00:06:35 -04:00
Joseph Myers
68fc074ca0 Convert TEST_fl_f tests from code to data. 2013-05-13 22:38:15 +00:00
Joseph Myers
243216e126 Convert TEST_fi_f tests from code to data. 2013-05-13 19:45:36 +00:00
Joseph Myers
6a1992e268 Convert TEST_c_f tests from code to data. 2013-05-13 18:58:17 +00:00
Joseph Myers
0e400df55d Convert TEST_if_f tests from code to data. 2013-05-13 18:57:35 +00:00
Joseph Myers
6d33265c72 Consistently use TEST_fl_f in tests of scalbln. 2013-05-13 18:56:50 +00:00
Adhemerval Zanella
f98ece5fe2 Define decimal constant M_1_DIV_El in libm-test.inc
This patch replaces the 1.0 / M_El by the decimal constant M_1_DIV_El.
2013-05-13 12:08:42 -05:00
Siddhesh Poyarekar
43fe811b73 Use HP_TIMING for benchmarks if available
HP_TIMING uses native timestamping instructions if available, thus
greatly reducing the overhead of recording start and end times for
function calls.  For architectures that don't have HP_TIMING
available, we fall back to the clock_gettime bits.  One may also
override this by invoking the benchmark as follows:

  make USE_CLOCK_GETTIME=1 bench

and get the benchmark results using clock_gettime.  One has to do
`make bench-clean` to ensure that the benchmark programs are rebuilt.
2013-05-13 13:44:32 +05:30
Siddhesh Poyarekar
0f7d347bd0 Make _LIB_VERSION a weak symbol
That way it can live alongside _LIB_VERSION in libieee.a for
statically compiled programs.

Resolves #14582.
2013-05-13 11:46:36 +05:30
Joseph Myers
4f184d30cb Convert TEST_fff_f tests from code to data. 2013-05-12 21:07:58 +00:00
Joseph Myers
081988778f Convert TEST_c_c tests from code to data. 2013-05-12 17:38:26 +00:00
Joseph Myers
601a3a5fd5 Convert TEST_ff_f tests from code to data. 2013-05-12 13:17:09 +00:00
Joseph Myers
8329e4da35 Make fma and nextafter tests use max_value instead of fltmax. 2013-05-11 11:10:31 +00:00
Joseph Myers
74c574788d Convert TEST_f_f tests from code to data. 2013-05-11 11:09:30 +00:00
Andreas Jaeger
b4180a5ea7 Add BZ #10191 to ChangeLog/NEWS
BZ #10191 was fixed some time ago without noticing at that time.
2013-05-11 10:28:21 +02:00
Christian Grönke
7187d844a1 Add getgid.c for SH
[BZ #12387]
	* sysdeps/unix/sysv/linux/sh/getgid.c: New file.
2013-05-10 20:42:24 +02:00
Pino Toscano
f63fae7378 Hurd: add ST_NOATIME 2013-05-10 20:39:32 +02:00
Andreas Jaeger
8a67a4b343 Fix integer overflow in sysdeps/unix/sysv/linux/bits/sched.h
[BZ #15448]
	* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S)
	(__CPU_CLR_S, __CPU_ISSET_S): Avoid integer overflow.
2013-05-10 20:28:40 +02:00
Joseph Myers
51df539d98 Start converting libm tests from code to data. 2013-05-10 16:45:04 +00:00
Siddhesh Poyarekar
5c637fe5ee Fix coding style 2013-05-10 17:44:27 +05:30
Joseph Myers
ab2b94613d Fix tgamma errno setting on domain error (bug 6809). 2013-05-10 11:35:11 +00:00
Florian Weimer
4c0fe6fe42 Use *stat64 instead of *stat in installed programs
This ensures reliable operation on file systems with inode numbers
which do not fit into 32 bits.
2013-05-10 11:42:17 +02:00
Andreas Jaeger
a3375d2990 Localize rpcgen
[BZ #15395]
	* sunrpc/rpc_main.c (main): Invoke setlocale and textdomain for
	localization.
	Include <locale.h>.
2013-05-10 08:07:14 +02:00
Carlos O'Donell
3612972234 Add more comments to dlclose() algorithm.
The algorithm for scanning dependencies upon dlclose is
less than immediately obvious. This patch adds two bits
of comments that explain why you start the dependency
search at l_initfini[1], and why you need to restart
the search.

---

2013-05-09  Carlos O'Donell  <carlos@redhat.com>

	* elf/dl-close.c (_dl_close_worker): Add comments.
2013-05-09 17:37:15 -04:00
Joseph Myers
ed41ffefc3 Fix ldbl-128ibm cos range reduction near pi/2 (bug 15359). 2013-05-09 21:30:08 +00:00
Joseph Myers
d0213cd0b6 Fix ldbl-128 cos range reduction near pi/2 (bug 15429). 2013-05-09 21:28:54 +00:00
Joseph Myers
0d3e777af2 Use M_SQRT1_2l instead of local M_SQRT_2_2 in libm-test.inc. 2013-05-09 14:33:30 +00:00
Joseph Myers
24f5606614 Use M_PI_34l consistently in libm-test.inc. 2013-05-09 14:13:10 +00:00
Joseph Myers
faa7f8119f Use decimal constants in defining M_* in libm-test.inc. 2013-05-09 12:24:44 +00:00
Adhemerval Zanella
e9a5e0fd54 Update powerpc libm-test ULPs 2013-05-08 15:06:56 -05:00
Joseph Myers
a0d9f9d745 Factor out initializers for libm-test.inc constants. 2013-05-08 16:10:44 +00:00
Joseph Myers
ae08db3ba0 Use correct TEST_* macros for jn, ldexp and yn tests. 2013-05-08 16:09:54 +00:00
Joseph Myers
f44bf14a9c Move some libm-test logic for running tests from gen-libm-test.pl to libm-test.inc. 2013-05-08 12:02:22 +00:00
Joseph Myers
d8cd06db62 Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
Ondrej Bilka
bb7cf681e9 Preheat CPU in benchtests.
A benchmark could be skewed by CPU initialy working on minimal
frequency and speeding up later. We first run code in loop
to partialy fix this issue.
2013-05-08 08:25:08 +02:00
Aurelien Jarno
ba85394732 Only defined DEV_BSIZE if not already defined. 2013-05-08 00:00:46 +02:00
Roland McGrath
8347c74cc5 Declare _dl_skip_args in ldsodefs.h header. 2013-05-07 14:49:26 -07:00
Carlos O'Donell
e8dd47916f manual/message.texi: Fix english and clarify.
Rewrite the first paragraph to talk about users not humans,
and to use correct English.

Clarify that it is the mapping of messages to IDs that
impacts the design of the message translation API.

---

2013-05-07  Carlos O'Donell  <carlos@redhat.com>

	* manual/message.texi (Message Translation): Talk about users.
	Message to key mapping impacts design.
2013-05-07 12:33:44 -04:00
Roland McGrath
a917305749 Fix glob64 broken by cleanup. 2013-05-06 17:11:12 -07:00
Roland McGrath
976e2f0381 Remove a dead declaration. 2013-05-06 17:06:50 -07:00
Roland McGrath
9723ffc524 Move dummy glob64.c alongside glob.c that defines glob64. 2013-05-06 16:11:11 -07:00
Roland McGrath
962e6658a3 Flesh out stub not-cancel.h file. 2013-05-06 16:03:35 -07:00
Roland McGrath
ee586a6d5c Move getlogin_r_chk to login/ subdir. 2013-05-06 15:58:44 -07:00
Roland McGrath
355f916505 Fix poll stub implementation. 2013-05-06 15:23:51 -07:00
Roland McGrath
bd9ffde61a Move ptsname_r_chk to login/ subdir. 2013-05-06 15:19:14 -07:00
Roland McGrath
8fb16a04e6 Move getlogin, getlogin_r, setlogin to login/ subdir. 2013-05-06 15:10:09 -07:00
Roland McGrath
b99b892f68 Fix stub setrlimit implementation. 2013-05-06 14:58:00 -07:00
Roland McGrath
c74058300c Clean up POSIX.1 implementation of truncate. 2013-05-06 14:56:13 -07:00
Joseph Myers
9ea3513c91 Initialize x in frexp, modf, remqou tests. 2013-05-06 20:23:40 +00:00
Joseph Myers
5bf96de5ef Consistently use TEST_f_f1 in gamma tests. 2013-05-06 20:23:01 +00:00
Adhemerval Zanella
16e616a72f PowerPC: fix hypot/hypof FP exceptions
This patch fixes hypot/hypotf spurious floating-point exceptions
generate by internal operations.
2013-05-06 14:40:17 -05:00
Roland McGrath
d5e8275481 Split _dl_writev out from _dl_debug_vdprintf. 2013-05-06 11:30:41 -07:00
Joseph Myers
b7dab1e4d7 Remove unused libm-test expected-failure mechanism. 2013-05-04 16:45:15 +00:00
Joseph Myers
a7548d41a7 Use static initializers for constant variables in libm-test.inc. 2013-05-04 13:08:34 +00:00
Roland McGrath
cc0e6ed81f Consolidate definitions of _FORTIFY_SOURCE wrappers for open{,64}{,at}. 2013-05-03 16:33:26 -07:00
Roland McGrath
60bfd54cbb Fix NEED_DL_SYSINFO{,_DSO} conditionalization in _dl_sysdep_start. 2013-05-03 15:09:48 -07:00
Adhemerval Zanella
83e7640f6b PowerPC: Add time vDSO support
PowerPC kernel now provides a vDSO implementation for time syscall
(commit fcb41a2030abe0eb716ef0798035ef9562097f42). This patch changes
time syscall wrapper to use the vDSO when available. It also changes
the default non vDSO time on PowerPC to use sysdeps/posix/time.c
(since gettimeofday is a vDSO call).
2013-05-03 15:04:54 -05:00
Joseph Myers
c31a5b1e8f Consistently use TEST_f_f1 in lgamma tests. 2013-05-03 19:05:37 +00:00
Joseph Myers
d5dc2af390 Don't use IGNORE_ZERO_INF_SIGN in hypot tests. 2013-05-03 19:04:52 +00:00
Andreas Jaeger
164fd39d05 Sync with Linux 3.9
* sysdeps/gnu/netinet/tcp.h (TCP_TIMESTAMP): New value, from
	Linux 3.9.
	* sysdeps/unix/sysv/linux/bits/socket.h (PF_VSOCK, AF_VSOCK):
	Add.
	(PF_MAX): Adjust for VSOCK change.
2013-05-03 20:52:00 +02:00
Adhemerval Zanella
8237f48c90 Update powerpc libm-test ULPs 2013-05-03 07:33:49 -05:00
Carlos O'Donell
9df02941c2 Add yesstr and nostr to en_CA, es_AR, and es_ES
We add yesstr and nostr to three more locales.
We ignore the issue of capitalization of the first
character in yesstr and nostr. All locales will need
to be revisited to make this uniform policy change.

---

2013-05-02  Carlos O'Donell  <carlos@redhat.com>

	[BZ #15264]
	* localedata/locales/en_CA (LC_MESSAGES): Define yesstr and nostr.
	* localedata/locales/es_AR (LC_MESSAGES): Copy es_ES.
	* localedata/locales/es_ES (LC_MESSAGES): Define yesstr and nostr.
2013-05-02 23:24:21 -04:00
Allan McRae
bb5f27adca Add bug 14952 to ChangeLog and NEWS
Fixed with commit 0695940b.
2013-05-03 11:14:43 +10:00
David S. Miller
d422395e31 Update Sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-05-02 12:25:28 -07:00
Ondrej Bilka
a07c5731d6 Remove duplicate __strcmp_cg
The __strcmp_cg code was duplicate of of __strcmp_gc. This patch unifies
these two cases into one.
2013-05-01 20:55:06 +02:00
Roland McGrath
1324e37f2e Add missing #include in sysdeps/posix/opendir.c. 2013-05-01 09:27:09 -07:00