* sysdeps/i386/fpu/s_expm1l.S: Simply use exp implementation for large
authorUlrich Drepper <drepper@redhat.com>
Tue, 5 Aug 2008 22:08:42 +0000 (22:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 5 Aug 2008 22:08:42 +0000 (22:08 +0000)
parameters.
* sysdeps/x86_64/fpu/s_expm1l.S: Likewise.
Patch by Denys Vlasenko <dvlasenk@redhat.com>.

* nscd/connections.c (nscd_init): Typo in preprocessor directive.

ChangeLog
sysdeps/i386/fpu/s_expm1l.S
sysdeps/unix/sysv/linux/clock_getres.c
sysdeps/x86_64/fpu/s_expm1l.S

index 2fd69a6..c64970f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-05  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/i386/fpu/s_expm1l.S: Simply use exp implementation for large
+       parameters.
+       * sysdeps/x86_64/fpu/s_expm1l.S: Likewise.
+       Patch by Denys Vlasenko <dvlasenk@redhat.com>.
+
 2008-08-03  Ulrich Drepper  <drepper@redhat.com>
 
        * nscd/connections.c (main_loop_poll): Pass a buffer which is
@@ -83,7 +90,7 @@
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Raise size of initial
        buffer passed to NSS functions.
 
-       * nscd/connections.c (nscd_init): Type if preprocessor directive.
+       * nscd/connections.c (nscd_init): Typo in preprocessor directive.
 
        * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PACCEPT):
        Define.
index 2dc379b..b69b22b 100644 (file)
@@ -1,5 +1,5 @@
 /* ix87 specific implementation of exp(x)-1.
-   Copyright (C) 1996, 1997, 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2002, 2005, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
    Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
@@ -48,6 +48,11 @@ l2e: .tfloat 1.442695040888963407359924681002
 
        .text
 ENTRY(__expm1l)
+       movzwl  4+8(%esp), %eax // load sign bit and 15-bit exponent
+       xorb    $0x80, %ah      // invert sign bit (now 1 is "positive")
+       cmpl    $0xc006, %eax   // is num positive and exp >= 6 (number is >= 128.0)?
+       jae     __ieee754_expl  // (if num is denormal, it is at least >= 64.0)
+
        fldt    4(%esp)         // x
        fxam                    // Is NaN or +-Inf?
        fstsw   %ax
index 813d3eb..581ff22 100644 (file)
@@ -1,5 +1,5 @@
 /* clock_getres -- Get the resolution of a POSIX clockid_t.  Linux version.
-   Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 2003,2004,2005,2006, 2008 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
@@ -121,7 +121,7 @@ maybe_syscall_getres_cpu (clockid_t clock_id, struct timespec *res)
        return 0;
 
       e = INTERNAL_SYSCALL_ERRNO (r, err);
-# ifndef __ASSUME_POSIX_TIMERS
+#  ifndef __ASSUME_POSIX_TIMERS
       if (e == ENOSYS)
        {
          __libc_missing_posix_timers = 1;
@@ -129,7 +129,7 @@ maybe_syscall_getres_cpu (clockid_t clock_id, struct timespec *res)
          e = EINVAL;
        }
       else
-# endif
+#  endif
        {
          if (e == EINVAL)
            {
index b4f5a3e..05a1bfc 100644 (file)
@@ -1,5 +1,5 @@
 /* ix87 specific implementation of exp(x)-1.
-   Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2001, 2002, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
    Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
@@ -48,6 +48,11 @@ l2e: .tfloat 1.442695040888963407359924681002
 
        .text
 ENTRY(__expm1l)
+       movzwl  8+8(%rsp), %eax // load sign bit and 15-bit exponent
+       xorb    $0x80, %ah      // invert sign bit (now 1 is "positive")
+       cmpl    $0xc006, %eax   // is num positive and exp >= 6 (number is >= 128.0)?
+       jae     __ieee754_expl  // (if num is denormal, it is at least >= 64.0)
+
        fldt    8(%rsp)         // x
        fxam                    // Is NaN or +-Inf?
        fstsw   %ax