diff options
Diffstat (limited to 'sysdeps/i386/fpu/s_cosf.S')
-rw-r--r-- | sysdeps/i386/fpu/s_cosf.S | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/s_cosf.S b/sysdeps/i386/fpu/s_cosf.S index d8e8090639..21f87aa874 100644 --- a/sysdeps/i386/fpu/s_cosf.S +++ b/sysdeps/i386/fpu/s_cosf.S @@ -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) |