Update.
[glibc.git] / sysdeps / libm-i387 / s_cos.S
blobac8b1459d965c64475dfaee6459a34423158aaff
1 /*
2  * Written by J.T. Conklin <jtc@netbsd.org>.
3  * Public domain.
4  */
6 #include <machine/asm.h>
8 RCSID("$NetBSD: s_cos.S,v 1.5 1995/05/08 23:54:00 jtc Exp $")
10 ENTRY(__cos)
11         fldl    4(%esp)
12         fcos
13         fnstsw  %ax
14         testl   $0x400,%eax
15         jnz     1f
16         ret
17         .align ALIGNARG(4)
18 1:      fldpi
19         fadd    %st(0)
20         fxch    %st(1)
21 2:      fprem1
22         fnstsw  %ax
23         testl   $0x400,%eax
24         jnz     2b
25         fstp    %st(1)
26         fcos
27         ret
28 END (__cos)
29 weak_alias (__cos, cos)