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