]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/libm-i387/s_tan.S
update from main archive 961005
[thirdparty/glibc.git] / sysdeps / libm-i387 / s_tan.S
1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 */
5
6 #include <machine/asm.h>
7
8 RCSID("$NetBSD: s_tan.S,v 1.5 1995/05/09 00:30:00 jtc Exp $")
9
10 ENTRY(__tan)
11 fldl 4(%esp)
12 fptan
13 fnstsw %ax
14 andw $0x400,%ax
15 jnz 1f
16 fstp %st(0)
17 ret
18 1: fldpi
19 fadd %st(0)
20 fxch %st(1)
21 2: fprem1
22 fstsw %ax
23 andw $0x400,%ax
24 jnz 2b
25 fstp %st(1)
26 fptan
27 fstp %st(0)
28 ret
29 PSEUDO_END (__tan)
30 weak_alias (__tan, tan)