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 "cosl_internal.S" 9 .text 10#ifdef __x86_64__ 11 .align 8 12#else 13 .align 4 14#endif 15.globl __MINGW_USYMBOL(__cosl_internal) 16 .def __MINGW_USYMBOL(__cosl_internal); .scl 2; .type 32; .endef 17__MINGW_USYMBOL(__cosl_internal): 18#ifdef __x86_64__ 19 fldt (%rdx) 20 fcos 21 fnstsw %ax 22 testl $0x400,%eax 23 jz 1f 24 fldpi 25 fadd %st(0) 26 fxch %st(1) 272: fprem1 28 fnstsw %ax 29 testl $0x400,%eax 30 jnz 2b 31 fstp %st(1) 32 fcos 331: movq %rcx,%rax 34 movq $0,8(%rcx) 35 fstpt (%rcx) 36 ret 37#else 38 fldt 4(%esp) 39 fcos 40 fnstsw %ax 41 testl $0x400,%eax 42 jnz 1f 43 ret 441: fldpi 45 fadd %st(0) 46 fxch %st(1) 472: fprem1 48 fnstsw %ax 49 testl $0x400,%eax 50 jnz 2b 51 fstp %st(1) 52 fcos 53 ret 54#endif 55 56