[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r24229 - in /fsf/trunk/libc: ./ libio/ manual/ soft-fp/ stdio-common/ sysdeps/ieee754/dbl-64/ sysdeps/posix/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r24229 - in /fsf/trunk/libc: ./ libio/ manual/ soft-fp/ stdio-common/ sysdeps/ieee754/dbl-64/ sysdeps/posix/
- From: eglibc@xxxxxxxxxx
- Date: Sat, 12 Oct 2013 00:02:36 -0000
Author: eglibc
Date: Sat Oct 12 00:02:35 2013
New Revision: 24229
Log:
Import glibc-mainline for 2013-10-12
Added:
fsf/trunk/libc/soft-fp/extendxftf2.c
fsf/trunk/libc/soft-fp/fixdfti.c
fsf/trunk/libc/soft-fp/fixsfti.c
fsf/trunk/libc/soft-fp/fixtfti.c
fsf/trunk/libc/soft-fp/fixunsdfti.c
fsf/trunk/libc/soft-fp/fixunssfti.c
fsf/trunk/libc/soft-fp/fixunstfti.c
fsf/trunk/libc/soft-fp/floattidf.c
fsf/trunk/libc/soft-fp/floattisf.c
fsf/trunk/libc/soft-fp/floattitf.c
fsf/trunk/libc/soft-fp/floatuntidf.c
fsf/trunk/libc/soft-fp/floatuntisf.c
fsf/trunk/libc/soft-fp/floatuntitf.c
fsf/trunk/libc/soft-fp/trunctfxf2.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/libio/fileops.c
fsf/trunk/libc/libio/iofwrite.c
fsf/trunk/libc/libio/iofwrite_u.c
fsf/trunk/libc/libio/iopadn.c
fsf/trunk/libc/libio/iowpadn.c
fsf/trunk/libc/manual/probes.texi
fsf/trunk/libc/stdio-common/vfprintf.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_log.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_atan.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowexp.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowpow.c
fsf/trunk/libc/sysdeps/posix/dirstream.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Oct 12 00:02:35 2013
@@ -1,3 +1,75 @@
+2013-10-11 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+ Jeff Law <law@xxxxxxxxxx>
+
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Include stap-probe.h.
+ (atan2Mp): Add systemtap probe marker.
+ * sysdeps/ieee754/dbl-64/e_log.c: include stap-probe.h.
+ (__ieee754_log): Add systemtap probe marker.
+ * sysdeps/ieee754/dbl-64/s_atan.c: Include stap-probe.h.
+ (atanMp): Add systemtap probe marker.
+ * sysdeps/ieee754/dbl-64/s_tan.c: Include stap-probe.h.
+ (tanMp): Add systemtap probe marker.
+ * sysdeps/ieee754/dbl-64/slowexp.c: Include stap-probe.h.
+ (__slowexp): Add systemtap probe marker.
+ * sysdeps/ieee754/dbl-64/slowpow.c: Include stap-probe.h.
+ (__slowpow): Add systemtap probe marker.
+ * manual/probes.texi: Document probes.
+
+2013-10-11 Eric Biggers <ebiggers3@xxxxxxxxx>
+
+ [BZ #15362]
+ * libio/fileops.c (_IO_new_file_write): Return count of bytes
+ written.
+ (_IO_new_file_xsputn): Don't return EOF if nothing has been
+ written.
+ * libio/iofwrite.c (_IO_fwrite): Return count if bytes were
+ written to buffer but not flushed.
+ * libio/iofwrite_u.c: Likewise.
+ * libio/iopadn.c: Return bytes returned even if EOF was
+ encountered.
+ * libio/iowpadn.c: Likewise.
+ * stdio-common/vfprintf.c [COMPILE_WPRINTF] (PAD): Return error
+ if _IO_padn does not write the whole buffer.
+ [!COMPILE_WPRINTF] (PAD): Likewise.
+
+2013-10-10 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/posix/dirstream.h (struct __dirstream): Fix alignment of
+ directory block.
+
+2013-10-10 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * soft-fp/extendxftf2.c: Use copyright year range. Use URL
+ instead of FSF address.
+ * soft-fp/fixdfti.c: Likewise.
+ * soft-fp/fixsfti.c: Likewise.
+ * soft-fp/fixtfti.c: Likewise.
+ * soft-fp/fixunsdfti.c: Likewise.
+ * soft-fp/fixunssfti.c: Likewise.
+ * soft-fp/fixunstfti.c: Likewise.
+ * soft-fp/floattidf.c: Likewise.
+ * soft-fp/floattisf.c: Likewise.
+ * soft-fp/floattitf.c: Likewise.
+ * soft-fp/floatuntidf.c: Likewise.
+ * soft-fp/floatuntisf.c: Likewise.
+ * soft-fp/floatuntitf.c: Likewise.
+ * soft-fp/trunctfxf2.c: Likewise.
+
+ * soft-fp/extendxftf2.c: New file. Copied from libgcc.
+ * soft-fp/fixdfti.c: Likewise.
+ * soft-fp/fixsfti.c: Likewise.
+ * soft-fp/fixtfti.c: Likewise.
+ * soft-fp/fixunsdfti.c: Likewise.
+ * soft-fp/fixunssfti.c: Likewise.
+ * soft-fp/fixunstfti.c: Likewise.
+ * soft-fp/floattidf.c: Likewise.
+ * soft-fp/floattisf.c: Likewise.
+ * soft-fp/floattitf.c: Likewise.
+ * soft-fp/floatuntidf.c: Likewise.
+ * soft-fp/floatuntisf.c: Likewise.
+ * soft-fp/floatuntitf.c: Likewise.
+ * soft-fp/trunctfxf2.c: Likewise.
+
2013-10-10 David S. Miller <davem@xxxxxxxxxxxxx>
* sysdeps/sparc/fpu/libm-test-ulps: Update.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Oct 12 00:02:35 2013
@@ -9,12 +9,12 @@
* The following bugs are resolved with this release:
- 156, 431, 13982, 13985, 14155, 14547, 14699, 15048, 15400, 15427, 15522,
- 15531, 15532, 15608, 15609, 15610, 15632, 15640, 15680, 15681, 15723,
- 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844, 15849,
- 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893,
- 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963, 15966,
- 15988, 16034.
+ 156, 431, 13982, 13985, 14155, 14547, 14699, 15048, 15362, 15400, 15427,
+ 15522, 15531, 15532, 15608, 15609, 15610, 15632, 15640, 15680, 15681,
+ 15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844,
+ 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892,
+ 15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963,
+ 15966, 15988, 16034.
* CVE-2012-4412 The strcoll implementation caches indices and rules for
large collation sequences to optimize multiple passes. This cache
Modified: fsf/trunk/libc/libio/fileops.c
==============================================================================
--- fsf/trunk/libc/libio/fileops.c (original)
+++ fsf/trunk/libc/libio/fileops.c Sat Oct 12 00:02:35 2013
@@ -1245,13 +1245,12 @@
_IO_ssize_t n;
{
_IO_ssize_t to_do = n;
- _IO_ssize_t count = 0;
while (to_do > 0)
{
- count = (__builtin_expect (f->_flags2
- & _IO_FLAGS2_NOTCANCEL, 0)
- ? write_not_cancel (f->_fileno, data, to_do)
- : write (f->_fileno, data, to_do));
+ _IO_ssize_t count = (__builtin_expect (f->_flags2
+ & _IO_FLAGS2_NOTCANCEL, 0)
+ ? write_not_cancel (f->_fileno, data, to_do)
+ : write (f->_fileno, data, to_do));
if (count < 0)
{
f->_flags |= _IO_ERR_SEEN;
@@ -1263,7 +1262,7 @@
n -= to_do;
if (f->_offset >= 0)
f->_offset += n;
- return count < 0 ? count : n;
+ return n;
}
_IO_size_t
@@ -1323,13 +1322,11 @@
_IO_size_t block_size, do_write;
/* Next flush the (full) buffer. */
if (_IO_OVERFLOW (f, EOF) == EOF)
- /* If nothing else has to be written or nothing has been written, we
- must not signal the caller that the call was even partially
- successful. */
- return (to_do == 0 || to_do == n) ? EOF : n - to_do;
-
- /* Try to maintain alignment: write a whole number of blocks.
- dont_write is what gets left over. */
+ /* If nothing else has to be written we must not signal the
+ caller that everything has been written. */
+ return to_do == 0 ? EOF : n - to_do;
+
+ /* Try to maintain alignment: write a whole number of blocks. */
block_size = f->_IO_buf_end - f->_IO_buf_base;
do_write = to_do - (block_size >= 128 ? to_do % block_size : 0);
Modified: fsf/trunk/libc/libio/iofwrite.c
==============================================================================
--- fsf/trunk/libc/libio/iofwrite.c (original)
+++ fsf/trunk/libc/libio/iofwrite.c Sat Oct 12 00:02:35 2013
@@ -42,12 +42,12 @@
if (_IO_vtable_offset (fp) != 0 || _IO_fwide (fp, -1) == -1)
written = _IO_sputn (fp, (const char *) buf, request);
_IO_release_lock (fp);
- /* We are guaranteed to have written all of the input, none of it, or
- some of it. */
- if (written == request)
+ /* We have written all of the input in case the return value indicates
+ this or EOF is returned. The latter is a special case where we
+ simply did not manage to flush the buffer. But the data is in the
+ buffer and therefore written as far as fwrite is concerned. */
+ if (written == request || written == EOF)
return count;
- else if (written == EOF)
- return 0;
else
return written / size;
}
Modified: fsf/trunk/libc/libio/iofwrite_u.c
==============================================================================
--- fsf/trunk/libc/libio/iofwrite_u.c (original)
+++ fsf/trunk/libc/libio/iofwrite_u.c Sat Oct 12 00:02:35 2013
@@ -44,12 +44,12 @@
if (_IO_fwide (fp, -1) == -1)
{
written = _IO_sputn (fp, (const char *) buf, request);
- /* We are guaranteed to have written all of the input, none of it, or
- some of it. */
- if (written == request)
+ /* We have written all of the input in case the return value indicates
+ this or EOF is returned. The latter is a special case where we
+ simply did not manage to flush the buffer. But the data is in the
+ buffer and therefore written as far as fwrite is concerned. */
+ if (written == request || written == EOF)
return count;
- else if (written == EOF)
- return 0;
}
return written / size;
Modified: fsf/trunk/libc/libio/iopadn.c
==============================================================================
--- fsf/trunk/libc/libio/iopadn.c (original)
+++ fsf/trunk/libc/libio/iopadn.c Sat Oct 12 00:02:35 2013
@@ -59,7 +59,7 @@
w = _IO_sputn (fp, padptr, PADSIZE);
written += w;
if (w != PADSIZE)
- return w == EOF ? w : written;
+ return written;
}
if (i > 0)
Modified: fsf/trunk/libc/libio/iowpadn.c
==============================================================================
--- fsf/trunk/libc/libio/iowpadn.c (original)
+++ fsf/trunk/libc/libio/iowpadn.c Sat Oct 12 00:02:35 2013
@@ -65,7 +65,7 @@
w = _IO_sputn (fp, (char *) padptr, PADSIZE);
written += w;
if (w != PADSIZE)
- return w == EOF ? w : written;
+ return written;
}
if (i > 0)
Modified: fsf/trunk/libc/manual/probes.texi
==============================================================================
--- fsf/trunk/libc/manual/probes.texi (original)
+++ fsf/trunk/libc/manual/probes.texi Sat Oct 12 00:02:35 2013
@@ -16,6 +16,7 @@
@menu
* Memory Allocation Probes:: Probes in the memory allocation subsystem
+* Mathematical Function Probes:: Probes in mathematical functions
@end menu
@node Memory Allocation Probes
@@ -255,3 +256,100 @@
dynamic brk/mmap thresholds. Argument @var{$arg1} and @var{$arg2} are
the adjusted mmap and trim thresholds, respectively.
@end deftp
+
+@node Mathematical Function Probes
+@section Mathematical Function Probes
+
+Some mathematical functions fall back to multiple precision arithmetic for
+some inputs to get last bit precision for their return values. This multiple
+precision fallback is much slower than the default algorithms and may have a
+significant impact on application performance. The systemtap probe markers
+described in this section may help you determine if your application calls
+mathematical functions with inputs that may result in multiple-precision
+arithmetic.
+
+Unless explicitly mentioned otherwise, a precision of 1 implies 24 bits of
+precision in the mantissa of the multiple precision number. Hence, a precision
+level of 32 implies 768 bits of precision in the mantissa.
+
+@deftp Probe slowexp_p6 (double @var{$arg1}, double @var{$arg2})
+This probe is hit when the @code{exp} function is called with an input that
+results in multiple precision computation with precision 6. Argument
+@var{$arg1} is the input value and @var{$arg2} is the computed output.
+@end deftp
+
+@deftp Probe slowexp_p32 (double @var{$arg1}, double @var{$arg2})
+This probe is hit when the @code{exp} function is called with an input that
+results in multiple precision computation with precision 32. Argument
+@var{$arg1} is the input value and @var{$arg2} is the computed output.
+@end deftp
+
+@deftp Probe slowpow_p10 (double @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
+This probe is hit when the @code{pow} function is called with inputs that
+result in multiple precision computation with precision 10. Arguments
+@var{$arg1} and @var{$arg2} are the input values, @code{$arg3} is the value
+computed in the fast phase of the algorithm and @code{$arg4} is the final
+accurate value.
+@end deftp
+
+@deftp Probe slowpow_p32 (double @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
+This probe is hit when the @code{pow} function is called with an input that
+results in multiple precision computation with precision 32. Arguments
+@var{$arg1} and @var{$arg2} are the input values, @code{$arg3} is the value
+computed in the fast phase of the algorithm and @code{$arg4} is the final
+accurate value.
+@end deftp
+
+@deftp Probe slowlog (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
+This probe is hit when the @code{log} function is called with an input that
+results in multiple precision computation. Argument @var{$arg1} is the
+precision with which the computation succeeded. Argument @var{$arg2} is the
+input and @var{$arg3} is the computed output.
+@end deftp
+
+@deftp Probe slowlog_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
+This probe is hit when the @code{log} function is called with an input that
+results in multiple precision computation and none of the multiple precision
+computations result in an accurate result. Argument @var{$arg1} is the maximum
+precision with which computations were performed. Argument @var{$arg2} is the
+input and @var{$arg3} is the computed output.
+@end deftp
+
+@deftp Probe slowatan2 (int @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
+This probe is hit when the @code{atan2} function is called with an input that
+results in multiple precision computation. Argument @var{$arg1} is the
+precision with which computation succeeded. Arguments @var{$arg2} and
+@var{$arg3} are inputs to the @code{atan2} function and @var{$arg4} is the
+computed result.
+@end deftp
+
+@deftp Probe slowatan2_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
+This probe is hit when the @code{atan} function is called with an input that
+results in multiple precision computation and none of the multiple precision
+computations result in an accurate result. Argument @var{$arg1} is the maximum
+precision with which computations were performed. Arguments @var{$arg2} and
+@var{$arg3} are inputs to the @code{atan2} function and @var{$arg4} is the
+computed result.
+@end deftp
+
+@deftp Probe slowatan (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
+This probe is hit when the @code{atan} function is called with an input that
+results in multiple precision computation. Argument @var{$arg1} is the
+precision with which computation succeeded. Argument @var{$arg2} is the
+input to the @code{atan} function and @var{$arg3} is the computed result.
+@end deftp
+
+@deftp Probe slowatan_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
+This probe is hit when the @code{atan} function is called with an input that
+results in multiple precision computation and none of the multiple precision
+computations result in an accurate result. Argument @var{$arg1} is the maximum
+precision with which computations were performed. Argument @var{$arg2} is the
+input to the @code{atan} function and @var{$arg3} is the computed result.
+@end deftp
+
+@deftp Probe slowtan (double @var{$arg1}, double @var{$arg2})
+This probe is hit when the @code{tan} function is called with an input that
+results in multiple precision computation with precision 32. Argument
+@var{$arg1} is the input to the function and @var{$arg2} is the computed
+result.
+@end deftp
Added: fsf/trunk/libc/soft-fp/extendxftf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/extendxftf2.c (added)
+++ fsf/trunk/libc/soft-fp/extendxftf2.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,52 @@
+/* Software floating-point emulation.
+ Return a converted to IEEE quad
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "extended.h"
+#include "quad.h"
+
+TFtype __extendxftf2(XFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_E(A);
+ FP_DECL_Q(R);
+ TFtype r;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_RAW_E(A, a);
+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+ FP_EXTEND(Q,E,4,4,R,A);
+#else
+ FP_EXTEND(Q,E,2,2,R,A);
+#endif
+ FP_PACK_RAW_Q(r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixdfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixdfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixdfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE double to 128bit signed integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "double.h"
+
+TItype __fixdfti(DFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_TO_INT_D(r, A, TI_BITS, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixsfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixsfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixsfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE single to 128bit signed integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "single.h"
+
+TItype __fixsfti(SFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_TO_INT_S(r, A, TI_BITS, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixtfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixtfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixtfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE quad to 128bit signed integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+TItype __fixtfti(TFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_Q(A, a);
+ FP_TO_INT_Q(r, A, TI_BITS, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixunsdfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixunsdfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixunsdfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE double to 128bit unsigned integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "double.h"
+
+UTItype __fixunsdfti(DFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_TO_INT_D(r, A, TI_BITS, 0);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixunssfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixunssfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixunssfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE single to 128bit unsigned integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "single.h"
+
+UTItype __fixunssfti(SFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_TO_INT_S(r, A, TI_BITS, 0);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/fixunstfti.c
==============================================================================
--- fsf/trunk/libc/soft-fp/fixunstfti.c (added)
+++ fsf/trunk/libc/soft-fp/fixunstfti.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert IEEE quad to 128bit unsigned integer
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+UTItype __fixunstfti(TFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ UTItype r;
+
+ FP_UNPACK_RAW_Q(A, a);
+ FP_TO_INT_Q(r, A, TI_BITS, 0);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Added: fsf/trunk/libc/soft-fp/floattidf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floattidf.c (added)
+++ fsf/trunk/libc/soft-fp/floattidf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit signed integer to IEEE double
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "double.h"
+
+DFtype __floattidf(TItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A);
+ DFtype a;
+
+ FP_FROM_INT_D(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_D(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/floattisf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floattisf.c (added)
+++ fsf/trunk/libc/soft-fp/floattisf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit signed integer to IEEE single
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "single.h"
+
+SFtype __floattisf(TItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A);
+ SFtype a;
+
+ FP_FROM_INT_S(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_S(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/floattitf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floattitf.c (added)
+++ fsf/trunk/libc/soft-fp/floattitf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit signed integer to IEEE quad
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+TFtype __floattitf(TItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ TFtype a;
+
+ FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_Q(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/floatuntidf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floatuntidf.c (added)
+++ fsf/trunk/libc/soft-fp/floatuntidf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit unsigned integer to IEEE double
+ Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "double.h"
+
+DFtype __floatuntidf(UTItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A);
+ DFtype a;
+
+ FP_FROM_INT_D(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_D(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/floatuntisf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floatuntisf.c (added)
+++ fsf/trunk/libc/soft-fp/floatuntisf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit unsigned integer to IEEE single
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "single.h"
+
+SFtype __floatuntisf(UTItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A);
+ SFtype a;
+
+ FP_FROM_INT_S(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_S(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/floatuntitf.c
==============================================================================
--- fsf/trunk/libc/soft-fp/floatuntitf.c (added)
+++ fsf/trunk/libc/soft-fp/floatuntitf.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,44 @@
+/* Software floating-point emulation.
+ Convert a 128bit unsigned integer to IEEE quad
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+TFtype __floatuntitf(UTItype i)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ TFtype a;
+
+ FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
+ FP_PACK_RAW_Q(a, A);
+ FP_HANDLE_EXCEPTIONS;
+
+ return a;
+}
Added: fsf/trunk/libc/soft-fp/trunctfxf2.c
==============================================================================
--- fsf/trunk/libc/soft-fp/trunctfxf2.c (added)
+++ fsf/trunk/libc/soft-fp/trunctfxf2.c Sat Oct 12 00:02:35 2013
@@ -1,0 +1,52 @@
+/* Software floating-point emulation.
+ Truncate IEEE quad into IEEE extended
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Uros Bizjak (ubizjak@xxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "extended.h"
+#include "quad.h"
+
+XFtype __trunctfxf2(TFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ FP_DECL_E(R);
+ XFtype r;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_SEMIRAW_Q(A, a);
+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+ FP_TRUNC(E,Q,4,4,R,A);
+#else
+ FP_TRUNC(E,Q,2,2,R,A);
+#endif
+ FP_PACK_SEMIRAW_E(r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
Modified: fsf/trunk/libc/stdio-common/vfprintf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/vfprintf.c (original)
+++ fsf/trunk/libc/stdio-common/vfprintf.c Sat Oct 12 00:02:35 2013
@@ -90,13 +90,13 @@
do { \
if (width > 0) \
{ \
- unsigned int d = _IO_padn (s, (Padchar), width); \
- if (__glibc_unlikely (d == EOF)) \
+ _IO_ssize_t written = _IO_padn (s, (Padchar), width); \
+ if (__glibc_unlikely (written != width)) \
{ \
done = -1; \
goto all_done; \
} \
- done_add (d); \
+ done_add (written); \
} \
} while (0)
# define PUTC(C, F) _IO_putc_unlocked (C, F)
@@ -119,13 +119,13 @@
do { \
if (width > 0) \
{ \
- unsigned int d = _IO_wpadn (s, (Padchar), width); \
- if (__glibc_unlikely (d == EOF)) \
+ _IO_ssize_t written = _IO_wpadn (s, (Padchar), width); \
+ if (__glibc_unlikely (written != width)) \
{ \
done = -1; \
goto all_done; \
} \
- done_add (d); \
+ done_add (written); \
} \
} while (0)
# define PUTC(C, F) _IO_putwc_unlocked (C, F)
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c Sat Oct 12 00:02:35 2013
@@ -42,6 +42,7 @@
#include "uatan.tbl"
#include "atnat2.h"
#include <math_private.h>
+#include <stap-probe.h>
#ifndef SECTION
# define SECTION
@@ -597,7 +598,11 @@
__mp_dbl (&mpz1, &z1, p);
__mp_dbl (&mpz2, &z2, p);
if (z1 == z2)
- return z1;
- }
+ {
+ LIBC_PROBE (slowatan2, 4, &p, &x, &y, &z1);
+ return z1;
+ }
+ }
+ LIBC_PROBE (slowatan2_inexact, 4, &p, &x, &y, &z1);
return z1; /*if impossible to do exact computing */
}
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_log.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_log.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_log.c Sat Oct 12 00:02:35 2013
@@ -39,6 +39,7 @@
#include "mpa.h"
#include "MathLib.h"
#include <math_private.h>
+#include <stap-probe.h>
#ifndef SECTION
# define SECTION
@@ -242,8 +243,12 @@
__mp_dbl (&mpy1, &y1, p);
__mp_dbl (&mpy2, &y2, p);
if (y1 == y2)
- return y1;
+ {
+ LIBC_PROBE (slowlog, 3, &p, &x, &y1);
+ return y1;
+ }
}
+ LIBC_PROBE (slowlog_inexact, 3, &p, &x, &y1);
return y1;
}
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_atan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_atan.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_atan.c Sat Oct 12 00:02:35 2013
@@ -42,6 +42,7 @@
#include "uatan.tbl"
#include "atnat.h"
#include <math.h>
+#include <stap-probe.h>
void __mpatan (mp_no *, mp_no *, int); /* see definition in mpatan.c */
static double atanMp (double, const int[]);
@@ -306,8 +307,12 @@
__mp_dbl (&mpy1, &y1, p);
__mp_dbl (&mpy2, &y2, p);
if (y1 == y2)
- return y1;
+ {
+ LIBC_PROBE (slowatan, 3, &p, &x, &y1);
+ return y1;
+ }
}
+ LIBC_PROBE (slowatan_inexact, 3, &p, &x, &y1);
return y1; /*if impossible to do exact computing */
}
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c Sat Oct 12 00:02:35 2013
@@ -41,6 +41,7 @@
#include <math.h>
#include <math_private.h>
#include <fenv.h>
+#include <stap-probe.h>
#ifndef SECTION
# define SECTION
@@ -838,6 +839,7 @@
p = 32;
__mptan (x, &mpy, p);
__mp_dbl (&mpy, &y, p);
+ LIBC_PROBE (slowtan, 2, &x, &y);
return y;
}
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowexp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowexp.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowexp.c Sat Oct 12 00:02:35 2013
@@ -28,6 +28,8 @@
/* e^x */
/**************************************************************************/
#include <math_private.h>
+
+#include <stap-probe.h>
#ifndef USE_LONG_DOUBLE_FOR_MP
# include "mpa.h"
@@ -60,13 +62,22 @@
__mp_dbl (&mpw, &w, p);
__mp_dbl (&mpz, &z, p);
if (w == z)
- return w;
+ {
+ /* Track how often we get to the slow exp code plus
+ its input/output values. */
+ LIBC_PROBE (slowexp_p6, 2, &x, &w);
+ return w;
+ }
else
{
p = 32;
__dbl_mp (x, &mpx, p);
__mpexp (&mpx, &mpy, p);
__mp_dbl (&mpy, &res, p);
+
+ /* Track how often we get to the uber-slow exp code plus
+ its input/output values. */
+ LIBC_PROBE (slowexp_p32, 2, &x, &res);
return res;
}
#else
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowpow.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowpow.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/slowpow.c Sat Oct 12 00:02:35 2013
@@ -33,6 +33,8 @@
#include "mpa.h"
#include <math_private.h>
+
+#include <stap-probe.h>
#ifndef SECTION
# define SECTION
@@ -97,7 +99,12 @@
__sub (&mpp, &eps, &mpr1, p);
__mp_dbl (&mpr1, &res1, p);
if (res == res1)
- return res;
+ {
+ /* Track how often we get to the slow pow code plus
+ its input/output values. */
+ LIBC_PROBE (slowpow_p10, 4, &x, &y, &z, &res);
+ return res;
+ }
/* If we don't, then we repeat using a higher precision. 768 bits of
precision ought to be enough for anybody. */
@@ -109,5 +116,10 @@
__mul (&mpy, &mpz, &mpw, p);
__mpexp (&mpw, &mpp, p);
__mp_dbl (&mpp, &res, p);
+
+ /* Track how often we get to the uber-slow pow code plus
+ its input/output values. */
+ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res);
+
return res;
}
Modified: fsf/trunk/libc/sysdeps/posix/dirstream.h
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/dirstream.h (original)
+++ fsf/trunk/libc/sysdeps/posix/dirstream.h Sat Oct 12 00:02:35 2013
@@ -41,8 +41,13 @@
int errcode; /* Delayed error code. */
- /* Directory block. */
- char data[0] __attribute__ ((aligned (__alignof__ (void*))));
+ /* Directory block. We must make sure that this block starts
+ at an address that is aligned adequately enough to store
+ dirent entries. Using the alignment of "void *" is not
+ sufficient because dirents on 32-bit platforms can require
+ 64-bit alignment. We use "long double" here to be consistent
+ with what malloc uses. */
+ char data[0] __attribute__ ((aligned (__alignof__ (long double))));
};
#define _DIR_dirfd(dirp) ((dirp)->fd)
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits