1/* $OpenBSD: ieeefp.h,v 1.2 2011/03/23 16:54:34 pirofti Exp $ */ 2/* $NetBSD: ieeefp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $ */ 3 4/* 5 * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995 6 * Public domain. 7 */ 8 9#ifndef _ARM_IEEEFP_H_ 10#define _ARM_IEEEFP_H_ 11 12/* FP exception codes */ 13 14#define FP_EXCEPT_INV 0 15#define FP_EXCEPT_DZ 1 16#define FP_EXCEPT_OFL 2 17#define FP_EXCEPT_UFL 3 18#define FP_EXCEPT_IMP 4 19 20/* Exception type (used by fpsetmask() et al.) */ 21 22typedef int fp_except; 23 24/* Bit defines for fp_except */ 25 26#define FP_X_INV (1 << FP_EXCEPT_INV) /* invalid operation exception */ 27#define FP_X_DZ (1 << FP_EXCEPT_DZ) /* divide-by-zero exception */ 28#define FP_X_OFL (1 << FP_EXCEPT_OFL) /* overflow exception */ 29#define FP_X_UFL (1 << FP_EXCEPT_UFL) /* underflow exception */ 30#define FP_X_IMP (1 << FP_EXCEPT_IMP) /* imprecise (loss of precision; "inexact") */ 31 32/* Rounding modes */ 33 34typedef enum { 35 FP_RN=0, /* round to nearest representable number */ 36 FP_RP=1, /* round toward positive infinity */ 37 FP_RM=2, /* round toward negative infinity */ 38 FP_RZ=3 /* round to zero (truncate) */ 39} fp_rnd; 40 41#endif /* _ARM_IEEEFP_H_ */ 42