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 "expm1f.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(expm1f,function)
33 #include "libm_synonyms.h"
34
35 .data
36 .align 4
37 .mhundred: .float -100.0
38
39 ENTRY(expm1f)
40 movl 4(%esp),%ecx / ecx <-- x
41 andl $0x7fffffff,%ecx / ecx <-- |x|
42 cmpl $0x3f317217,%ecx / Is |x| < ln(2)?
43 jbe .shortcut / If so, take a shortcut.
44 cmpl $0x7f800000,%ecx / |x| >= INF?
45 jae .not_finite / if so, x is not finite
46 flds 4(%esp) / push x
47
48 subl $8,%esp / save RP and set round-to-64-bits
49 fstcw (%esp)
50 movw (%esp),%ax
51 movw %ax,4(%esp)
52 orw $0x0300,%ax
53 movw %ax,(%esp)
|
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 "expm1f.s"
30
31 #include "libm.h"
32 LIBM_ANSI_PRAGMA_WEAK(expm1f,function)
33
34 .data
35 .align 4
36 .mhundred: .float -100.0
37
38 ENTRY(expm1f)
39 movl 4(%esp),%ecx / ecx <-- x
40 andl $0x7fffffff,%ecx / ecx <-- |x|
41 cmpl $0x3f317217,%ecx / Is |x| < ln(2)?
42 jbe .shortcut / If so, take a shortcut.
43 cmpl $0x7f800000,%ecx / |x| >= INF?
44 jae .not_finite / if so, x is not finite
45 flds 4(%esp) / push x
46
47 subl $8,%esp / save RP and set round-to-64-bits
48 fstcw (%esp)
49 movw (%esp),%ax
50 movw %ax,4(%esp)
51 orw $0x0300,%ax
52 movw %ax,(%esp)
|