[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r17687 - in /fsf/trunk/libc: ./ conform/ manual/ math/ sysdeps/i386/ sysdeps/i386/fpu/ sysdeps/ieee754/dbl-64/ sysdeps/unix/...



Author: eglibc
Date: Wed Mar 21 19:50:58 2012
New Revision: 17687

Log:
Import glibc-mainline for 2012-03-21

Removed:
    fsf/trunk/libc/NOTES
    fsf/trunk/libc/sysdeps/i386/fpu/s_cexp.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_cexpf.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_cexpl.S
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makefile
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/README
    fsf/trunk/libc/aclocal.m4
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/conform/conformtest.pl
    fsf/trunk/libc/conform/run-conformtest.sh
    fsf/trunk/libc/manual/creature.texi
    fsf/trunk/libc/manual/intro.texi
    fsf/trunk/libc/manual/lang.texi
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/math/w_exp2.c
    fsf/trunk/libc/math/w_exp2f.c
    fsf/trunk/libc/math/w_exp2l.c
    fsf/trunk/libc/sysdeps/i386/configure
    fsf/trunk/libc/sysdeps/i386/configure.in
    fsf/trunk/libc/sysdeps/i386/fpu/e_pow.S
    fsf/trunk/libc/sysdeps/i386/fpu/e_powf.S
    fsf/trunk/libc/sysdeps/i386/fpu/e_powl.S
    fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
    fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
    fsf/trunk/libc/sysdeps/x86_64/fpu/e_powl.S
    fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
    fsf/trunk/libc/timezone/Makefile

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Mar 21 19:50:58 2012
@@ -1,3 +1,94 @@
+2012-03-21  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/configure.in: Check x86_64* instead
+	of x86_64 when setting libc_cv_slibdir, libdir and
+	libc_cv_localedir.
+	* sysdeps/unix/sysv/linux/configure: Regenerated.
+
+2012-03-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* manual/lang.texi (Old Varargs): Remove section.
+	(How Variadic): Update menu.
+	(va_start): Do not mention varargs.h.
+
+2012-03-21  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+	    Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* configure.in (libc_cv_ssp): Use LIBC_TRY_CC_OPTION instead of a
+	link test.
+	* configure: Regenerated.
+
+2012-03-21  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+        * conform/conformtest.pl: Handle --tmpdir argument, defaulting to /tmp.
+        * conform/run-conformtest.sh: Pass --tmpdir argument when invoking
+        conformtest.pl
+
+2012-03-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* NOTES: Remove.
+	* Makefile (files-for-dist): Remove NOTES.
+	(NOTES): Remove rule.
+	* README: Don't refer to NOTES.
+	* manual/creature.texi: Don't include macros.texi.
+	* manual/intro.texi (creature.texi): Remove comment referring to
+	NOTES.
+
+	* aclocal.m4 (LIBC_TRY_CC_OPTION): New macro.
+	* configure.in (libc_cv_cc_submachine): Use LIBC_TRY_CC_OPTION.
+	* configure: Regenerated.
+	* sysdeps/i386/configure.in (libc_cv_cc_sse4): Use
+	LIBC_TRY_CC_OPTION.
+	(libc_cv_as_i686): Likewise.
+	(libc_cv_cc_avx): Likewise.
+	(libc_cv_cc_sse2avx): Likewise.
+	(libc_cv_cc_fma4): Likewise.
+	(libc_cv_cc_novzeroupper): Likewise.
+	* sysdeps/i386/configure: Regenerated.
+
+	[BZ #13883]
+	* sysdeps/i386/fpu/s_cexp.S: Remove.
+	* sysdeps/i386/fpu/s_cexpf.S: Likewise.
+	* sysdeps/i386/fpu/s_cexpl.S: Likewise.
+	* math/libm-test.inc (cexp_test): Add more tests.
+	* sysdeps/i386/fpu/libm-test-ulps: Update.
+	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-03-21  Allan McRae  <allan@xxxxxxxxxxxxx>
+
+	* timezone/Makefile: Do not install iso3166.tab and zone.tab
+
+2012-03-21  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #13871]
+	* math/w_exp2.c: Do not include <float.h>.
+	(o_threshold, u_threshold): Remove.
+	(__exp2): Calculate result before checking finiteness and calling
+	__kernel_standard.
+	* math/w_exp2f.c: Likewise.
+	* math/w_exp2l.c: Likewise.
+	* math/libm-test.inc (exp2_test): Require overflow exception for
+	1e6 input.
+
+	[BZ #3866]
+	* sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Test for y outside the
+	range of signed 64-bit integers before using fistpll.  Remove
+	checks for whether integers fit in mantissa bits.
+	* sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Test for y outside
+	the range of signed 32-bit integers before using fistpl.  Remove
+	checks for whether integers fit in mantissa bits.
+	* sysdeps/i386/fpu/e_powl.S (p64): New object.
+	(__ieee754_powl): Test for y outside the range of signed 64-bit
+	integers before using fistpll.  Reduce 64-bit values to 63-bit
+	ones as needed.
+	* sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Ensure
+	divide-by-zero is raised for zero to large negative powers.
+	* sysdeps/x86_64/fpu/e_powl.S (p64): New object.
+	(__ieee754_powl): Test for y outside the range of signed 64-bit
+	integers before using fistpll.  Reduce 64-bit values to 63-bit
+	ones as needed.
+	* math/libm-test.inc (pow_test): Add more tests.
+
 2012-03-20  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
 
 	* debug/backtracesymsfd.c: Include <_itoa.h> instead of

Modified: fsf/trunk/libc/Makefile
==============================================================================
--- fsf/trunk/libc/Makefile (original)
+++ fsf/trunk/libc/Makefile Wed Mar 21 19:50:58 2012
@@ -1,5 +1,4 @@
-# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009,2011
-#	Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -364,7 +363,7 @@
 
 generated := $(generated) stubs.h
 
-files-for-dist := README FAQ INSTALL NOTES configure ChangeLog NEWS
+files-for-dist := README FAQ INSTALL configure ChangeLog NEWS
 
 # Regenerate stuff, then error if these things are not committed yet.
 dist-prepare: $(files-for-dist)
@@ -399,7 +398,6 @@
 -chmod a-w $@
 endef
 INSTALL: manual/install.texi manual/macros.texi; $(format-me)
-NOTES: manual/creature.texi manual/macros.texi; $(format-me)
 manual/dir-add.texi manual/dir-add.info: FORCE
 	$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
 FAQ: scripts/gen-FAQ.pl FAQ.in

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Mar 21 19:50:58 2012
@@ -16,7 +16,7 @@
   13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
   13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13658,
   13673, 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840,
-  13841, 13844, 13846, 13851, 13852, 13854
+  13841, 13844, 13846, 13851, 13852, 13854, 13871, 13883
 
 * ISO C11 support:
 

Removed: fsf/trunk/libc/NOTES
==============================================================================
--- fsf/trunk/libc/NOTES (original)
+++ fsf/trunk/libc/NOTES (removed)
@@ -1,223 +1,0 @@
-Feature Test Macros
--------------------
-
-The exact set of features available when you compile a source file is
-controlled by which "feature test macros" you define.
-
-   If you compile your programs using `gcc -ansi', you get only the
-ISO C library features, unless you explicitly request additional
-features by defining one or more of the feature macros.  *Note GNU CC
-Command Options: (gcc.info)Invoking GCC, for more information about GCC
-options.
-
-   You should define these macros by using `#define' preprocessor
-directives at the top of your source code files.  These directives
-_must_ come before any `#include' of a system header file.  It is best
-to make them the very first thing in the file, preceded only by
-comments.  You could also use the `-D' option to GCC, but it's better
-if you make the source files indicate their own meaning in a
-self-contained way.
-
-   This system exists to allow the library to conform to multiple
-standards.  Although the different standards are often described as
-supersets of each other, they are usually incompatible because larger
-standards require functions with names that smaller ones reserve to the
-user program.  This is not mere pedantry -- it has been a problem in
-practice.  For instance, some non-GNU programs define functions named
-`getline' that have nothing to do with this library's `getline'.  They
-would not be compilable if all features were enabled indiscriminately.
-
-   This should not be used to verify that a program conforms to a
-limited standard.  It is insufficient for this purpose, as it will not
-protect you from including header files outside the standard, or
-relying on semantics undefined within the standard.
-
- -- Macro: _POSIX_SOURCE
-     If you define this macro, then the functionality from the POSIX.1
-     standard (IEEE Standard 1003.1) is available, as well as all of the
-     ISO C facilities.
-
-     The state of `_POSIX_SOURCE' is irrelevant if you define the macro
-     `_POSIX_C_SOURCE' to a positive integer.
-
- -- Macro: _POSIX_C_SOURCE
-     Define this macro to a positive integer to control which POSIX
-     functionality is made available.  The greater the value of this
-     macro, the more functionality is made available.
-
-     If you define this macro to a value greater than or equal to `1',
-     then the functionality from the 1990 edition of the POSIX.1
-     standard (IEEE Standard 1003.1-1990) is made available.
-
-     If you define this macro to a value greater than or equal to `2',
-     then the functionality from the 1992 edition of the POSIX.2
-     standard (IEEE Standard 1003.2-1992) is made available.
-
-     If you define this macro to a value greater than or equal to
-     `199309L', then the functionality from the 1993 edition of the
-     POSIX.1b standard (IEEE Standard 1003.1b-1993) is made available.
-
-     Greater values for `_POSIX_C_SOURCE' will enable future extensions.
-     The POSIX standards process will define these values as necessary,
-     and the GNU C Library should support them some time after they
-     become standardized.  The 1996 edition of POSIX.1 (ISO/IEC 9945-1:
-     1996) states that if you define `_POSIX_C_SOURCE' to a value
-     greater than or equal to `199506L', then the functionality from
-     the 1996 edition is made available.
-
- -- Macro: _BSD_SOURCE
-     If you define this macro, functionality derived from 4.3 BSD Unix
-     is included as well as the ISO C, POSIX.1, and POSIX.2 material.
-
-     Some of the features derived from 4.3 BSD Unix conflict with the
-     corresponding features specified by the POSIX.1 standard.  If this
-     macro is defined, the 4.3 BSD definitions take precedence over the
-     POSIX definitions.
-
-     Due to the nature of some of the conflicts between 4.3 BSD and
-     POSIX.1, you need to use a special "BSD compatibility library"
-     when linking programs compiled for BSD compatibility.  This is
-     because some functions must be defined in two different ways, one
-     of them in the normal C library, and one of them in the
-     compatibility library.  If your program defines `_BSD_SOURCE', you
-     must give the option `-lbsd-compat' to the compiler or linker when
-     linking the program, to tell it to find functions in this special
-     compatibility library before looking for them in the normal C
-     library.  
-
- -- Macro: _SVID_SOURCE
-     If you define this macro, functionality derived from SVID is
-     included as well as the ISO C, POSIX.1, POSIX.2, and X/Open
-     material.
-
- -- Macro: _XOPEN_SOURCE
- -- Macro: _XOPEN_SOURCE_EXTENDED
-     If you define this macro, functionality described in the X/Open
-     Portability Guide is included.  This is a superset of the POSIX.1
-     and POSIX.2 functionality and in fact `_POSIX_SOURCE' and
-     `_POSIX_C_SOURCE' are automatically defined.
-
-     As the unification of all Unices, functionality only available in
-     BSD and SVID is also included.
-
-     If the macro `_XOPEN_SOURCE_EXTENDED' is also defined, even more
-     functionality is available.  The extra functions will make all
-     functions available which are necessary for the X/Open Unix brand.
-
-     If the macro `_XOPEN_SOURCE' has the value 500 this includes all
-     functionality described so far plus some new definitions from the
-     Single Unix Specification, version 2.
-
- -- Macro: _LARGEFILE_SOURCE
-     If this macro is defined some extra functions are available which
-     rectify a few shortcomings in all previous standards.
-     Specifically, the functions `fseeko' and `ftello' are available.
-     Without these functions the difference between the ISO C interface
-     (`fseek', `ftell') and the low-level POSIX interface (`lseek')
-     would lead to problems.
-
-     This macro was introduced as part of the Large File Support
-     extension (LFS).
-
- -- Macro: _LARGEFILE64_SOURCE
-     If you define this macro an additional set of functions is made
-     available which enables 32 bit systems to use files of sizes beyond
-     the usual limit of 2GB.  This interface is not available if the
-     system does not support files that large.  On systems where the
-     natural file size limit is greater than 2GB (i.e., on 64 bit
-     systems) the new functions are identical to the replaced functions.
-
-     The new functionality is made available by a new set of types and
-     functions which replace the existing ones.  The names of these new
-     objects contain `64' to indicate the intention, e.g., `off_t' vs.
-     `off64_t' and `fseeko' vs. `fseeko64'.
-
-     This macro was introduced as part of the Large File Support
-     extension (LFS).  It is a transition interface for the period when
-     64 bit offsets are not generally used (see `_FILE_OFFSET_BITS').
-
- -- Macro: _FILE_OFFSET_BITS
-     This macro determines which file system interface shall be used,
-     one replacing the other.  Whereas `_LARGEFILE64_SOURCE' makes the
-     64 bit interface available as an additional interface,
-     `_FILE_OFFSET_BITS' allows the 64 bit interface to replace the old
-     interface.
-
-     If `_FILE_OFFSET_BITS' is undefined, or if it is defined to the
-     value `32', nothing changes.  The 32 bit interface is used and
-     types like `off_t' have a size of 32 bits on 32 bit systems.
-
-     If the macro is defined to the value `64', the large file interface
-     replaces the old interface.  I.e., the functions are not made
-     available under different names (as they are with
-     `_LARGEFILE64_SOURCE').  Instead the old function names now
-     reference the new functions, e.g., a call to `fseeko' now indeed
-     calls `fseeko64'.
-
-     This macro should only be selected if the system provides
-     mechanisms for handling large files.  On 64 bit systems this macro
-     has no effect since the `*64' functions are identical to the
-     normal functions.
-
-     This macro was introduced as part of the Large File Support
-     extension (LFS).
-
- -- Macro: _ISOC99_SOURCE
-     Until the revised ISO C standard is widely adopted the new features
-     are not automatically enabled.  The GNU C Library nevertheless has
-     a complete implementation of the new standard and to enable the
-     new features the macro `_ISOC99_SOURCE' should be defined.
-
- -- Macro: _GNU_SOURCE
-     If you define this macro, everything is included: ISO C89,
-     ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
-     extensions.  In the cases where POSIX.1 conflicts with BSD, the
-     POSIX definitions take precedence.
-
-     If you want to get the full effect of `_GNU_SOURCE' but make the
-     BSD definitions take precedence over the POSIX definitions, use
-     this sequence of definitions:
-
-          #define _GNU_SOURCE
-          #define _BSD_SOURCE
-          #define _SVID_SOURCE
-
-     Note that if you do this, you must link your program with the BSD
-     compatibility library by passing the `-lbsd-compat' option to the
-     compiler or linker.  *NB:* If you forget to do this, you may get
-     very strange errors at run time.
-
- -- Macro: _REENTRANT
- -- Macro: _THREAD_SAFE
-     If you define one of these macros, reentrant versions of several
-     functions get declared.  Some of the functions are specified in
-     POSIX.1c but many others are only available on a few other systems
-     or are unique to the GNU C Library.  The problem is the delay in
-     the standardization of the thread safe C library interface.
-
-     Unlike on some other systems, no special version of the C library
-     must be used for linking.  There is only one version but while
-     compiling this it must have been specified to compile as thread
-     safe.
-
-   We recommend you use `_GNU_SOURCE' in new programs.  If you don't
-specify the `-ansi' option to GCC and don't define any of these macros
-explicitly, the effect is the same as defining `_POSIX_C_SOURCE' to 2
-and `_POSIX_SOURCE', `_SVID_SOURCE', and `_BSD_SOURCE' to 1.
-
-   When you define a feature test macro to request a larger class of
-features, it is harmless to define in addition a feature test macro for
-a subset of those features.  For example, if you define
-`_POSIX_C_SOURCE', then defining `_POSIX_SOURCE' as well has no effect.
-Likewise, if you define `_GNU_SOURCE', then defining either
-`_POSIX_SOURCE' or `_POSIX_C_SOURCE' or `_SVID_SOURCE' as well has no
-effect.
-
-   Note, however, that the features of `_BSD_SOURCE' are not a subset of
-any of the other feature test macros supported.  This is because it
-defines BSD features that take precedence over the POSIX features that
-are requested by the other macros.  For this reason, defining
-`_BSD_SOURCE' in addition to the other feature test macros does have an
-effect: it causes the BSD features to take priority over the conflicting
-POSIX features.
-

Modified: fsf/trunk/libc/README
==============================================================================
--- fsf/trunk/libc/README (original)
+++ fsf/trunk/libc/README Wed Mar 21 19:50:58 2012
@@ -84,10 +84,6 @@
 the manual in the current development sources to see if your problem has
 already been corrected.
 
-The file NOTES contains a description of the feature-test macros used
-in the GNU C library, explaining how you can tell the library what
-facilities you want it to make available.
-
 Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
 information.  We are now using the Bugzilla system to track all bug reports.
 This web page gives detailed information on how to report bugs properly.

Modified: fsf/trunk/libc/aclocal.m4
==============================================================================
--- fsf/trunk/libc/aclocal.m4 (original)
+++ fsf/trunk/libc/aclocal.m4 Wed Mar 21 19:50:58 2012
@@ -128,6 +128,12 @@
       [$2], [$3])
 rm -f conftest*])
 
+dnl Test a compiler option or options with an empty input file.
+dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
+AC_DEFUN([LIBC_TRY_CC_OPTION],
+[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
+	[$2], [$3])])
+
 dnl Find and source sysdeps/*/preconfigure.
 dnl LIBC_PRECONFIGURE([$srcdir], [for])
 AC_DEFUN([LIBC_PRECONFIGURE], [dnl

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Wed Mar 21 19:50:58 2012
@@ -6643,23 +6643,17 @@
 if ${libc_cv_ssp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
-			    -o conftest conftest.c 1>&5'
+  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then
+  test $ac_status = 0; }; }; then :
   libc_cv_ssp=yes
 else
   libc_cv_ssp=no
 fi
-rm -f conftest*
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5
 $as_echo "$libc_cv_ssp" >&6; }
@@ -7054,10 +7048,11 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
+
       libc_cv_cc_submachine="$opt"
       break
-    fi
+fi
   done
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_submachine" >&5

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Wed Mar 21 19:50:58 2012
@@ -1753,18 +1753,10 @@
 AC_SUBST(fno_unit_at_a_time)
 
 AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
-cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
-			    -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
-then
-  libc_cv_ssp=yes
-else
-  libc_cv_ssp=no
-fi
-rm -f conftest*])
+LIBC_TRY_CC_OPTION([$CFLAGS $CPPFLAGS -Werror -fstack-protector],
+		   [libc_cv_ssp=yes],
+		   [libc_cv_ssp=no])
+])
 AC_SUBST(libc_cv_ssp)
 
 AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
@@ -2005,10 +1997,9 @@
 		 libc_cv_cc_submachine, [dnl
   libc_cv_cc_submachine=no
   for opt in "-march=$submachine" "-mcpu=$submachine"; do
-    if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
+    LIBC_TRY_CC_OPTION([$opt], [
       libc_cv_cc_submachine="$opt"
-      break
-    fi
+      break], [])
   done])
   if test "x$libc_cv_cc_submachine" = xno; then
     AC_MSG_ERROR([${CC-cc} does not support $submachine])

Modified: fsf/trunk/libc/conform/conformtest.pl
==============================================================================
--- fsf/trunk/libc/conform/conformtest.pl (original)
+++ fsf/trunk/libc/conform/conformtest.pl Wed Mar 21 19:50:58 2012
@@ -3,11 +3,11 @@
 use Getopt::Long;
 use POSIX;
 
+$standard = "XOPEN2K8";
 $CC = "gcc";
-
-$standard="XOPEN2K8";
+$tmpdir = "/tmp";
 GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard,
-	    'flags=s' => \$flags, 'cc=s' => \$CC);
+	    'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir);
 @headers = split(/,/,join(',',@headers));
 
 # List of the headers we are testing.
@@ -83,11 +83,6 @@
 while ($#knownproblems >= 0) {
   $isknown{pop (@knownproblems)} = 1;
 }
-
-$uid = getuid();
-($pwname,$pwpasswd,$pwuid,$pwgid,
- $pwquota,$pwcomment,$pwgcos,$pwdir,$pwshell,$pwexpire) = getpwuid($uid);
-$tmpdir = "$pwdir";
 
 $verbose = 1;
 

Modified: fsf/trunk/libc/conform/run-conformtest.sh
==============================================================================
--- fsf/trunk/libc/conform/run-conformtest.sh (original)
+++ fsf/trunk/libc/conform/run-conformtest.sh Wed Mar 21 19:50:58 2012
@@ -4,6 +4,9 @@
 perl="$2"
 cc="$3"
 includes="$4"
+
+scratch=${objpfx}scratch
+mkdir -p "$scratch"
 
 standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
 	   "XOPEN2K" "XOPEN2K8" "POSIX2008")
@@ -13,7 +16,7 @@
 for s in ${standards[*]}; do
     echo -n $s...
     e=0
-    if ! $perl conformtest.pl --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
+    if ! $perl conformtest.pl --tmpdir="$scratch" --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
 	e=1
     fi
     printf "\n%s\n" $s >> ${objpfx}run-conformtest.out

Modified: fsf/trunk/libc/manual/creature.texi
==============================================================================
--- fsf/trunk/libc/manual/creature.texi (original)
+++ fsf/trunk/libc/manual/creature.texi Wed Mar 21 19:50:58 2012
@@ -1,6 +1,5 @@
 @node Feature Test Macros
 @subsection Feature Test Macros
-@include macros.texi
 
 @cindex feature test macros
 The exact set of features available when you compile a source file

Modified: fsf/trunk/libc/manual/intro.texi
==============================================================================
--- fsf/trunk/libc/manual/intro.texi (original)
+++ fsf/trunk/libc/manual/intro.texi Wed Mar 21 19:50:58 2012
@@ -548,7 +548,6 @@
 @end itemize
 
 @comment Include the section on Creature Nest Macros.
-@comment It is in a separate file so it can be formatted into ../NOTES.
 @include creature.texi
 
 @node Roadmap to the Manual,  , Using the Library, Introduction

Modified: fsf/trunk/libc/manual/lang.texi
==============================================================================
--- fsf/trunk/libc/manual/lang.texi (original)
+++ fsf/trunk/libc/manual/lang.texi Wed Mar 21 19:50:58 2012
@@ -229,7 +229,6 @@
 			  variable arguments functions.
 * Argument Macros::      Detailed specification of the macros
         		  for accessing variable arguments.
-* Old Varargs::		 The pre-ISO way of defining variadic functions.
 @end menu
 
 @node Variadic Prototypes
@@ -427,9 +426,6 @@
 This macro initializes the argument pointer variable @var{ap} to point
 to the first of the optional arguments of the current function;
 @var{last-required} must be the last required argument to the function.
-
-@xref{Old Varargs}, for an alternate definition of @code{va_start}
-found in the header file @file{varargs.h}.
 @end deftypefn
 
 @comment stdarg.h
@@ -511,68 +507,6 @@
 @include add.c.texi
 @end smallexample
 
-@node Old Varargs
-@subsubsection Old-Style Variadic Functions
-
-@pindex varargs.h
-Before @w{ISO C}, programmers used a slightly different facility for
-writing variadic functions.  The GNU C compiler still supports it;
-currently, it is more portable than the @w{ISO C} facility, since support
-for @w{ISO C} is still not universal.  The header file which defines the
-old-fashioned variadic facility is called @file{varargs.h}.
-
-Using @file{varargs.h} is almost the same as using @file{stdarg.h}.
-There is no difference in how you call a variadic function;
-see @ref{Calling Variadics}.  The only difference is in how you define
-them.  First of all, you must use old-style non-prototype syntax, like
-this:
-
-@smallexample
-tree
-build (va_alist)
-     va_dcl
-@{
-@end smallexample
-
-Secondly, you must give @code{va_start} only one argument, like this:
-
-@smallexample
-  va_list p;
-  va_start (p);
-@end smallexample
-
-These are the special macros used for defining old-style variadic
-functions:
-
-@comment varargs.h
-@comment Unix
-@deffn Macro va_alist
-This macro stands for the argument name list required in a variadic
-function.
-@end deffn
-
-@comment varargs.h
-@comment Unix
-@deffn Macro va_dcl
-This macro declares the implicit argument or arguments for a variadic
-function.
-@end deffn
-
-@comment varargs.h
-@comment Unix
-@deftypefn {Macro} void va_start (va_list @var{ap})
-This macro, as defined in @file{varargs.h}, initializes the argument
-pointer variable @var{ap} to point to the first argument of the current
-function.
-@end deftypefn
-
-The other argument macros, @code{va_arg} and @code{va_end}, are the same
-in @file{varargs.h} as in @file{stdarg.h}; see @ref{Argument Macros}, for
-details.
-
-It does not work to include both @file{varargs.h} and @file{stdarg.h} in
-the same compilation; they define @code{va_start} in conflicting ways.
-
 @node Null Pointer Constant
 @section Null Pointer Constant
 @cindex null pointer constant

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Wed Mar 21 19:50:58 2012
@@ -1894,6 +1894,21 @@
   TEST_c_c (cexp, 0.75L, 1.25L, 0.667537446429131586942201977015932112L, 2.00900045494094876258347228145863909L);
   TEST_c_c (cexp, -2.0, -3.0, -0.13398091492954261346140525546115575L, -0.019098516261135196432576240858800925L);
 
+  TEST_c_c (cexp, 0, 0x1p65, 0.99888622066058013610642172179340364209972L, -0.047183876212354673805106149805700013943218L);
+  TEST_c_c (cexp, 0, -0x1p65, 0.99888622066058013610642172179340364209972L, 0.047183876212354673805106149805700013943218L);
+  TEST_c_c (cexp, 50, 0x1p127, 4.053997150228616856622417636046265337193e21L, 3.232070315463388524466674772633810238819e21L);
+
+#ifndef TEST_FLOAT
+  TEST_c_c (cexp, 0, 1e22, 0.5232147853951389454975944733847094921409L, -0.8522008497671888017727058937530293682618L);
+  TEST_c_c (cexp, 0, 0x1p1023, -0.826369834614147994500785680811743734805L, 0.5631277798508840134529434079444683477104L);
+  TEST_c_c (cexp, 500, 0x1p1023, -1.159886268932754433233243794561351783426e217L, 7.904017694554466595359379965081774849708e216L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+  TEST_c_c (cexp, 0, 0x1p16383L, 0.9210843909921906206874509522505756251609L, 0.3893629985894208126948115852610595405563L);
+  TEST_c_c (cexp, -10000, 0x1p16383L, 1.045876464564882298442774542991176546722e-4343L, 4.421154026488516836023811173959413420548e-4344L);
+#endif
+
   END (cexp, complex);
 }
 
@@ -3108,8 +3123,7 @@
 
   TEST_f_f (exp2, 10, 1024);
   TEST_f_f (exp2, -1, 0.5);
-  /* Bug 13871: OVERFLOW exception may be missing.  */
-  TEST_f_f (exp2, 1e6, plus_infty, OVERFLOW_EXCEPTION_OK);
+  TEST_f_f (exp2, 1e6, plus_infty, OVERFLOW_EXCEPTION);
   TEST_f_f (exp2, -1e6, 0);
   TEST_f_f (exp2, 0.75L, 1.68179283050742908606225095246642979L);
 
@@ -5431,11 +5445,75 @@
   TEST_ff_f (pow, 0, -11, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
   check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
   errno = 0;
+  TEST_ff_f (pow, 0, -0xffffff, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+#ifndef TEST_FLOAT
+  errno = 0;
+  TEST_ff_f (pow, 0, -0x1.fffffffffffffp+52L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  errno = 0;
+  TEST_ff_f (pow, 0, -0x1.fffffffffffffffep+63L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 106
+  errno = 0;
+  TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffff8p+105L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 113
+  errno = 0;
+  TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffffffp+112L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+#endif
   TEST_ff_f (pow, minus_zero, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
   check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
   errno = 0;
   TEST_ff_f (pow, minus_zero, -11L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
   check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0xffffff, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1fffffe, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+#ifndef TEST_FLOAT
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+52L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+53L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+63L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+64L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 106
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 113
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+#endif
 
   errno = 0;
   TEST_ff_f (pow, 0, -2, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
@@ -5444,10 +5522,30 @@
   TEST_ff_f (pow, 0, -11.1L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
   check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
   errno = 0;
+  TEST_ff_f (pow, 0, -0x1p24, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, 0, -0x1p127, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  /* Bug 13879: spurious OVERFLOW exception may be present.  */
+  TEST_ff_f (pow, 0, -max_value, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|OVERFLOW_EXCEPTION_OK);
+  check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
   TEST_ff_f (pow, minus_zero, -2, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
   check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
   errno = 0;
   TEST_ff_f (pow, minus_zero, -11.1L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1p24, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  TEST_ff_f (pow, minus_zero, -0x1p127, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+  check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+  errno = 0;
+  /* Bug 13879: spurious OVERFLOW exception may be present.  */
+  TEST_ff_f (pow, minus_zero, -max_value, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|OVERFLOW_EXCEPTION_OK);
   check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
 
   TEST_ff_f (pow, 0x1p72L, 0x1p72L, plus_infty, OVERFLOW_EXCEPTION);
@@ -5487,32 +5585,155 @@
 
   /* pow (+inf, y) == +inf for y > 0.  */
   TEST_ff_f (pow, plus_infty, 2, plus_infty);
+  TEST_ff_f (pow, plus_infty, 0xffffff, plus_infty);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffp+52L, plus_infty);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffffep+63L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, plus_infty);
+# endif
+#endif
+  TEST_ff_f (pow, plus_infty, 0x1p24, plus_infty);
+  TEST_ff_f (pow, plus_infty, 0x1p127, plus_infty);
+  TEST_ff_f (pow, plus_infty, max_value, plus_infty);
 
   /* pow (+inf, y) == +0 for y < 0.  */
   TEST_ff_f (pow, plus_infty, -1, 0.0);
+  TEST_ff_f (pow, plus_infty, -0xffffff, 0.0);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffp+52L, 0.0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffffep+63L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, 0.0);
+# endif
+#endif
+  TEST_ff_f (pow, plus_infty, -0x1p24, 0.0);
+  TEST_ff_f (pow, plus_infty, -0x1p127, 0.0);
+  TEST_ff_f (pow, plus_infty, -max_value, 0.0);
 
   /* pow (-inf, y) == -inf for y an odd integer > 0.  */
   TEST_ff_f (pow, minus_infty, 27, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0xffffff, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1fffffe, plus_infty);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+52L, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+53L, plus_infty);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+63L, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+64L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+106L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, minus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty);
+# endif
+#endif
 
   /* pow (-inf, y) == +inf for y > 0 and not an odd integer.  */
   TEST_ff_f (pow, minus_infty, 28, plus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1p24, plus_infty);
+  TEST_ff_f (pow, minus_infty, 0x1p127, plus_infty);
+  TEST_ff_f (pow, minus_infty, max_value, plus_infty);
 
   /* pow (-inf, y) == -0 for y an odd integer < 0. */
   TEST_ff_f (pow, minus_infty, -3, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0xffffff, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0x1fffffe, plus_zero);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+52L, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+53L, plus_zero);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+63L, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+64L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+106L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, minus_zero);
+  TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
+# endif
+#endif
   /* pow (-inf, y) == +0 for y < 0 and not an odd integer.  */
   TEST_ff_f (pow, minus_infty, -2.0, 0.0);
+  TEST_ff_f (pow, minus_infty, -0x1p24, 0.0);
+  TEST_ff_f (pow, minus_infty, -0x1p127, 0.0);
+  TEST_ff_f (pow, minus_infty, -max_value, 0.0);
 
   /* pow (+0, y) == +0 for y an odd integer > 0.  */
   TEST_ff_f (pow, 0.0, 27, 0.0);
+  TEST_ff_f (pow, 0.0, 0xffffff, 0.0);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, 0.0, 0x1.fffffffffffffp+52L, 0.0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, 0.0, 0x1.fffffffffffffffep+63L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffff8p+105L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffffffp+112L, 0.0);
+# endif
+#endif
 
   /* pow (-0, y) == -0 for y an odd integer > 0.  */
   TEST_ff_f (pow, minus_zero, 27, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0xffffff, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0x1fffffe, plus_zero);
+#ifndef TEST_FLOAT
+  TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+52L, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+53L, plus_zero);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+  TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+63L, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+64L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 106
+  TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+105L, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+106L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 113
+  TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+112L, minus_zero);
+  TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
+# endif
+#endif
 
   /* pow (+0, y) == +0 for y > 0 and not an odd integer.  */
   TEST_ff_f (pow, 0.0, 4, 0.0);
+  TEST_ff_f (pow, 0.0, 0x1p24, 0.0);
+  TEST_ff_f (pow, 0.0, 0x1p127, 0.0);
+  TEST_ff_f (pow, 0.0, max_value, 0.0);
 
   /* pow (-0, y) == +0 for y > 0 and not an odd integer.  */
   TEST_ff_f (pow, minus_zero, 4, 0.0);
+  TEST_ff_f (pow, minus_zero, 0x1p24, 0.0);
+  TEST_ff_f (pow, minus_zero, 0x1p127, 0.0);
+  TEST_ff_f (pow, minus_zero, max_value, 0.0);
 
   TEST_ff_f (pow, 16, 0.25L, 2);
   TEST_ff_f (pow, 0x1p64L, 0.125L, 256);

Modified: fsf/trunk/libc/math/w_exp2.c
==============================================================================
--- fsf/trunk/libc/math/w_exp2.c (original)
+++ fsf/trunk/libc/math/w_exp2.c Wed Mar 21 19:50:58 2012
@@ -2,23 +2,19 @@
  * wrapper exp2(x)
  */
 
-#include <float.h>
 #include <math.h>
 #include <math_private.h>
-
-static const double o_threshold = (double) DBL_MAX_EXP;
-static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
 
 double
 __exp2 (double x)
 {
-  if (__builtin_expect (islessequal (x, u_threshold)
-			|| isgreater (x, o_threshold), 0)
-      && _LIB_VERSION != _IEEE_ && __finite (x))
+  double z = __ieee754_exp2 (x);
+  if (__builtin_expect (!__finite (z), 0)
+      && __finite (x) && _LIB_VERSION != _IEEE_)
     /* exp2 overflow: 44, exp2 underflow: 45 */
-    return __kernel_standard (x, x, 44 + (x <= o_threshold));
+    return __kernel_standard (x, x, 44 + !!__signbit (x));
 
-  return __ieee754_exp2 (x);
+  return z;
 }
 weak_alias (__exp2, exp2)
 #ifdef NO_LONG_DOUBLE

Modified: fsf/trunk/libc/math/w_exp2f.c
==============================================================================
--- fsf/trunk/libc/math/w_exp2f.c (original)
+++ fsf/trunk/libc/math/w_exp2f.c Wed Mar 21 19:50:58 2012
@@ -2,22 +2,18 @@
  * wrapper exp2f(x)
  */
 
-#include <float.h>
 #include <math.h>
 #include <math_private.h>
-
-static const float o_threshold = (float) FLT_MAX_EXP;
-static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
 
 float
 __exp2f (float x)
 {
-  if (__builtin_expect (islessequal (x, u_threshold)
-			|| isgreater (x, o_threshold), 0)
-      && _LIB_VERSION != _IEEE_ && __finitef (x))
+  float z = __ieee754_exp2f (x);
+  if (__builtin_expect (!__finitef (z), 0)
+      && __finitef (x) && _LIB_VERSION != _IEEE_)
     /* exp2 overflow: 144, exp2 underflow: 145 */
-    return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
+    return __kernel_standard_f (x, x, 144 + !!__signbitf (x));
 
-  return __ieee754_exp2f (x);
+  return z;
 }
 weak_alias (__exp2f, exp2f)

Modified: fsf/trunk/libc/math/w_exp2l.c
==============================================================================
--- fsf/trunk/libc/math/w_exp2l.c (original)
+++ fsf/trunk/libc/math/w_exp2l.c Wed Mar 21 19:50:58 2012
@@ -2,23 +2,18 @@
  * wrapper exp2l(x)
  */
 
-#include <float.h>
 #include <math.h>
 #include <math_private.h>
-
-static const long double o_threshold = (long double) LDBL_MAX_EXP;
-static const long double u_threshold
-  = (long double) (LDBL_MIN_EXP - LDBL_MANT_DIG - 1);
 
 long double
 __exp2l (long double x)
 {
-  if (__builtin_expect (islessequal (x, u_threshold)
-			|| isgreater (x, o_threshold), 0)
-      && _LIB_VERSION != _IEEE_ && __finitel (x))
+  long double z = __ieee754_exp2l (x);
+  if (__builtin_expect (!__finitel (z), 0)
+      && __finitel (x) && _LIB_VERSION != _IEEE_)
     /* exp2 overflow: 244, exp2 underflow: 245 */
-    return __kernel_standard (x, x, 244 + (x <= o_threshold));
+    return __kernel_standard (x, x, 244 + !!__signbitl (x));
 
-  return __ieee754_exp2l (x);
+  return z;
 }
 weak_alias (__exp2l, exp2l)

Modified: fsf/trunk/libc/sysdeps/i386/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure (original)
+++ fsf/trunk/libc/sysdeps/i386/configure Wed Mar 21 19:50:58 2012
@@ -223,11 +223,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_cc_sse4=yes
 else
   libc_cv_cc_sse4=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
 $as_echo "$libc_cv_cc_sse4" >&6; }
@@ -246,11 +247,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_as_i686=yes
 else
   libc_cv_as_i686=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
 $as_echo "$libc_cv_as_i686" >&6; }
@@ -265,11 +267,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_cc_avx=yes
 else
   libc_cv_cc_avx=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
 $as_echo "$libc_cv_cc_avx" >&6; }
@@ -288,11 +291,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_cc_sse2avx=yes
 else
   libc_cv_cc_sse2avx=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
 $as_echo "$libc_cv_cc_sse2avx" >&6; }
@@ -311,11 +315,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_cc_fma4=yes
 else
   libc_cv_cc_fma4=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
 $as_echo "$libc_cv_cc_fma4" >&6; }
@@ -334,11 +339,12 @@
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  test $ac_status = 0; }; }; then :
   libc_cv_cc_novzeroupper=yes
 else
   libc_cv_cc_novzeroupper=no
 fi
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
 $as_echo "$libc_cv_cc_novzeroupper" >&6; }

Modified: fsf/trunk/libc/sysdeps/i386/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure.in (original)
+++ fsf/trunk/libc/sysdeps/i386/configure.in Wed Mar 21 19:50:58 2012
@@ -40,60 +40,48 @@
 
 dnl Check if -msse4 works.
 AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
-if AC_TRY_COMMAND([${CC-cc} -msse4 -xc /dev/null -S -o /dev/null]); then
-  libc_cv_cc_sse4=yes
-else
-  libc_cv_cc_sse4=no
-fi])
+LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no])
+])
 if test $libc_cv_cc_sse4 = yes; then
   AC_DEFINE(HAVE_SSE4_SUPPORT)
 fi
 
 dnl Check if -Wa,-mtune=i686 works.
 AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
-if AC_TRY_COMMAND([${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null]); then
-  libc_cv_as_i686=yes
-else
-  libc_cv_as_i686=no
-fi])
+LIBC_TRY_CC_OPTION([-Wa,-mtune=i686],
+		   [libc_cv_as_i686=yes],
+		   [libc_cv_as_i686=no])
+])
 
 dnl Check if -mavx works.
 AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mavx -xc /dev/null -S -o /dev/null]); then
-  libc_cv_cc_avx=yes
-else
-  libc_cv_cc_avx=no
-fi])
+LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no])
+])
 if test $libc_cv_cc_avx = yes; then
   AC_DEFINE(HAVE_AVX_SUPPORT)
 fi
 
 dnl Check if -msse2avx works.
 AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
-if AC_TRY_COMMAND([${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null]); then
-  libc_cv_cc_sse2avx=yes
-else
-  libc_cv_cc_sse2avx=no
-fi])
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_sse2avx=yes],
+		   [libc_cv_cc_sse2avx=no])
+])
 if test $libc_cv_cc_sse2avx = yes; then
   AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
 fi
 
 dnl Check if -mfma4 works.
 AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null]); then
-  libc_cv_cc_fma4=yes
-else
-  libc_cv_cc_fma4=no
-fi])
+LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
+])
 if test $libc_cv_cc_fma4 = yes; then
   AC_DEFINE(HAVE_FMA4_SUPPORT)
 fi
 
 dnl Check if -mno-vzeroupper works.
 AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null]); then
-  libc_cv_cc_novzeroupper=yes
-else
-  libc_cv_cc_novzeroupper=no
-fi])
+LIBC_TRY_CC_OPTION([-mno-vzeroupper],
+		   [libc_cv_cc_novzeroupper=yes],
+		   [libc_cv_cc_novzeroupper=no])
+])

Modified: fsf/trunk/libc/sysdeps/i386/fpu/e_pow.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/e_pow.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/e_pow.S Wed Mar 21 19:50:58 2012
@@ -230,6 +230,16 @@
 	testb	$2, %dh
 	jz	16f		// jump if x == +inf
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p63)		// y
+	fnstsw
+	sahf
+	jnc	16f
+
 	// We must find out whether y is an odd integer.
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
@@ -239,20 +249,13 @@
 	sahf
 	jne	17f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%eax
 	cfi_adjust_cfa_offset (-4)
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	andb	$1, %al
 	jz	18f		// jump if not odd
-	movl	%edx, %eax
-	orl	%edx, %edx
-	jns	155f
-	negl	%eax
-155:	cmpl	$0x00200000, %eax
-	ja	18f		// does not fit in mantissa bits
 	// It's an odd integer.
 	shrl	$31, %edx
 	fldl	MOX(minf_mzero, %edx, 8)
@@ -289,6 +292,16 @@
 	testb	$2, %dh
 	jz	25f
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p63)		// y
+	fnstsw
+	sahf
+	jnc	25f
+
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
 	fildll	(%esp)		// int(y) : y
@@ -297,16 +310,13 @@
 	sahf
 	jne	26f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%eax
 	cfi_adjust_cfa_offset (-4)
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	andb	$1, %al
 	jz	27f		// jump if not odd
-	cmpl	$0xffe00000, %edx
-	jbe	27f		// does not fit in mantissa bits
 	// It's an odd integer.
 	// Raise divide-by-zero exception and get minus infinity value.
 	fldl	MO(one)
@@ -329,6 +339,14 @@
 21:	testb	$2, %dh
 	jz	22f
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fcoml	MO(p63)		// y
+	fnstsw
+	sahf
+	jnc	22f
+
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
 	fildll	(%esp)		// int(y) : y
@@ -337,16 +355,13 @@
 	sahf
 	jne	23f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%eax
 	cfi_adjust_cfa_offset (-4)
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	andb	$1, %al
 	jz	24f		// jump if not odd
-	cmpl	$0xffe00000, %edx
-	jae	24f		// does not fit in mantissa bits
 	// It's an odd integer.
 	fldl	MO(mzero)
 	ret

Modified: fsf/trunk/libc/sysdeps/i386/fpu/e_powf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/e_powf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/e_powf.S Wed Mar 21 19:50:58 2012
@@ -224,6 +224,16 @@
 	testb	$2, %dh
 	jz	16f		// jump if x == +inf
 
+	// fistpl raises invalid exception for |y| >= 1L<<31, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p31)		// y
+	fnstsw
+	sahf
+	jnc	16f
+
 	// We must find out whether y is an odd integer.
 	fld	%st		// y : y
 	fistpl	(%esp)		// y
@@ -233,18 +243,11 @@
 	sahf
 	jne	17f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	testb	$1, %dl
 	jz	18f		// jump if not odd
-	movl	%edx, %eax
-	orl	%edx, %edx
-	jns	155f
-	negl	%eax
-155:	cmpl	$0x01000000, %eax
-	ja	18f		// does not fit in mantissa bits
 	// It's an odd integer.
 	shrl	$31, %edx
 	fldl	MOX(minf_mzero, %edx, 8)
@@ -281,6 +284,16 @@
 	testb	$2, %dh
 	jz	25f
 
+	// fistpl raises invalid exception for |y| >= 1L<<31, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p31)		// y
+	fnstsw
+	sahf
+	jnc	25f
+
 	fld	%st		// y : y
 	fistpl	(%esp)		// y
 	fildl	(%esp)		// int(y) : y
@@ -289,14 +302,11 @@
 	sahf
 	jne	26f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	testb	$1, %dl
 	jz	27f		// jump if not odd
-	cmpl	$0xff000000, %edx
-	jbe	27f		// does not fit in mantissa bits
 	// It's an odd integer.
 	// Raise divide-by-zero exception and get minus infinity value.
 	fldl	MO(one)
@@ -319,6 +329,14 @@
 21:	testb	$2, %dh
 	jz	22f
 
+	// fistpl raises invalid exception for |y| >= 1L<<31, so test
+	// that (in which case y is certainly even) before testing
+	// whether y is odd.
+	fcoml	MO(p31)		// y
+	fnstsw
+	sahf
+	jnc	22f
+
 	fld	%st		// y : y
 	fistpl	(%esp)		// y
 	fildl	(%esp)		// int(y) : y
@@ -327,14 +345,11 @@
 	sahf
 	jne	23f
 
-	// OK, the value is an integer, but is the number of bits small
-	// enough so that all are coming from the mantissa?
+	// OK, the value is an integer.
 	popl	%edx
 	cfi_adjust_cfa_offset (-4)
 	testb	$1, %dl
 	jz	24f		// jump if not odd
-	cmpl	$0xff000000, %edx
-	jae	24f		// does not fit in mantissa bits
 	// It's an odd integer.
 	fldl	MO(mzero)
 	ret

Modified: fsf/trunk/libc/sysdeps/i386/fpu/e_powl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/e_powl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/e_powl.S Wed Mar 21 19:50:58 2012
@@ -32,6 +32,9 @@
 	ASM_TYPE_DIRECTIVE(p63,@object)
 p63:	.byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
 	ASM_SIZE_DIRECTIVE(p63)
+	ASM_TYPE_DIRECTIVE(p64,@object)
+p64:	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
+	ASM_SIZE_DIRECTIVE(p64)
 
 	.section .rodata.cst16,"aM",@progbits,16
 
@@ -243,6 +246,19 @@
 	testb	$2, %dh
 	jz	16f		// jump if x == +inf
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p64)		// y
+	fnstsw
+	sahf
+	jnc	16f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
+
 	// We must find out whether y is an odd integer.
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
@@ -294,6 +310,19 @@
 	// x is Â0 and y is < 0.  We must find out whether y is an odd integer.
 	testb	$2, %dh
 	jz	25f
+
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fld	%st		// y : y
+	fabs			// |y| : y
+	fcompl	MO(p64)		// y
+	fnstsw
+	sahf
+	jnc	25f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
 
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
@@ -332,6 +361,18 @@
 21:	testb	$2, %dh
 	jz	22f
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fld	%st		// y : y
+	fcompl	MO(p64)		// y
+	fnstsw
+	sahf
+	jnc	22f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
+
 	fld	%st		// y : y
 	fistpll	(%esp)		// y
 	fildll	(%esp)		// int(y) : y

Modified: fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps Wed Mar 21 19:50:58 2012
@@ -431,15 +431,44 @@
 ifloat: 1
 
 # cexp
+Test "Real part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (0 + 0x1p65 i) == 0.99888622066058013610642172179340364209972 - 0.047183876212354673805106149805700013943218 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0 - 0x1p65 i) == 0.99888622066058013610642172179340364209972 + 0.047183876212354673805106149805700013943218 i":
+float: 1
+ifloat: 1
 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
 
 # clog
 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
@@ -815,18 +844,22 @@
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
-float: 3
-ifloat: 3
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
 ildouble: 6
 ldouble: 6
 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
 float: 1
 ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
 ildouble: 1
 ldouble: 1
@@ -834,22 +867,27 @@
 float: 1
 ifloat: 1
 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
-double: 1
+double: 2
 float: 3
-idouble: 1
+idouble: 2
 ifloat: 3
 ildouble: 3
 ldouble: 3
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
 double: 1
-float: 4
-idouble: 1
-ifloat: 4
+float: 5
+idouble: 1
+ifloat: 5
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
-float: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
+float: 2
+ifloat: 2
+ildouble: 4
+ldouble: 4
 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
 double: 2
 float: 3
@@ -2124,10 +2162,18 @@
 ldouble: 1
 
 Function: Real part of "cexp":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "cexp":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
@@ -2212,20 +2258,20 @@
 ldouble: 1
 
 Function: Real part of "cpow":
-double: 1
-float: 4
-idouble: 1
-ifloat: 4
-ildouble: 6
-ldouble: 6
+double: 2
+float: 5
+idouble: 2
+ifloat: 5
+ildouble: 5
+ldouble: 5
 
 Function: Imaginary part of "cpow":
 double: 2
 float: 3
 idouble: 2
 ifloat: 3
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
 
 Function: Real part of "csin":
 float: 1

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cexp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cexp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cexp.S (removed)
@@ -1,253 +1,0 @@
-/* ix87 specific implementation of complex exponential function for double.
-   Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
-   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.
-
-   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 <sysdep.h>
-
-	.section .rodata
-
-	.align ALIGNARG(4)
-	ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
-	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
-	.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-	.double	0.0
-zero:	.double	0.0
-infinity:
-	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
-	.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-	.double 0.0
-	.byte 0, 0, 0, 0, 0, 0, 0, 0x80
-	ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
-	ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
-	.byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(twopi)
-
-	ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
-	.byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(l2e)
-
-	ASM_TYPE_DIRECTIVE(one,@object)
-one:	.double 1.0
-	ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
-	.text
-ENTRY(__cexp)
-	fldl	8(%esp)			/* x */
-	fxam
-	fnstsw
-	fldl	16(%esp)		/* y : x */
-#ifdef  PIC
-	LOAD_PIC_REG (cx)
-#endif
-	movb	%ah, %dh
-	andb	$0x45, %ah
-	cmpb	$0x05, %ah
-	je	1f			/* Jump if real part is +-Inf */
-	cmpb	$0x01, %ah
-	je	2f			/* Jump if real part is NaN */
-
-	fxam				/* y : x */
-	fnstsw
-	/* If the imaginary part is not finite we return NaN+i NaN, as
-	   for the case when the real part is NaN.  A test for +-Inf and
-	   NaN would be necessary.  But since we know the stack register
-	   we applied `fxam' to is not empty we can simply use one test.
-	   Check your FPU manual for more information.  */
-	andb	$0x01, %ah
-	cmpb	$0x01, %ah
-	je	20f
-
-	/* We have finite numbers in the real and imaginary part.  Do
-	   the real work now.  */
-	fxch			/* x : y */
-	fldt	MO(l2e)		/* log2(e) : x : y */
-	fmulp			/* x * log2(e) : y */
-	fld	%st		/* x * log2(e) : x * log2(e) : y */
-	frndint			/* int(x * log2(e)) : x * log2(e) : y */
-	fsubr	%st, %st(1)	/* int(x * log2(e)) : frac(x * log2(e)) : y */
-	fxch			/* frac(x * log2(e)) : int(x * log2(e)) : y */
-	f2xm1			/* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
-	faddl	MO(one)		/* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
-	fscale			/* e^x : int(x * log2(e)) : y */
-	fst	%st(1)		/* e^x : e^x : y */
-	fxch	%st(2)		/* y : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	7f
-	fmulp	%st, %st(3)	/* sin(y) : e^x : e^x * cos(y) */
-	fmulp	%st, %st(1)	/* e^x * sin(y) : e^x * cos(y) */
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpl	8(%eax)
-	fstpl	(%eax)
-	ret	$4
-
-	/* We have to reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-7:	fldt	MO(twopi)	/* 2*pi : y : e^x : e^x */
-	fxch			/* y : 2*pi : e^x : e^x */
-8:	fprem1			/* y%(2*pi) : 2*pi : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	8b
-	fstp	%st(1)		/* y%(2*pi) : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fmulp	%st, %st(3)
-	fmulp	%st, %st(1)
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpl	8(%eax)
-	fstpl	(%eax)
-	ret	$4
-
-	/* The real part is +-inf.  We must make further differences.  */
-	.align ALIGNARG(4)
-1:	fxam			/* y : x */
-	fnstsw
-	movb	%ah, %dl
-	testb	$0x01, %ah	/* See above why 0x01 is usable here.  */
-	jne	3f
-
-
-	/* The real part is +-Inf and the imaginary part is finite.  */
-	andl	$0x245, %edx
-	cmpb	$0x40, %dl	/* Imaginary part == 0?  */
-	je	4f		/* Yes ->  */
-
-	fxch			/* x : y */
-	shrl	$5, %edx
-	fstp	%st(0)		/* y */ /* Drop the real part.  */
-	andl	$16, %edx	/* This puts the sign bit of the real part
-				   in bit 4.  So we can use it to index a
-				   small array to select 0 or Inf.  */
-	fsincos			/* cos(y) : sin(y) */
-	fnstsw
-	testl	$0x0400, %eax
-	jnz	5f
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	movl	4(%esp), %edx		/* Pointer to memory for result.  */
-	fstl	8(%edx)
-	fstpl	(%edx)
-	ftst
-	fnstsw
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%eax, 4(%edx)
-	fstp	%st(0)
-	ftst
-	fnstsw
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%eax, 12(%edx)
-	fstp	%st(0)
-	ret	$4
-	/* We must reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-5:	fldt	MO(twopi)
-	fxch
-6:	fprem1
-	fnstsw
-	testl	$0x400, %eax
-	jnz	6b
-	fstp	%st(1)
-	fsincos
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	movl	4(%esp), %edx		/* Pointer to memory for result.  */
-	fstl	8(%edx)
-	fstpl	(%edx)
-	ftst
-	fnstsw
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%eax, 4(%edx)
-	fstp	%st(0)
-	ftst
-	fnstsw
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%eax, 12(%edx)
-	fstp	%st(0)
-	ret	$4
-
-	/* The real part is +-Inf and the imaginary part is +-0.  So return
-	   +-Inf+-0i.  */
-	.align ALIGNARG(4)
-4:	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpl	8(%eax)
-	shrl	$5, %edx
-	fstp	%st(0)
-	andl	$16, %edx
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	fstpl	(%eax)
-	ret	$4
-
-	/* The real part is +-Inf, the imaginary is also is not finite.  */
-	.align ALIGNARG(4)
-3:	fstp	%st(0)
-	fstp	%st(0)		/* <empty> */
-	andb	$0x45, %ah
-	andb	$0x47, %dh
-	xorb	%dh, %ah
-	jnz	30f
-	fldl	MO(infinity)	/* Raise invalid exception.  */
-	fmull	MO(zero)
-	fstp	%st(0)
-30:	movl	%edx, %eax
-	shrl	$5, %edx
-	shll	$4, %eax
-	andl	$16, %edx
-	andl	$32, %eax
-	orl	%eax, %edx
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	fldl	MOX(huge_nan_null_null+8,%edx,1)
-	fxch
-	fstpl	(%eax)
-	fstpl	8(%eax)
-	ret	$4
-
-	/* The real part is NaN.  */
-	.align ALIGNARG(4)
-20:	fldl	MO(infinity)		/* Raise invalid exception.  */
-	fmull	MO(zero)
-	fstp	%st(0)
-2:	fstp	%st(0)
-	fstp	%st(0)
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fldl	MO(huge_nan_null_null+8)
-	fstl	(%eax)
-	fstpl	8(%eax)
-	ret	$4
-
-END(__cexp)
-weak_alias (__cexp, cexp)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cexpf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cexpf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cexpf.S (removed)
@@ -1,257 +1,0 @@
-/* ix87 specific implementation of complex exponential function for double.
-   Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
-   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.
-
-   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 <sysdep.h>
-
-	.section .rodata
-
-	.align ALIGNARG(4)
-	ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
-	.byte 0, 0, 0x80, 0x7f
-	.byte 0, 0, 0xc0, 0x7f
-	.float	0.0
-zero:	.float	0.0
-infinity:
-	.byte 0, 0, 0x80, 0x7f
-	.byte 0, 0, 0xc0, 0x7f
-	.float 0.0
-	.byte 0, 0, 0, 0x80
-	ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
-	ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
-	.byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(twopi)
-
-	ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
-	.byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(l2e)
-
-	ASM_TYPE_DIRECTIVE(one,@object)
-one:	.double 1.0
-	ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
-	.text
-ENTRY(__cexpf)
-	flds	4(%esp)			/* x */
-	fxam
-	fnstsw
-	flds	8(%esp)			/* y : x */
-#ifdef  PIC
-	LOAD_PIC_REG (cx)
-#endif
-	movb	%ah, %dh
-	andb	$0x45, %ah
-	cmpb	$0x05, %ah
-	je	1f			/* Jump if real part is +-Inf */
-	cmpb	$0x01, %ah
-	je	2f			/* Jump if real part is NaN */
-
-	fxam				/* y : x */
-	fnstsw
-	/* If the imaginary part is not finite we return NaN+i NaN, as
-	   for the case when the real part is NaN.  A test for +-Inf and
-	   NaN would be necessary.  But since we know the stack register
-	   we applied `fxam' to is not empty we can simply use one test.
-	   Check your FPU manual for more information.  */
-	andb	$0x01, %ah
-	cmpb	$0x01, %ah
-	je	20f
-
-	/* We have finite numbers in the real and imaginary part.  Do
-	   the real work now.  */
-	fxch			/* x : y */
-	fldt	MO(l2e)		/* log2(e) : x : y */
-	fmulp			/* x * log2(e) : y */
-	fld	%st		/* x * log2(e) : x * log2(e) : y */
-	frndint			/* int(x * log2(e)) : x * log2(e) : y */
-	fsubr	%st, %st(1)	/* int(x * log2(e)) : frac(x * log2(e)) : y */
-	fxch			/* frac(x * log2(e)) : int(x * log2(e)) : y */
-	f2xm1			/* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
-	faddl	MO(one)		/* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
-	fscale			/* e^x : int(x * log2(e)) : y */
-	fst	%st(1)		/* e^x : e^x : y */
-	fxch	%st(2)		/* y : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	7f
-	fmulp	%st, %st(3)	/* sin(y) : e^x : e^x * cos(y) */
-	fmulp	%st, %st(1)	/* e^x * sin(y) : e^x * cos(y) */
-	subl	$8, %esp
-	cfi_adjust_cfa_offset (8)
-	fstps	4(%esp)
-	fstps	(%esp)
-	popl	%eax
-	cfi_adjust_cfa_offset (-4)
-	popl	%edx
-	cfi_adjust_cfa_offset (-4)
-	ret
-
-	/* We have to reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-7:	fldt	MO(twopi)	/* 2*pi : y : e^x : e^x */
-	fxch			/* y : 2*pi : e^x : e^x */
-8:	fprem1			/* y%(2*pi) : 2*pi : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	8b
-	fstp	%st(1)		/* y%(2*pi) : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fmulp	%st, %st(3)
-	fmulp	%st, %st(1)
-	subl	$8, %esp
-	cfi_adjust_cfa_offset (8)
-	fstps	4(%esp)
-	fstps	(%esp)
-	popl	%eax
-	cfi_adjust_cfa_offset (-4)
-	popl	%edx
-	cfi_adjust_cfa_offset (-4)
-	ret
-
-	/* The real part is +-inf.  We must make further differences.  */
-	.align ALIGNARG(4)
-1:	fxam			/* y : x */
-	fnstsw
-	movb	%ah, %dl
-	testb	$0x01, %ah	/* See above why 0x01 is usable here.  */
-	jne	3f
-
-
-	/* The real part is +-Inf and the imaginary part is finite.  */
-	andl	$0x245, %edx
-	cmpb	$0x40, %dl	/* Imaginary part == 0?  */
-	je	4f		/* Yes ->  */
-
-	fxch			/* x : y */
-	shrl	$6, %edx
-	fstp	%st(0)		/* y */ /* Drop the real part.  */
-	andl	$8, %edx	/* This puts the sign bit of the real part
-				   in bit 3.  So we can use it to index a
-				   small array to select 0 or Inf.  */
-	fsincos			/* cos(y) : sin(y) */
-	fnstsw
-	testl	$0x0400, %eax
-	jnz	5f
-	fxch
-	ftst
-	fnstsw
-	fstp	%st(0)
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	MOX(huge_nan_null_null,%edx,1), %eax
-	movl	MOX(huge_nan_null_null,%edx,1), %ecx
-	movl	%eax, %edx
-	ftst
-	fnstsw
-	fstp	%st(0)
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%ecx, %eax
-	ret
-	/* We must reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-5:	fldt	MO(twopi)
-	fxch
-6:	fprem1
-	fnstsw
-	testl	$0x400, %eax
-	jnz	6b
-	fstp	%st(1)
-	fsincos
-	fxch
-	ftst
-	fnstsw
-	fstp	%st(0)
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	MOX(huge_nan_null_null,%edx,1), %eax
-	movl	MOX(huge_nan_null_null,%edx,1), %ecx
-	movl	%eax, %edx
-	ftst
-	fnstsw
-	fstp	%st(0)
-	shll	$23, %eax
-	andl	$0x80000000, %eax
-	orl	%ecx, %eax
-	ret
-
-	/* The real part is +-Inf and the imaginary part is +-0.  So return
-	   +-Inf+-0i.  */
-	.align ALIGNARG(4)
-4:	subl	$4, %esp
-	cfi_adjust_cfa_offset (4)
-	fstps	(%esp)
-	shrl	$6, %edx
-	fstp	%st(0)
-	andl	$8, %edx
-	movl	MOX(huge_nan_null_null,%edx,1), %eax
-	popl	%edx
-	cfi_adjust_cfa_offset (-4)
-	ret
-
-	/* The real part is +-Inf, the imaginary is also is not finite.  */
-	.align ALIGNARG(4)
-3:	fstp	%st(0)
-	fstp	%st(0)		/* <empty> */
-	andb	$0x45, %ah
-	andb	$0x47, %dh
-	xorb	%dh, %ah
-	jnz	30f
-	flds	MO(infinity)	/* Raise invalid exception.  */
-	fmuls	MO(zero)
-	fstp	%st(0)
-30:	movl	%edx, %eax
-	shrl	$6, %edx
-	shll	$3, %eax
-	andl	$8, %edx
-	andl	$16, %eax
-	orl	%eax, %edx
-
-	movl	MOX(huge_nan_null_null,%edx,1), %eax
-	movl	MOX(huge_nan_null_null+4,%edx,1), %edx
-	ret
-
-	/* The real part is NaN.  */
-	.align ALIGNARG(4)
-20:	flds	MO(infinity)		/* Raise invalid exception.  */
-	fmuls	MO(zero)
-	fstp	%st(0)
-2:	fstp	%st(0)
-	fstp	%st(0)
-	movl	MO(huge_nan_null_null+4), %eax
-	movl	%eax, %edx
-	ret
-
-END(__cexpf)
-weak_alias (__cexpf, cexpf)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cexpl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cexpl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cexpl.S (removed)
@@ -1,256 +1,0 @@
-/* ix87 specific implementation of complex exponential function for double.
-   Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
-   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.
-
-   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 <sysdep.h>
-
-	.section .rodata
-
-	.align ALIGNARG(4)
-	ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
-	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
-	.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-	.double	0.0
-zero:	.double	0.0
-infinity:
-	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
-	.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-	.double 0.0
-	.byte 0, 0, 0, 0, 0, 0, 0, 0x80
-	ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
-	ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
-	.byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(twopi)
-
-	ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
-	.byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
-	.byte 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(l2e)
-
-	ASM_TYPE_DIRECTIVE(one,@object)
-one:	.double 1.0
-	ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
-	.text
-ENTRY(__cexpl)
-	fldt	8(%esp)			/* x */
-	fxam
-	fnstsw
-	fldt	20(%esp)		/* y : x */
-#ifdef  PIC
-	LOAD_PIC_REG (cx)
-#endif
-	movb	%ah, %dh
-	andb	$0x45, %ah
-	cmpb	$0x05, %ah
-	je	1f			/* Jump if real part is +-Inf */
-	cmpb	$0x01, %ah
-	je	2f			/* Jump if real part is NaN */
-
-	fxam				/* y : x */
-	fnstsw
-	/* If the imaginary part is not finite we return NaN+i NaN, as
-	   for the case when the real part is NaN.  A test for +-Inf and
-	   NaN would be necessary.  But since we know the stack register
-	   we applied `fxam' to is not empty we can simply use one test.
-	   Check your FPU manual for more information.  */
-	andb	$0x01, %ah
-	cmpb	$0x01, %ah
-	je	20f
-
-	/* We have finite numbers in the real and imaginary part.  Do
-	   the real work now.  */
-	fxch			/* x : y */
-	fldt	MO(l2e)		/* log2(e) : x : y */
-	fmulp			/* x * log2(e) : y */
-	fld	%st		/* x * log2(e) : x * log2(e) : y */
-	frndint			/* int(x * log2(e)) : x * log2(e) : y */
-	fsubr	%st, %st(1)	/* int(x * log2(e)) : frac(x * log2(e)) : y */
-	fxch			/* frac(x * log2(e)) : int(x * log2(e)) : y */
-	f2xm1			/* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
-	faddl	MO(one)		/* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
-	fscale			/* e^x : int(x * log2(e)) : y */
-	fst	%st(1)		/* e^x : e^x : y */
-	fxch	%st(2)		/* y : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	7f
-	fmulp	%st, %st(3)	/* sin(y) : e^x : e^x * cos(y) */
-	fmulp	%st, %st(1)	/* e^x * sin(y) : e^x * cos(y) */
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpt	12(%eax)
-	fstpt	(%eax)
-	ret	$4
-
-	/* We have to reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-7:	fldt	MO(twopi)	/* 2*pi : y : e^x : e^x */
-	fxch			/* y : 2*pi : e^x : e^x */
-8:	fprem1			/* y%(2*pi) : 2*pi : e^x : e^x */
-	fnstsw
-	testl	$0x400, %eax
-	jnz	8b
-	fstp	%st(1)		/* y%(2*pi) : e^x : e^x */
-	fsincos			/* cos(y) : sin(y) : e^x : e^x */
-	fmulp	%st, %st(3)
-	fmulp	%st, %st(1)
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpt	12(%eax)
-	fstpt	(%eax)
-	ret	$4
-
-	/* The real part is +-inf.  We must make further differences.  */
-	.align ALIGNARG(4)
-1:	fxam			/* y : x */
-	fnstsw
-	movb	%ah, %dl
-	testb	$0x01, %ah	/* See above why 0x01 is usable here.  */
-	jne	3f
-
-
-	/* The real part is +-Inf and the imaginary part is finite.  */
-	andl	$0x245, %edx
-	cmpb	$0x40, %dl	/* Imaginary part == 0?  */
-	je	4f		/* Yes ->  */
-
-	fxch			/* x : y */
-	shrl	$5, %edx
-	fstp	%st(0)		/* y */ /* Drop the real part.  */
-	andl	$16, %edx	/* This puts the sign bit of the real part
-				   in bit 4.  So we can use it to index a
-				   small array to select 0 or Inf.  */
-	fsincos			/* cos(y) : sin(y) */
-	fnstsw
-	testl	$0x0400, %eax
-	jnz	5f
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	movl	4(%esp), %edx		/* Pointer to memory for result.  */
-	fld	%st
-	fstpt	12(%edx)
-	fstpt	(%edx)
-	ftst
-	fnstsw
-	shll	$7, %eax
-	andl	$0x8000, %eax
-	orl	%eax, 8(%edx)
-	fstp	%st(0)
-	ftst
-	fnstsw
-	shll	$7, %eax
-	andl	$0x8000, %eax
-	orl	%eax, 20(%edx)
-	fstp	%st(0)
-	ret	$4
-	/* We must reduce the argument to fsincos.  */
-	.align ALIGNARG(4)
-5:	fldt	MO(twopi)
-	fxch
-6:	fprem1
-	fnstsw
-	testl	$0x400, %eax
-	jnz	6b
-	fstp	%st(1)
-	fsincos
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	movl	4(%esp), %edx		/* Pointer to memory for result.  */
-	fld	%st
-	fstpt	12(%edx)
-	fstpt	(%edx)
-	ftst
-	fnstsw
-	shll	$7, %eax
-	andl	$0x8000, %eax
-	orl	%eax, 8(%edx)
-	fstp	%st(0)
-	ftst
-	fnstsw
-	shll	$7, %eax
-	andl	$0x8000, %eax
-	orl	%eax, 20(%edx)
-	fstp	%st(0)
-	ret	$4
-
-	/* The real part is +-Inf and the imaginary part is +-0.  So return
-	   +-Inf+-0i.  */
-	.align ALIGNARG(4)
-4:	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fstpt	12(%eax)
-	shrl	$5, %edx
-	fstp	%st(0)
-	andl	$16, %edx
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	fstpt	(%eax)
-	ret	$4
-
-	/* The real part is +-Inf, the imaginary is also is not finite.  */
-	.align ALIGNARG(4)
-3:	fstp	%st(0)
-	fstp	%st(0)		/* <empty> */
-	andb	$0x45, %ah
-	andb	$0x47, %dh
-	xorb	%dh, %ah
-	jnz	30f
-	fldl	MO(infinity)	/* Raise invalid exception.  */
-	fmull	MO(zero)
-	fstp	%st(0)
-30:	movl	%edx, %eax
-	shrl	$5, %edx
-	shll	$4, %eax
-	andl	$16, %edx
-	andl	$32, %eax
-	orl	%eax, %edx
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-
-	fldl	MOX(huge_nan_null_null,%edx,1)
-	fldl	MOX(huge_nan_null_null+8,%edx,1)
-	fxch
-	fstpt	(%eax)
-	fstpt	12(%eax)
-	ret	$4
-
-	/* The real part is NaN.  */
-	.align ALIGNARG(4)
-20:	fldl	MO(infinity)		/* Raise invalid exception.  */
-	fmull	MO(zero)
-	fstp	%st(0)
-2:	fstp	%st(0)
-	fstp	%st(0)
-	movl	4(%esp), %eax		/* Pointer to memory for result.  */
-	fldl	MO(huge_nan_null_null+8)
-	fld	%st(0)
-	fstpt	(%eax)
-	fstpt	12(%eax)
-	ret	$4
-
-END(__cexpl)
-weak_alias (__cexpl, cexpl)

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_pow.c Wed Mar 21 19:50:58 2012
@@ -111,7 +111,7 @@
     if (((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] != 0)
 	|| (v.i[HIGH_HALF] & 0x7fffffff) > 0x7ff00000)
       return y;
-    if (ABS(y) > 1.0e20) return (y>0)?0:INF.x;
+    if (ABS(y) > 1.0e20) return (y>0)?0:1.0/ABS(x);
     k = checkint(y);
     if (k == -1)
       return y < 0 ? 1.0/x : x;

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure Wed Mar 21 19:50:58 2012
@@ -393,7 +393,7 @@
   # and libc_cv_localedir.
   test -n "$libc_cv_slibdir" || \
   case $machine in
-  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
+  sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
     libc_cv_slibdir="/lib64"
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib64';

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/configure.in Wed Mar 21 19:50:58 2012
@@ -132,7 +132,7 @@
   # and libc_cv_localedir.
   test -n "$libc_cv_slibdir" || \
   case $machine in
-  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
+  sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
     libc_cv_slibdir="/lib64"
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib64';

Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/e_powl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/e_powl.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/e_powl.S Wed Mar 21 19:50:58 2012
@@ -32,6 +32,9 @@
 	ASM_TYPE_DIRECTIVE(p63,@object)
 p63:	.byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
 	ASM_SIZE_DIRECTIVE(p63)
+	ASM_TYPE_DIRECTIVE(p64,@object)
+p64:	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
+	ASM_SIZE_DIRECTIVE(p64)
 
 	.section .rodata.cst16,"aM",@progbits,16
 
@@ -227,6 +230,19 @@
 	testb	$2, %dh
 	jz	16f		// jump if x == +inf
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fldl	MO(p64)		// 1L<<64 : y
+	fld	%st(1)		// y : 1L<<64 : y
+	fabs			// |y| : 1L<<64 : y
+	fcomip	%st(1), %st	// 1L<<64 : y
+	fstp	%st(0)		// y
+	jnc	16f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
+
 	// We must find out whether y is an odd integer.
 	fld	%st		// y : y
 	fistpll	-8(%rsp)	// y
@@ -283,6 +299,19 @@
 	// x is Â0 and y is < 0.  We must find out whether y is an odd integer.
 	testb	$2, %dh
 	jz	25f
+
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fldl	MO(p64)		// 1L<<64 : y
+	fld	%st(1)		// y : 1L<<64 : y
+	fabs			// |y| : 1L<<64 : y
+	fcomip	%st(1), %st	// 1L<<64 : y
+	fstp	%st(0)		// y
+	jnc	25f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
 
 	fld	%st		// y : y
 	fistpll	-8(%rsp)	// y
@@ -315,6 +344,18 @@
 21:	testb	$2, %dh
 	jz	22f
 
+	// fistpll raises invalid exception for |y| >= 1L<<63, but y
+	// may be odd unless we know |y| >= 1L<<64.
+	fldl	MO(p64)		// 1L<<64 : y
+	fxch			// y : 1L<<64
+	fcomi	%st(1), %st	// y : 1L<<64
+	fstp	%st(1)		// y
+	jnc	22f
+	fldl	MO(p63)		// p63 : y
+	fxch			// y : p63
+	fprem			// y%p63 : p63
+	fstp	%st(1)		// y%p63
+
 	fld	%st		// y : y
 	fistpll	-8(%rsp)	// y
 	fildll	-8(%rsp)	// int(y) : y

Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps Wed Mar 21 19:50:58 2012
@@ -482,6 +482,9 @@
 ifloat: 1
 
 # cexp
+Test "Real part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
 float: 1
 ifloat: 1
@@ -491,6 +494,19 @@
 Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
 
 # clog
 Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
@@ -2090,11 +2106,17 @@
 ldouble: 1
 
 Function: Real part of "cexp":
-float: 1
-ifloat: 1
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "cexp":
-float: 1
+double: 1
+float: 1
+idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1

Modified: fsf/trunk/libc/timezone/Makefile
==============================================================================
--- fsf/trunk/libc/timezone/Makefile (original)
+++ fsf/trunk/libc/timezone/Makefile Wed Mar 21 19:50:58 2012
@@ -45,7 +45,6 @@
 CPPFLAGS-zic = -DNOT_IN_libc
 
 ifeq ($(have-ksh),yes)
-install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
 install-bin-script = tzselect
 generated += tzselect
 endif
@@ -111,7 +110,3 @@
 	    -e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
 	chmod 555 $@.new
 	mv -f $@.new $@
-
-$(addprefix $(inst_zonedir)/,iso3166.tab zone.tab): \
-    $(inst_zonedir)/%: % $(+force)
-	$(do-install)

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits