/* $NetBSD: ieeefp.h,v 1.1 2001/01/10 19:02:06 bjh21 Exp $ */1/*-2* Based on ieeefp.h written by J.T. Conklin, Apr 28, 19953* Public domain.4*/56#ifndef _MACHINE_IEEEFP_H_7#define _MACHINE_IEEEFP_H_89/* Deprecated historical FPU control interface */1011/* FP exception codes */12#define FP_EXCEPT_INV 013#define FP_EXCEPT_DZ 114#define FP_EXCEPT_OFL 215#define FP_EXCEPT_UFL 316#define FP_EXCEPT_IMP 41718/* Exception type (used by fpsetmask() et al.) */1920typedef int fp_except;2122/* Bit defines for fp_except */2324#define FP_X_INV (1 << FP_EXCEPT_INV) /* invalid operation exception */25#define FP_X_DZ (1 << FP_EXCEPT_DZ) /* divide-by-zero exception */26#define FP_X_OFL (1 << FP_EXCEPT_OFL) /* overflow exception */27#define FP_X_UFL (1 << FP_EXCEPT_UFL) /* underflow exception */28#define FP_X_IMP (1 << FP_EXCEPT_IMP) /* imprecise (loss of precision; "inexact") */2930/* Rounding modes */3132typedef enum {33FP_RN=0, /* round to nearest representable number */34FP_RP=1, /* round toward positive infinity */35FP_RM=2, /* round toward negative infinity */36FP_RZ=3 /* round to zero (truncate) */37} fp_rnd_t;3839/*40* FP precision modes41*/42typedef enum {43FP_PS=0, /* 24 bit (single-precision) */44FP_PRS, /* reserved */45FP_PD, /* 53 bit (double-precision) */46FP_PE /* 64 bit (extended-precision) */47} fp_prec_t;4849#define fp_except_t int5051#endif /* _MACHINE_IEEEFP_H_ */525354