diff options
Diffstat (limited to 'sysdeps/or1k/bits')
-rw-r--r-- | sysdeps/or1k/bits/fenv.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sysdeps/or1k/bits/fenv.h b/sysdeps/or1k/bits/fenv.h index 587039ca03..01267805e6 100644 --- a/sysdeps/or1k/bits/fenv.h +++ b/sysdeps/or1k/bits/fenv.h @@ -21,6 +21,7 @@ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." #endif +#ifdef __or1k_hard_float__ /* Define bits representing exceptions in the FPCSR status word. */ enum { @@ -51,6 +52,24 @@ enum #define FE_UPWARD (0x2 << 1) #define FE_DOWNWARD (0x3 << 1) +#else + +/* In the soft-float case only rounding to nearest is supported, with + no exceptions. */ + +enum + { + __FE_UNDEFINED = -1, + + FE_TONEAREST = +# define FE_TONEAREST 0x0 + FE_TONEAREST + }; + +# define FE_ALL_EXCEPT 0 + +#endif /* __or1k_hard_float__ */ + /* Type representing exception flags. */ typedef unsigned int fexcept_t; |