master
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#include <_mingw_mac.h>
7
8 .file "tanl.S"
9 .text
10#ifdef __x86_64__
11 .align 8
12#else
13 .align 4
14#endif
15.globl __MINGW_USYMBOL(tanl)
16 .def __MINGW_USYMBOL(tanl); .scl 2; .type 32; .endef
17__MINGW_USYMBOL(tanl):
18#ifdef __x86_64__
19 fldt (%rdx)
20 fptan
21 fnstsw %ax
22 testl $0x400,%eax
23 jnz 1f
24 fstp %st(0)
25 movq %rcx,%rax
26 movq $0,8(%rcx)
27 fstpt (%rcx)
28 ret
291: fldpi
30 fadd %st(0)
31 fxch %st(1)
322: fprem1
33 fstsw %ax
34 testl $0x400,%eax
35 jnz 2b
36 fstp %st(1)
37 fptan
38 fstp %st(0)
39 movq %rcx,%rax
40 movq $0,8(%rcx)
41 fstpt (%rcx)
42 ret
43#else
44 fldt 4(%esp)
45 fptan
46 fnstsw %ax
47 testl $0x400,%eax
48 jnz 1f
49 fstp %st(0)
50 ret
511: fldpi
52 fadd %st(0)
53 fxch %st(1)
542: fprem1
55 fstsw %ax
56 testl $0x400,%eax
57 jnz 2b
58 fstp %st(1)
59 fptan
60 fstp %st(0)
61 ret
62#endif