10 * See the License for the specific language governing permissions
11 * and limitations under the License.
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 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #pragma weak isinfl = __isinfl
31 #pragma weak isnormall = __isnormall
32 #pragma weak issubnormall = __issubnormall
33 #pragma weak iszerol = __iszerol
34 #pragma weak signbitl = __signbitl
35
36 #include "libm.h"
37
38 #if defined(__sparc)
39 int
40 isinfl(long double x) {
41 int *px = (int *) &x;
42 return ((px[0] & ~0x80000000) == 0x7fff0000 && px[1] == 0 &&
43 px[2] == 0 && px[3] == 0);
44 }
45
46 int
47 isnormall(long double x) {
48 int *px = (int *) &x;
49 return ((unsigned) ((px[0] & 0x7fff0000) - 0x10000) < 0x7ffe0000);
50 }
51
52 int
53 issubnormall(long double x) {
54 int *px = (int *) &x;
55 px[0] &= ~0x80000000;
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
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 /*
23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25 /*
26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 #include "libm.h"
31
32 #if defined(__sparc)
33 int
34 isinfl(long double x) {
35 int *px = (int *) &x;
36 return ((px[0] & ~0x80000000) == 0x7fff0000 && px[1] == 0 &&
37 px[2] == 0 && px[3] == 0);
38 }
39
40 int
41 isnormall(long double x) {
42 int *px = (int *) &x;
43 return ((unsigned) ((px[0] & 0x7fff0000) - 0x10000) < 0x7ffe0000);
44 }
45
46 int
47 issubnormall(long double x) {
48 int *px = (int *) &x;
49 px[0] &= ~0x80000000;
|