]>
Commit | Line | Data |
---|---|---|
1bbb83b5 HL |
1 | /* $NetBSD: fenv.h,v 1.2 2014/01/29 00:22:09 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_FENV_H_\r | |
9 | #define _AARCH64_FENV_H_\r | |
10 | \r | |
11 | /* AArch64 split FPSCR into two registers FPCR and FPSR */\r | |
12 | typedef struct {\r | |
13 | unsigned int __fpcr;\r | |
14 | unsigned int __fpsr;\r | |
15 | } fenv_t;\r | |
16 | typedef int fexcept_t;\r | |
17 | \r | |
18 | #define FE_INVALID 0x01 /* invalid operation exception */\r | |
19 | #define FE_DIVBYZERO 0x02 /* divide-by-zero exception */\r | |
20 | #define FE_OVERFLOW 0x04 /* overflow exception */\r | |
21 | #define FE_UNDERFLOW 0x08 /* underflow exception */\r | |
22 | #define FE_INEXACT 0x10 /* imprecise (loss of precision; "inexact") */\r | |
23 | \r | |
24 | #define FE_ALL_EXCEPT 0x1f\r | |
25 | \r | |
26 | #define FE_TONEAREST 0 /* round to nearest representable number */\r | |
27 | #define FE_UPWARD 1 /* round toward positive infinity */\r | |
28 | #define FE_DOWNWARD 2 /* round toward negative infinity */\r | |
29 | #define FE_TOWARDZERO 3 /* round to zero (truncate) */\r | |
30 | \r | |
31 | __BEGIN_DECLS\r | |
32 | \r | |
33 | /* Default floating-point environment */\r | |
34 | extern const fenv_t __fe_dfl_env;\r | |
35 | #define FE_DFL_ENV (&__fe_dfl_env)\r | |
36 | \r | |
37 | __END_DECLS\r | |
38 | \r | |
39 | #endif /* _AARCH64_FENV_H_ */\r |