xref: /openbsd-src/sys/arch/powerpc/include/ieeefp.h (revision ac196c5b03b4bb508a94ce14ea1f8d952b453f9a)
1*ac196c5bSdrahn /*	$OpenBSD: ieeefp.h,v 1.7 2004/05/03 16:53:24 drahn Exp $	*/
2*ac196c5bSdrahn /*	$NetBSD: ieeefp.h,v 1.2 1999/07/07 01:52:26 danw Exp $	*/
3e5e8d547Srahnds /*
4e5e8d547Srahnds  * Written by J.T. Conklin, Apr 6, 1995
5e5e8d547Srahnds  * Public domain.
6e5e8d547Srahnds  */
7e5e8d547Srahnds 
852c13d20Sdrahn #ifndef _POWERPC_IEEEFP_H_
952c13d20Sdrahn #define _POWERPC_IEEEFP_H_
10e5e8d547Srahnds 
11e5e8d547Srahnds typedef int fp_except;
12e5e8d547Srahnds #define FP_X_IMP	0x01	/* imprecise (loss of precision) */
13e5e8d547Srahnds #define FP_X_DZ		0x02	/* divide-by-zero exception */
14e5e8d547Srahnds #define FP_X_UFL	0x04	/* underflow exception */
15e5e8d547Srahnds #define FP_X_OFL	0x08	/* overflow exception */
16e5e8d547Srahnds #define FP_X_INV	0x10	/* invalid operation exception */
17e5e8d547Srahnds 
18e5e8d547Srahnds typedef enum {
19e5e8d547Srahnds     FP_RN=0,			/* round to nearest representable number */
20e5e8d547Srahnds     FP_RZ=1,			/* round to zero (truncate) */
21*ac196c5bSdrahn     FP_RP=2,			/* round toward positive infinity */
22*ac196c5bSdrahn     FP_RM=3			/* round toward negative infinity */
23e5e8d547Srahnds } fp_rnd;
24e5e8d547Srahnds 
2552c13d20Sdrahn #endif /* _POWERPC_IEEEFP_H_ */
26