xref: /netbsd-src/sys/arch/sparc/include/ieeefp.h (revision 6802e8e0b8f45f10a5bcd4f891bef2aa1464ddd7)
1 /*	$NetBSD: ieeefp.h,v 1.10 2017/01/14 16:07:53 christos Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin, Apr 6, 1995
5  * Public domain.
6  */
7 
8 #ifndef _SPARC_IEEEFP_H_
9 #define _SPARC_IEEEFP_H_
10 
11 #include <sys/featuretest.h>
12 #include <machine/fenv.h>
13 
14 #if defined(_NETBSD_SOURCE) && !defined(_ISOC99_SOURCE)
15 
16 typedef unsigned int fp_except;
17 #define FP_X_IMP	0x01		/* imprecise (loss of precision) */
18 #define FP_X_DZ		0x02		/* divide-by-zero exception */
19 #define FP_X_UFL	0x04		/* underflow exception */
20 #define FP_X_OFL	0x08		/* overflow exception */
21 #define FP_X_INV	0x10		/* invalid operation exception */
22 
23 typedef enum {
24     FP_RN=0,			/* round to nearest representable number */
25     FP_RZ=1,			/* round to zero (truncate) */
26     FP_RP=2,			/* round toward positive infinity */
27     FP_RM=3			/* round toward negative infinity */
28 } fp_rnd;
29 
30 #endif /* _NETBSD_SOURCE || !_ISOC99_SOURCE */
31 
32 #endif /* _SPARC_IEEEFP_H_ */
33