1*6802e8e0Schristos /* $NetBSD: ieeefp.h,v 1.10 2017/01/14 16:07:53 christos Exp $ */ 2015e898cSperry 38cfef1c8Sjtc /* 48cfef1c8Sjtc * Written by J.T. Conklin, Apr 6, 1995 58cfef1c8Sjtc * Public domain. 68cfef1c8Sjtc */ 78cfef1c8Sjtc 88cfef1c8Sjtc #ifndef _SPARC_IEEEFP_H_ 98cfef1c8Sjtc #define _SPARC_IEEEFP_H_ 108cfef1c8Sjtc 1191d4704cSmatt #include <sys/featuretest.h> 12*6802e8e0Schristos #include <machine/fenv.h> 1391d4704cSmatt 14*6802e8e0Schristos #if defined(_NETBSD_SOURCE) && !defined(_ISOC99_SOURCE) 1591d4704cSmatt 16e86314f7Schristos typedef unsigned int fp_except; 17e654a4e4Smartin #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ 18e654a4e4Smartin #define FP_X_DZ 0x02 /* divide-by-zero exception */ 19e654a4e4Smartin #define FP_X_UFL 0x04 /* underflow exception */ 20e654a4e4Smartin #define FP_X_OFL 0x08 /* overflow exception */ 21e654a4e4Smartin #define FP_X_INV 0x10 /* invalid operation exception */ 228cfef1c8Sjtc 238cfef1c8Sjtc typedef enum { 24e654a4e4Smartin FP_RN=0, /* round to nearest representable number */ 25e654a4e4Smartin FP_RZ=1, /* round to zero (truncate) */ 26e654a4e4Smartin FP_RP=2, /* round toward positive infinity */ 27e654a4e4Smartin FP_RM=3 /* round toward negative infinity */ 288cfef1c8Sjtc } fp_rnd; 298cfef1c8Sjtc 30*6802e8e0Schristos #endif /* _NETBSD_SOURCE || !_ISOC99_SOURCE */ 3191d4704cSmatt 328cfef1c8Sjtc #endif /* _SPARC_IEEEFP_H_ */ 33