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	"sinl_internal.S"
 9	.text
10#ifdef __x86_64__
11	.align 8
12#else
13	.align 4
14#endif
15.globl __MINGW_USYMBOL(__sinl_internal)
16	.def	__MINGW_USYMBOL(__sinl_internal);	.scl	2;	.type	32;	.endef
17__MINGW_USYMBOL(__sinl_internal):
18#ifdef __x86_64__
19	fldt	(%rdx)
20	fsin
21	fnstsw	%ax
22	testl	$0x400,%eax
23	jnz	1f
24	movq	%rcx,%rax
25        movq	$0,8(%rcx)
26	fstpt	(%rcx)
27	ret
281:	fldpi
29	fadd	%st(0)
30	fxch	%st(1)
312:	fprem1
32	fnstsw	%ax
33	testl	$0x400,%eax
34	jnz	2b
35	fstp	%st(1)
36	fsin
37	movq	%rcx,%rax
38	movq	$0,8(%rcx)
39	fstpt	(%rcx)
40	ret
41#else
42	fldt	4(%esp)
43	fsin
44	fnstsw	%ax
45	testl	$0x400,%eax
46	jnz	1f
47	ret
481:	fldpi
49	fadd	%st(0)
50	fxch	%st(1)
512:	fprem1
52	fnstsw	%ax
53	testl	$0x400,%eax
54	jnz	2b
55	fstp	%st(1)
56	fsin
57	ret
58#endif