Print this page
10495 libc should know how many FPU exceptions there are
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/ieeefp.h
+++ new/usr/src/uts/common/sys/ieeefp.h
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, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #ifndef _SYS_IEEEFP_H
28 28 #define _SYS_IEEEFP_H
29 29
30 -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.0 1.6 */
31 -
32 30 #ifdef __cplusplus
33 31 extern "C" {
34 32 #endif
35 33
36 34 /*
37 35 * Sun types for IEEE floating point.
38 36 */
39 37
40 38 #if defined(__sparc)
41 39
42 40 enum fp_direction_type { /* rounding direction */
43 41 fp_nearest = 0,
44 42 fp_tozero = 1,
45 43 fp_positive = 2,
46 44 fp_negative = 3
47 45 };
48 46
49 47 enum fp_precision_type { /* extended rounding precision */
50 48 fp_extended = 0,
51 49 fp_single = 1,
52 50 fp_double = 2,
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
53 51 fp_precision_3 = 3
54 52 };
55 53
56 54 enum fp_exception_type { /* exceptions according to bit number */
57 55 fp_inexact = 0,
58 56 fp_division = 1,
59 57 fp_underflow = 2,
60 58 fp_overflow = 3,
61 59 fp_invalid = 4
62 60 };
61 +#define N_IEEE_EXCEPTION 5 /* Number of floating-point exceptions. */
63 62
64 63 enum fp_trap_enable_type { /* trap enable bits according to bit number */
65 64 fp_trap_inexact = 0,
66 65 fp_trap_division = 1,
67 66 fp_trap_underflow = 2,
68 67 fp_trap_overflow = 3,
69 68 fp_trap_invalid = 4
70 69 };
71 70
72 71 #elif defined(__i386) || defined(__amd64)
73 72
74 73 enum fp_direction_type { /* rounding direction */
75 74 fp_nearest = 0,
76 75 fp_negative = 1,
77 76 fp_positive = 2,
78 77 fp_tozero = 3
79 78 };
80 79
81 80 enum fp_precision_type { /* extended rounding precision */
82 81 fp_single = 0,
83 82 fp_precision_3 = 1,
84 83 fp_double = 2,
85 84 fp_extended = 3
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
86 85 };
87 86
88 87 enum fp_exception_type { /* exceptions according to bit number */
89 88 fp_invalid = 0,
90 89 fp_denormalized = 1,
91 90 fp_division = 2,
92 91 fp_overflow = 3,
93 92 fp_underflow = 4,
94 93 fp_inexact = 5
95 94 };
95 +#define N_IEEE_EXCEPTION 6 /* Number of floating-point exceptions. */
96 96
97 97 enum fp_trap_enable_type { /* trap enable bits according to bit number */
98 98 fp_trap_invalid = 0,
99 99 fp_trap_denormalized = 1,
100 100 fp_trap_division = 2,
101 101 fp_trap_overflow = 3,
102 102 fp_trap_underflow = 4,
103 103 fp_trap_inexact = 5
104 104 };
105 105
106 106 #endif /* __i386 || __amd64 */
107 107
108 108 enum fp_class_type { /* floating-point classes */
109 109 fp_zero = 0,
110 110 fp_subnormal = 1,
111 111 fp_normal = 2,
112 - fp_infinity = 3,
112 + fp_infinity = 3,
113 113 fp_quiet = 4,
114 114 fp_signaling = 5
115 115 };
116 116
117 117 #ifdef __cplusplus
118 118 }
119 119 #endif
120 120
121 121 #endif /* _SYS_IEEEFP_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX