13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 */
24 /*
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 .file "expm1l.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(expm1l,function)
33 #include "libm_synonyms.h"
34
35 .data
36 .align 16
37 ln2_hi: .4byte 0xd1d00000, 0xb17217f7, 0x3ffe, 0x0
38 ln2_lo: .4byte 0x4c67fc0d, 0x8654361c, 0xbfce, 0x0
39
40 ENTRY(expm1l)
41 movl 16(%rsp),%ecx / cx <--sign&bexp(x)
42 movl %ecx,%eax / ax <--sign&bexp(x)
43 andl $0x7fff,%ecx / ecx <-- zero_xtnd(bexp(x))
44 cmpl $0x3ffe,%ecx / Is |x| < ln(2)?
45 jb .shortcut / If so, take a shortcut.
46 je .check_tail / |x| may be only slightly < ln(2)
47 .general_case: / Here, |x| > ln(2) or x is NaN
48 cmpl $0x7fff,%ecx / bexp(|x|) = bexp(INF)?
49 je .not_finite / if so, x is not finite
50 andl $0xffff,%eax / eax <-- sign&bexp(x)
51 cmpl $0xc006,%eax / x <= -128?
52 jae 1f / if so, simply return -1
53 cmpl $0x400d,%ecx / |x| < 16384 = 2^14?
|
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 */
24 /*
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 .file "expm1l.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(expm1l,function)
33
34 .data
35 .align 16
36 ln2_hi: .4byte 0xd1d00000, 0xb17217f7, 0x3ffe, 0x0
37 ln2_lo: .4byte 0x4c67fc0d, 0x8654361c, 0xbfce, 0x0
38
39 ENTRY(expm1l)
40 movl 16(%rsp),%ecx / cx <--sign&bexp(x)
41 movl %ecx,%eax / ax <--sign&bexp(x)
42 andl $0x7fff,%ecx / ecx <-- zero_xtnd(bexp(x))
43 cmpl $0x3ffe,%ecx / Is |x| < ln(2)?
44 jb .shortcut / If so, take a shortcut.
45 je .check_tail / |x| may be only slightly < ln(2)
46 .general_case: / Here, |x| > ln(2) or x is NaN
47 cmpl $0x7fff,%ecx / bexp(|x|) = bexp(INF)?
48 je .not_finite / if so, x is not finite
49 andl $0xffff,%eax / eax <-- sign&bexp(x)
50 cmpl $0xc006,%eax / x <= -128?
51 jae 1f / if so, simply return -1
52 cmpl $0x400d,%ecx / |x| < 16384 = 2^14?
|