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 2006 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 4
37 ln2_hi: .long 0xd1d00000, 0xb17217f7, 0x00003ffe
38 ln2_lo: .long 0x4c67fc0d, 0x8654361c, 0x0000bfce
39
40 ENTRY(expm1l)
41 movl 12(%esp),%ecx / cx <--sign&bexp(x)
42 movl %ecx,%eax / ax <--sign&bexp(x)
43 andl $0x00007fff,%ecx / ecx <-- zero_xtnd(bexp(x))
44 cmpl $0x00003ffe,%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 cmpl $0x00007fff,%ecx / bexp(|x|) = bexp(INF)?
48 je .not_finite / if so, x is not finite
49 andl $0x0000ffff,%eax / eax <-- sign&bexp(x)
50 cmpl $0x0000c006,%eax / x <= -128?
51 jae 1f / if so, simply return -1
52 cmpl $0x0000400d,%ecx / |x| < 16384 = 2^14?
53 jb .finite_non_special / if so, proceed with argument reduction
|
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 2006 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 4
36 ln2_hi: .long 0xd1d00000, 0xb17217f7, 0x00003ffe
37 ln2_lo: .long 0x4c67fc0d, 0x8654361c, 0x0000bfce
38
39 ENTRY(expm1l)
40 movl 12(%esp),%ecx / cx <--sign&bexp(x)
41 movl %ecx,%eax / ax <--sign&bexp(x)
42 andl $0x00007fff,%ecx / ecx <-- zero_xtnd(bexp(x))
43 cmpl $0x00003ffe,%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 cmpl $0x00007fff,%ecx / bexp(|x|) = bexp(INF)?
47 je .not_finite / if so, x is not finite
48 andl $0x0000ffff,%eax / eax <-- sign&bexp(x)
49 cmpl $0x0000c006,%eax / x <= -128?
50 jae 1f / if so, simply return -1
51 cmpl $0x0000400d,%ecx / |x| < 16384 = 2^14?
52 jb .finite_non_special / if so, proceed with argument reduction
|