1 /* $NetBSD: ieeefp.h,v 1.8 2015/12/25 06:03:06 christos Exp $ */ 2 3 /* 4 * Written by J.T. Conklin, Apr 6, 1995 5 * Modified by Jason R. Thorpe, June 22, 2003 6 * Public domain. 7 */ 8 9 #ifndef _M68K_IEEEFP_H_ 10 #define _M68K_IEEEFP_H_ 11 12 #include <sys/featuretest.h> 13 14 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) 15 16 #include <m68k/fenv.h> 17 18 #if !defined(_ISOC99_SOURCE) 19 20 typedef int fp_except; 21 22 #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ 23 #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ 24 #define FP_X_UFL FE_UNDERFLOW /* underflow exception */ 25 #define FP_X_OFL FE_OVERFLOW /* overflow exception */ 26 #define FP_X_INV FE_INVALID /* invalid operation exception */ 27 28 typedef enum { 29 FP_RN=FE_TONEAREST, /* round to nearest representable number */ 30 FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */ 31 FP_RM=FE_DOWNWARD, /* round toward negative infinity */ 32 FP_RP=FE_UPWARD /* round toward positive infinity */ 33 } fp_rnd; 34 35 typedef enum { 36 FP_PE=0, /* extended-precision (64-bit) */ 37 FP_PS=1, /* single-precision (24-bit) */ 38 FP_PD=2 /* double-precision (53-bit) */ 39 } fp_prec; 40 41 #endif /* !_ISOC99_SOURCE */ 42 43 #define __HAVE_FP_PREC 44 45 #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */ 46 47 #endif /* _M68K_IEEEFP_H_ */ 48