xref: /openbsd-src/sys/arch/sh/include/ieeefp.h (revision 99e2fc74067054571bc81cf0a0c95f6324530bd2)
1*99e2fc74Smartynas /*	$OpenBSD: ieeefp.h,v 1.4 2011/04/24 16:57:11 martynas Exp $	*/
295c7671fSmiod /*	$NetBSD: ieeefp.h,v 1.3 2002/04/28 17:10:34 uch Exp $ */
395c7671fSmiod 
495c7671fSmiod /*
595c7671fSmiod  * Written by J.T. Conklin, Apr 6, 1995
695c7671fSmiod  * Public domain.
795c7671fSmiod  */
895c7671fSmiod 
995c7671fSmiod #ifndef _SH_IEEEFP_H_
1095c7671fSmiod #define	_SH_IEEEFP_H_
1195c7671fSmiod 
1295c7671fSmiod typedef int fp_except;
13da7567ebSmiod #define	FP_X_INV	0x10	/* invalid operation exception */
14da7567ebSmiod #define	FP_X_DZ		0x08	/* divide-by-zero exception */
15da7567ebSmiod #define	FP_X_OFL	0x04	/* overflow exception */
16da7567ebSmiod #define	FP_X_UFL	0x02	/* underflow exception */
17da7567ebSmiod #define	FP_X_IMP	0x01	/* imprecise (loss of precision) */
1895c7671fSmiod 
1995c7671fSmiod typedef enum {
2095c7671fSmiod 	FP_RN=0,		/* round to nearest representable number */
2146e82cd9Sdrahn 	FP_RZ=1,		/* round to zero (truncate) */
22da7567ebSmiod 	/* the following two are not implemented on SH4{,A} */
2395c7671fSmiod 	FP_RP=2,		/* round toward positive infinity */
24da7567ebSmiod 	FP_RM=3			/* round toward negative infinity */
2595c7671fSmiod } fp_rnd;
2695c7671fSmiod 
2795c7671fSmiod #endif /* !_SH_IEEEFP_H_ */
28