12 *
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 "exp10l.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(exp10l,function)
33 #include "libm_synonyms.h"
34
35 .data
36 .align 16
37 lt2_hi: .4byte 0xfbd00000, 0x9a209a84, 0x3ffd, 0x0
38 lt2_lo: .4byte 0x653f4837, 0x8677076a, 0xbfc9, 0x0
39
40 ENTRY(exp10l)
41 movl 16(%rsp),%ecx / cx <--sign&bexp(x)
42 andl $0x7fff,%ecx / ecx <-- zero_xtnd(bexp(x))
43 cmpl $0x3ffd,%ecx / Is |x| < log10(2)?
44 jb .shortcut / If so, take a shortcut.
45 je .check_tail / maybe |x| only slightly < log10(2)
46 .general_case: / Here, |x| > log10(2) or x is NaN
47 cmpl $0x7fff,%ecx / bexp(|x|) = bexp(INF)?
48 je .not_finite / if so, x is not finite
49 cmpl $0x400e,%ecx / |x| < 32768 = 2^15?
50 jb .finite_non_special / if so, proceed with argument reduction
51 fldt 8(%rsp) / x
52 fld1 / 1, x
53 jmp 1f
|
12 *
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 "exp10l.s"
30
31 #include "libm.h"
32
33 .data
34 .align 16
35 lt2_hi: .4byte 0xfbd00000, 0x9a209a84, 0x3ffd, 0x0
36 lt2_lo: .4byte 0x653f4837, 0x8677076a, 0xbfc9, 0x0
37
38 ENTRY(exp10l)
39 movl 16(%rsp),%ecx / cx <--sign&bexp(x)
40 andl $0x7fff,%ecx / ecx <-- zero_xtnd(bexp(x))
41 cmpl $0x3ffd,%ecx / Is |x| < log10(2)?
42 jb .shortcut / If so, take a shortcut.
43 je .check_tail / maybe |x| only slightly < log10(2)
44 .general_case: / Here, |x| > log10(2) or x is NaN
45 cmpl $0x7fff,%ecx / bexp(|x|) = bexp(INF)?
46 je .not_finite / if so, x is not finite
47 cmpl $0x400e,%ecx / |x| < 32768 = 2^15?
48 jb .finite_non_special / if so, proceed with argument reduction
49 fldt 8(%rsp) / x
50 fld1 / 1, x
51 jmp 1f
|