]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't redefine ROUNDING_TESTS_* in math/test-*-vlen*.h.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 22 Aug 2018 15:22:06 +0000 (15:22 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 22 Aug 2018 15:22:06 +0000 (15:22 +0000)
This patch completes the move of ROUNDING_TESTS_* macros to typo-proof
conventions by stopping redefining them in test-*-vlen*.h.  Instead,
libm-test-driver.c is made to check TEST_MATHVEC when setting
non-to-nearest rounding modes.

Tested for x86_64.

* math/test-double-vlen2.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Remove.
* math/test-double-vlen4.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Remove.
* math/test-double-vlen8.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Remove.
* math/test-float-vlen16.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Remove.
* math/test-float-vlen4.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Remove.
* math/test-float-vlen8.h: Don't include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Remove.
* math/libm-test-driver.c (IF_ROUND_INIT_FE_DOWNWARD): Check
!TEST_MATHVEC here.
(IF_ROUND_INIT_FE_TOWARDZERO): Likewise.
(IF_ROUND_INIT_FE_UPWARD): Likewise.

ChangeLog
math/libm-test-driver.c
math/test-double-vlen2.h
math/test-double-vlen4.h
math/test-double-vlen8.h
math/test-float-vlen16.h
math/test-float-vlen4.h
math/test-float-vlen8.h

index 0f435dcae4128b691f5f0644b454169dacfb9888..923f1f1d13a8c8f6e8a1bf522ffc689ceb9f65a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
 2018-08-22  Joseph Myers  <joseph@codesourcery.com>
 
+       * math/test-double-vlen2.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_double): Remove.
+       * math/test-double-vlen4.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_double): Remove.
+       * math/test-double-vlen8.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_double): Remove.
+       * math/test-float-vlen16.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_float): Remove.
+       * math/test-float-vlen4.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_float): Remove.
+       * math/test-float-vlen8.h: Don't include <math-tests-rounding.h>.
+       (ROUNDING_TESTS_float): Remove.
+       * math/libm-test-driver.c (IF_ROUND_INIT_FE_DOWNWARD): Check
+       !TEST_MATHVEC here.
+       (IF_ROUND_INIT_FE_TOWARDZERO): Likewise.
+       (IF_ROUND_INIT_FE_UPWARD): Likewise.
+
        * sysdeps/generic/math-tests-rounding.h: New file.
        * sysdeps/generic/math-tests.h: Include <math-tests-rounding.h>.
        (ROUNDING_TESTS_float): Do not define here.
index 2bbfdef242eada073933bb24d3684fd41a2e21a8..665274d1c51668d73252baced388e325d5b9a8a4 100644 (file)
@@ -389,6 +389,7 @@ struct test_Ff_b1_data
 #define IF_ROUND_INIT_FE_DOWNWARD              \
   int save_round_mode = fegetround ();         \
   if (ROUNDING_TESTS (FLOAT, FE_DOWNWARD)      \
+      && !TEST_MATHVEC                         \
       && fesetround (FE_DOWNWARD) == 0)
 #define IF_ROUND_INIT_FE_TONEAREST             \
   int save_round_mode = fegetround ();         \
@@ -397,10 +398,12 @@ struct test_Ff_b1_data
 #define IF_ROUND_INIT_FE_TOWARDZERO            \
   int save_round_mode = fegetround ();         \
   if (ROUNDING_TESTS (FLOAT, FE_TOWARDZERO)    \
+      && !TEST_MATHVEC                         \
       && fesetround (FE_TOWARDZERO) == 0)
 #define IF_ROUND_INIT_FE_UPWARD                        \
   int save_round_mode = fegetround ();         \
   if (ROUNDING_TESTS (FLOAT, FE_UPWARD)                \
+      && !TEST_MATHVEC                         \
       && fesetround (FE_UPWARD) == 0)
 #define ROUND_RESTORE_ /* Empty.  */
 #define ROUND_RESTORE_FE_DOWNWARD              \
index 12f37bab8520b1f78d53c1c97ae2f9340d49fc13..6c39e6da5f9fc200a4dcc54b0b2efa4f768453fa 100644 (file)
 #include "test-double.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_double
-#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen2
 #define VEC_LEN 2
index a28fef367cb2476e5042761de5648374e81e4939..3193bc09152e8a87a3f0478e67c4ec90ed464b9a 100644 (file)
 #include "test-double.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_double
-#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen4
 #define VEC_LEN 4
index 93e4daba2ad023c6d02ee834b197b1974d28ea5e..d769da9903221223afdbe7a92c0f77548dd0749b 100644 (file)
 #include "test-double.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_double
-#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen8
 #define VEC_LEN 8
index 3cdd97dabfbf688b138ae27a87ca3bca9bd2e686..a9353e3d6d6c84200e0a0e4dd35123e45af05091 100644 (file)
 #include "test-float.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_float
-#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen16
 #define VEC_LEN 16
index 76374b98fe4f95d555d0b4ec3abdd9bb24f0214f..cd01d1070e0b3d849bce7d430f862f5c0c12b3cf 100644 (file)
 #include "test-float.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_float
-#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen4
 #define VEC_LEN 4
index b44d00e0ac684e4722f47f2a788225941794c055..15527811083c8eac70aa8c4bda774cdd73fcb38d 100644 (file)
 #include "test-float.h"
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
-#include <math-tests-rounding.h>
-
-#undef ROUNDING_TESTS_float
-#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen8
 #define VEC_LEN 8