1/*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 *
5 * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
6 */
7
8#include <machine/asm.h>
9
10RCSID("$NetBSD: $")
11
12ENTRY(__tanl)
13	fldt	4(%esp)
14	fptan
15	fnstsw	%ax
16	testl	$0x400,%eax
17	jnz	1f
18	fstp	%st(0)
19	ret
201:	fldpi
21	fadd	%st(0)
22	fxch	%st(1)
232:	fprem1
24	fstsw	%ax
25	testl	$0x400,%eax
26	jnz	2b
27	fstp	%st(1)
28	fptan
29	fstp	%st(0)
30	ret
31END (__tanl)
32weak_alias (__tanl, tanl)
33