]>
Commit | Line | Data |
---|---|---|
1bbb83b5 HL |
1 | /* $NetBSD: ieeefp.h,v 1.3 2013/04/23 05:42:23 matt Exp $ */\r |
2 | \r | |
3 | /*\r | |
4 | * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995\r | |
5 | * Public domain.\r | |
6 | */\r | |
7 | \r | |
8 | #ifndef _AARCH64_IEEEFP_H_\r | |
9 | #define _AARCH64_IEEEFP_H_\r | |
10 | \r | |
11 | #include <LibConfig.h>\r | |
12 | #include <sys/featuretest.h>\r | |
13 | \r | |
14 | #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)\r | |
15 | \r | |
16 | #include <machine/fenv.h>\r | |
17 | \r | |
18 | #if !defined(_ISOC99_SOURCE)\r | |
19 | \r | |
20 | /* Exception type (used by fpsetmask() et al.) */\r | |
21 | \r | |
22 | typedef int fp_except;\r | |
23 | \r | |
24 | /* Bit defines for fp_except */\r | |
25 | \r | |
26 | #define FP_X_INV FE_INVALID /* invalid operation exception */\r | |
27 | #define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */\r | |
28 | #define FP_X_OFL FE_OVERFLOW /* overflow exception */\r | |
29 | #define FP_X_UFL FE_UNDERFLOW /* underflow exception */\r | |
30 | #define FP_X_IMP FE_INEXACT /* imprecise (prec. loss; "inexact") */\r | |
31 | \r | |
32 | /* Rounding modes */\r | |
33 | \r | |
34 | typedef enum {\r | |
35 | FP_RN=FE_TONEAREST, /* round to nearest representable number */\r | |
36 | FP_RP=FE_UPWARD, /* round toward positive infinity */\r | |
37 | FP_RM=FE_DOWNWARD, /* round toward negative infinity */\r | |
38 | FP_RZ=FE_TOWARDZERO /* round to zero (truncate) */\r | |
39 | } fp_rnd;\r | |
40 | \r | |
41 | #endif /* !_ISOC99_SOURCE */\r | |
42 | \r | |
43 | #endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */\r | |
44 | \r | |
45 | #endif /* _AARCH64_IEEEFP_H_ */\r |