Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 13 Feb 2000 19:40:31 +0000 (19:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 13 Feb 2000 19:40:31 +0000 (19:40 +0000)
* sysdeps/i386/fpu/s_cosf.S: Domain of opcode is not large enough
so test for overflow and handle it.
* sysdeps/i386/fpu/s_sinf.S: Likewise.
* sysdeps/i386/fpu/s_tanf.S: Likewise.
Patch by Miloslav Trmac <mitr@volny.cz> (PR libc/1563).

ChangeLog
sysdeps/i386/fpu/s_cosf.S
sysdeps/i386/fpu/s_sinf.S
sysdeps/i386/fpu/s_tanf.S

index e109ee2..f43b66b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/i386/fpu/s_cosf.S: Domain of opcode is not large enough
+       so test for overflow and handle it.
+       * sysdeps/i386/fpu/s_sinf.S: Likewise.
+       * sysdeps/i386/fpu/s_tanf.S: Likewise.
+       Patch by Miloslav Trmac <mitr@volny.cz> (PR libc/1563).
+
        * iconvdata/Makefile (modules): Add UTF-16.
        (distribute): Add utf-16.c.
        * iconvdata/gconv-modules: Add entries for UTF-16, UTF-16BE, and
index d8e8090..21f87aa 100644 (file)
@@ -7,10 +7,23 @@
 
 RCSID("$NetBSD: s_cosf.S,v 1.3 1995/05/08 23:55:16 jtc Exp $")
 
-/* A float's domain isn't large enough to require argument reduction. */
 ENTRY(__cosf)
        flds    4(%esp)
        fcos
+       fnstsw  %ax
+       testl   $0x400,%eax
+       jnz     1f
+       ret
+       .align ALIGNARG(4)
+1:     fldpi
+       fadd    %st(0)
+       fxch    %st(1)
+2:     fprem1
+       fnstsw  %ax
+       testl   $0x400,%eax
+       jnz     2b
+       fstp    %st(1)
+       fcos
        ret
 END (__cosf)
 weak_alias (__cosf, cosf)
index a010d60..5ca45f5 100644 (file)
@@ -7,10 +7,23 @@
 
 RCSID("$NetBSD: s_sinf.S,v 1.3 1995/05/09 00:27:53 jtc Exp $")
 
-/* A float's domain isn't large enough to require argument reduction. */
 ENTRY(__sinf)
        flds    4(%esp)
        fsin
+       fnstsw  %ax
+       testl   $0x400,%eax
+       jnz     1f
+       ret
+       .align ALIGNARG(4)
+1:     fldpi
+       fadd    %st(0)
+       fxch    %st(1)
+2:     fprem1
+       fnstsw  %ax
+       testl   $0x400,%eax
+       jnz     2b
+       fstp    %st(1)
+       fsin
        ret
 END (__sinf)
 weak_alias (__sinf, sinf)
index 7a75091..355dff9 100644 (file)
@@ -7,10 +7,23 @@
 
 RCSID("$NetBSD: s_tanf.S,v 1.3 1995/05/09 00:31:09 jtc Exp $")
 
-/* A float's domain isn't large enough to require argument reduction. */
 ENTRY(__tanf)
        flds    4(%esp)
        fptan
+       fnstsw  %ax
+       testl   $0x400,%eax
+       jnz     1f
+       fstp    %st(0)
+       ret
+1:     fldpi
+       fadd    %st(0)
+       fxch    %st(1)
+2:     fprem1
+       fstsw   %ax
+       testl   $0x400,%eax
+       jnz     2b
+       fstp    %st(1)
+       fptan
        fstp    %st(0)
        ret
 END (__tanf)