2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
6
#include <_mingw_mac.h>
15
.globl __MINGW_USYMBOL(exp2l)
16
.def __MINGW_USYMBOL(exp2l); .scl 2; .type 32; .endef
17
__MINGW_USYMBOL(exp2l):
20
fxam /* Is NaN or +-Inf? */
25
je 1f /* Is +-Inf, jump. */
28
fsubr %st,%st(1) /* fract(x) */
30
f2xm1 /* 2^(fract(x)) - 1 */
32
faddp /* 2^(fract(x)) */
40
1: testl $0x200, %eax /* Test sign. */
41
jz 2f /* If positive, jump. */
43
fldz /* Set result to 0. */
50
/* I added the following ugly construct because exp(+-Inf) resulted
51
in NaN. The ugliness results from the bright minds at Intel.
52
For the i686 the code can be written better.
53
-- drepper@cygnus.com. */
54
fxam /* Is NaN or +-Inf? */
59
je 1f /* Is +-Inf, jump. */
62
fsubr %st,%st(1) /* fract(x) */
64
f2xm1 /* 2^(fract(x)) - 1 */
66
faddp /* 2^(fract(x)) */
71
1: testl $0x200, %eax /* Test sign. */
72
jz 2f /* If positive, jump. */
74
fldz /* Set result to 0. */