mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
or1k: Only define fpu rouding and exceptions with hard-float
This test failure: math/test-fenv If rounding mode and exception macros are defined then the fenv tests run and always fail. This patch adds an ifdef using the __or1k_hard_float__ macro provided by gcc to avoid defining these fenv macros when they cnnot be used. This is similar to what is done in csky. Note, I will post the or1k hard-float support soon. So, I prefer to leave the hard-float bits here for now.
This commit is contained in:
parent
2e982a3937
commit
df7e29e2a4
1 changed files with 19 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
|
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __or1k_hard_float__
|
||||||
/* Define bits representing exceptions in the FPCSR status word. */
|
/* Define bits representing exceptions in the FPCSR status word. */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -51,6 +52,24 @@ enum
|
||||||
#define FE_UPWARD (0x2 << 1)
|
#define FE_UPWARD (0x2 << 1)
|
||||||
#define FE_DOWNWARD (0x3 << 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. */
|
/* Type representing exception flags. */
|
||||||
typedef unsigned int fexcept_t;
|
typedef unsigned int fexcept_t;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue