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 "exp10f.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(exp10f,function)
33 #include "libm_synonyms.h"
34
35 ENTRY(exp10f)
36 movl 4(%esp),%ecx / ecx <-- x
37 andl $0x7fffffff,%ecx / ecx <-- |x|
38 cmpl $0x3e9a209a,%ecx / Is |x| < log10(2)?
39 jbe .shortcut / If so, take a shortcut.
40 cmpl $0x7f800000,%ecx / |x| >= INF?
41 jae .not_finite / if so, x is not finite
42 flds 4(%esp) / push x (=arg)
43
44 subl $8,%esp / save RP and set round-to-64-bits
45 fstcw (%esp)
46 movw (%esp),%ax
47 movw %ax,4(%esp)
48 orw $0x0300,%ax
49 movw %ax,(%esp)
50 fldcw (%esp)
51
52 fldl2t / push log2(10) }NOT for xtndd_dbl
53 fmulp %st,%st(1) / z = x*log2(10) }NOT for xtndd_dbl
|
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 "exp10f.s"
30
31 #include "libm.h"
32
33 ENTRY(exp10f)
34 movl 4(%esp),%ecx / ecx <-- x
35 andl $0x7fffffff,%ecx / ecx <-- |x|
36 cmpl $0x3e9a209a,%ecx / Is |x| < log10(2)?
37 jbe .shortcut / If so, take a shortcut.
38 cmpl $0x7f800000,%ecx / |x| >= INF?
39 jae .not_finite / if so, x is not finite
40 flds 4(%esp) / push x (=arg)
41
42 subl $8,%esp / save RP and set round-to-64-bits
43 fstcw (%esp)
44 movw (%esp),%ax
45 movw %ax,4(%esp)
46 orw $0x0300,%ax
47 movw %ax,(%esp)
48 fldcw (%esp)
49
50 fldl2t / push log2(10) }NOT for xtndd_dbl
51 fmulp %st,%st(1) / z = x*log2(10) }NOT for xtndd_dbl
|