Home | History | Annotate | Line # | Download | only in include
ieeefp.h revision 1.2.16.1.2.1
      1 /* $NetBSD: ieeefp.h,v 1.2.16.1.2.1 1999/06/21 00:46:09 thorpej Exp $ */
      2 
      3 /*
      4  * Written by J.T. Conklin, Apr 28, 1995
      5  * Public domain.
      6  */
      7 
      8 #ifndef _ALPHA_IEEEFP_H_
      9 #define _ALPHA_IEEEFP_H_
     10 
     11 typedef int fp_except;
     12 #define	FP_X_INV	0x01	/* invalid operation exception */
     13 #define	FP_X_DZ		0x02	/* divide-by-zero exception */
     14 #define	FP_X_OFL	0x04	/* overflow exception */
     15 #define	FP_X_UFL	0x08	/* underflow exception */
     16 #define	FP_X_IMP	0x10	/* imprecise (loss of precision; "inexact") */
     17 #define	FP_X_IOV	0x20    /* integer overflow XXX? */
     18 
     19 typedef enum {
     20     FP_RZ=0,			/* round to zero (truncate) */
     21     FP_RM=1,			/* round toward negative infinity */
     22     FP_RN=2,			/* round to nearest representable number */
     23     FP_RP=3			/* round toward positive infinity */
     24 } fp_rnd;
     25 
     26 #ifdef _KERNEL
     27 #define	FPCR_SUM	(1UL << 63)
     28 #define	FPCR_INED	(1UL << 62)
     29 #define	FPCR_UNFD	(1UL << 61)
     30 #define	FPCR_UNDZ	(1UL << 60)
     31 #define	FPCR_DYN(rm)	((unsigned long)(rm) << 58)
     32 #define	FPCR_IOV	(1UL << 57)
     33 #define	FPCR_INE	(1UL << 56)
     34 #define	FPCR_UNF	(1UL << 55)
     35 #define	FPCR_OVF	(1UL << 54)
     36 #define	FPCR_DZE	(1UL << 53)
     37 #define	FPCR_INV	(1UL << 52)
     38 #define	FPCR_OVFD	(1UL << 51)
     39 #define	FPCR_DZED	(1UL << 50)
     40 #define	FPCR_INVD	(1UL << 49)
     41 #define	FPCR_DNZ	(1UL << 48)
     42 #define	FPCR_DNOD	(1UL << 47)
     43 #endif
     44 
     45 #endif /* _ALPHA_IEEEFP_H_ */
     46