Print this page
5261 libm should stop using synonyms.h
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libm/i386/src/__reduction.s
+++ new/usr/src/lib/libm/i386/src/__reduction.s
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 23 */
24 24 /*
25 25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 28
29 29 .file "__reduction.s"
30 30
31 31 /
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
32 32 / After argument reduction which returns n:
33 33 / n mod 4 sin(x) cos(x) tan(x)
34 34 / ----------------------------------------------------------
35 35 / 0 S C S/C
36 36 / 1 C -S -C/S
37 37 / 2 -S -C S/C
38 38 / 3 -C S -C/S
39 39 / ----------------------------------------------------------
40 40
41 41 #include "libm.h"
42 -#include "libm_synonyms.h"
43 42 #include "libm_protos.h"
44 43 #undef fabs
45 44
46 45 ENTRY(__reduction)
47 46 #ifndef PIC
48 47 movl 12(%esp),%eax / load the high part of arg
49 48 #else
50 49 movl 16(%esp),%eax / load the high part of arg
51 50 #endif
52 51 andl $0x7fffffff,%eax / clear sign
53 52 cmpl $0x3fe921fb,%eax / Is |x| < pi/4 (= 0x3fe921fb54...) ?
54 53 jbe .L0
55 54 cmpl $0x7ff00000,%eax / Is arg a NaN or an Inf ?
56 55 jb .L1
57 56 .L0:
58 57 #ifndef PIC
59 58 fldl 8(%esp) / push arg
60 59 #else
61 60 fldl 12(%esp) / push arg
62 61 #endif
63 62 fwait
64 63 movl $0,%eax / set n = 0
65 64 ret
66 65 .L1:
67 66 pushl %ebp
68 67 movl %esp,%ebp
69 68 subl $16,%esp
70 69 PIC_SETUP(1)
71 70 leal -16(%ebp),%eax / address of y[0]
72 71 pushl %eax
73 72 #ifndef PIC
74 73 pushl 16(%ebp)
75 74 pushl 12(%ebp)
76 75 #else
77 76 pushl 20(%ebp)
78 77 pushl 16(%ebp)
79 78 #endif
80 79 call PIC_F(__rem_pio2) / call __rem_pio2(x,&y)
81 80 fldl -8(%ebp) / y[1]
82 81 fldl -16(%ebp) / y[0], y[1]
83 82 faddp %st,%st(1) / y[0]+y[1] round-to-extended
84 83 addl $28,%esp / 16+4*3
85 84 andl $3,%eax
86 85 PIC_WRAPUP
87 86 leave
88 87 ret
89 88 .align 4
90 89 SET_SIZE(__reduction)
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX