1 /* 2 * CDDL HEADER START 3 * 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. 8 * 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. 13 * 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] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_IEEEFP_H 28 #define _SYS_IEEEFP_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.0 1.6 */ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* 37 * Sun types for IEEE floating point. 38 */ 39 40 #if defined(__sparc) 41 42 enum fp_direction_type { /* rounding direction */ 43 fp_nearest = 0, 44 fp_tozero = 1, 45 fp_positive = 2, 46 fp_negative = 3 47 }; 48 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 54 }; 55 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 62 }; 63 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 70 }; 71 72 #elif defined(__i386) || defined(__amd64) 73 74 enum fp_direction_type { /* rounding direction */ 75 fp_nearest = 0, 76 fp_negative = 1, 77 fp_positive = 2, 78 fp_tozero = 3 79 }; 80 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 86 }; 87 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 95 }; 96 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 104 }; 105 106 #endif /* __i386 || __amd64 */ 107 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 115 }; 116 117 #ifdef __cplusplus 118 } 119 #endif 120 121 #endif /* _SYS_IEEEFP_H */ 122