about summary refs log tree commit diff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-10 12:34:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-10 12:34:49 +0000
commit0efa6f8b9906cddf2da36722449c8e30fb698b37 (patch)
tree341c784ccd0a1157c055de93a16715d8c3507fd4 /math/libm-test.inc
parent50b818bf96072fda433f7df4c307639b25e4da57 (diff)
downloadglibc-0efa6f8b9906cddf2da36722449c8e30fb698b37.tar.gz
glibc-0efa6f8b9906cddf2da36722449c8e30fb698b37.tar.xz
glibc-0efa6f8b9906cddf2da36722449c8e30fb698b37.zip
Add rounding mode information to math-tests.h and use it in libm-test.inc.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 6870d96d5b..ed050cb9ed 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -125,6 +125,7 @@
 #include <string.h>
 #include <argp.h>
 #include <tininess.h>
+#include <math-tests.h>
 
 /* Structure for ulp data for a test, a function, or the real or
    imaginary part of a function.  */
@@ -1085,16 +1086,20 @@ struct test_fFF_11_data
 #define IF_ROUND_INIT_	/* Empty.  */
 #define IF_ROUND_INIT_FE_DOWNWARD		\
   int save_round_mode = fegetround ();		\
-  if (fesetround (FE_DOWNWARD) == 0)
+  if (ROUNDING_TESTS (FLOAT, FE_DOWNWARD)	\
+      && fesetround (FE_DOWNWARD) == 0)
 #define IF_ROUND_INIT_FE_TONEAREST		\
   int save_round_mode = fegetround ();		\
-  if (fesetround (FE_TONEAREST) == 0)
+  if (ROUNDING_TESTS (FLOAT, FE_TONEAREST)	\
+      && fesetround (FE_TONEAREST) == 0)
 #define IF_ROUND_INIT_FE_TOWARDZERO		\
   int save_round_mode = fegetround ();		\
-  if (fesetround (FE_TOWARDZERO) == 0)
+  if (ROUNDING_TESTS (FLOAT, FE_TOWARDZERO)	\
+      && fesetround (FE_TOWARDZERO) == 0)
 #define IF_ROUND_INIT_FE_UPWARD			\
   int save_round_mode = fegetround ();		\
-  if (fesetround (FE_UPWARD) == 0)
+  if (ROUNDING_TESTS (FLOAT, FE_UPWARD)		\
+      && fesetround (FE_UPWARD) == 0)
 #define ROUND_RESTORE_	/* Empty.  */
 #define ROUND_RESTORE_FE_DOWNWARD		\
   fesetround (save_round_mode)