Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115912493
D27202.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27202.diff
View Options
Index: head/lib/msun/tests/fenv_test.c
===================================================================
--- head/lib/msun/tests/fenv_test.c
+++ head/lib/msun/tests/fenv_test.c
@@ -43,13 +43,7 @@
#include <string.h>
#include <unistd.h>
-/*
- * Implementations are permitted to define additional exception flags
- * not specified in the standard, so it is not necessarily true that
- * FE_ALL_EXCEPT == ALL_STD_EXCEPT.
- */
-#define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \
- FE_OVERFLOW | FE_UNDERFLOW)
+#include "test-utils.h"
#define NEXCEPTS (sizeof(std_excepts) / sizeof(std_excepts[0]))
@@ -373,7 +367,13 @@
assert(fegetround() == FE_TONEAREST);
assert(fesetenv(&env2) == 0);
- assert(fetestexcept(FE_ALL_EXCEPT) == excepts);
+
+ /*
+ * Some platforms like powerpc may set extra exception bits. Since
+ * only standard exceptions are tested, mask against ALL_STD_EXCEPT
+ */
+ assert((fetestexcept(FE_ALL_EXCEPT) & ALL_STD_EXCEPT) == excepts);
+
assert(fegetround() == FE_DOWNWARD);
assert(fesetenv(&env1) == 0);
assert(fetestexcept(FE_ALL_EXCEPT) == 0);
Index: head/lib/msun/tests/lrint_test.c
===================================================================
--- head/lib/msun/tests/lrint_test.c
+++ head/lib/msun/tests/lrint_test.c
@@ -41,6 +41,8 @@
#include <ieeefp.h>
#endif
+#include "test-utils.h"
+
/*
* XXX The volatile here is to avoid gcc's bogus constant folding and work
* around the lack of support for the FENV_ACCESS pragma.
@@ -49,7 +51,8 @@
volatile double _d = x; \
assert(feclearexcept(FE_ALL_EXCEPT) == 0); \
assert((func)(_d) == (result) || fetestexcept(FE_INVALID)); \
- assert(fetestexcept(FE_ALL_EXCEPT) == (excepts)); \
+ assert((fetestexcept(FE_ALL_EXCEPT) & ALL_STD_EXCEPT) \
+ == (excepts)); \
} while (0)
#define testall(x, result, excepts) do { \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 8:10 AM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17877201
Default Alt Text
D27202.diff (1 KB)
Attached To
Mode
D27202: msun tests: use standard floating-point exception flags on lrint and fenv tests
Attached
Detach File
Event Timeline
Log In to Comment