6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / uts / common / sys / ieeefp.h
blob9b47e6ce47090ec4b70c9df5081f1bc0081eb5fb
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_IEEEFP_H
28 #define _SYS_IEEEFP_H
30 #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.0 1.6 */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
37 * Sun types for IEEE floating point.
40 #if defined(__sparc)
42 enum fp_direction_type { /* rounding direction */
43 fp_nearest = 0,
44 fp_tozero = 1,
45 fp_positive = 2,
46 fp_negative = 3
49 enum fp_precision_type { /* extended rounding precision */
50 fp_extended = 0,
51 fp_single = 1,
52 fp_double = 2,
53 fp_precision_3 = 3
56 enum fp_exception_type { /* exceptions according to bit number */
57 fp_inexact = 0,
58 fp_division = 1,
59 fp_underflow = 2,
60 fp_overflow = 3,
61 fp_invalid = 4
64 enum fp_trap_enable_type { /* trap enable bits according to bit number */
65 fp_trap_inexact = 0,
66 fp_trap_division = 1,
67 fp_trap_underflow = 2,
68 fp_trap_overflow = 3,
69 fp_trap_invalid = 4
72 #elif defined(__i386) || defined(__amd64)
74 enum fp_direction_type { /* rounding direction */
75 fp_nearest = 0,
76 fp_negative = 1,
77 fp_positive = 2,
78 fp_tozero = 3
81 enum fp_precision_type { /* extended rounding precision */
82 fp_single = 0,
83 fp_precision_3 = 1,
84 fp_double = 2,
85 fp_extended = 3
88 enum fp_exception_type { /* exceptions according to bit number */
89 fp_invalid = 0,
90 fp_denormalized = 1,
91 fp_division = 2,
92 fp_overflow = 3,
93 fp_underflow = 4,
94 fp_inexact = 5
97 enum fp_trap_enable_type { /* trap enable bits according to bit number */
98 fp_trap_invalid = 0,
99 fp_trap_denormalized = 1,
100 fp_trap_division = 2,
101 fp_trap_overflow = 3,
102 fp_trap_underflow = 4,
103 fp_trap_inexact = 5
106 #endif /* __i386 || __amd64 */
108 enum fp_class_type { /* floating-point classes */
109 fp_zero = 0,
110 fp_subnormal = 1,
111 fp_normal = 2,
112 fp_infinity = 3,
113 fp_quiet = 4,
114 fp_signaling = 5
117 #ifdef __cplusplus
119 #endif
121 #endif /* _SYS_IEEEFP_H */