public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/lld] Drop nan-pseudo-number.h usage from tests
@ 2021-01-18 21:38 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-01-18 21:38 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8cc1e39a3691a8cba7c6033138531f11d3032385

commit 8cc1e39a3691a8cba7c6033138531f11d3032385
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Mon Jan 4 17:40:04 2021 +0530

    Drop nan-pseudo-number.h usage from tests
    
    Make the tests use TEST_COND_intel96 to decide on whether to build the
    unnormal tests instead of the macro in nan-pseudo-number.h and then
    drop the header inclusion.  This unbreaks test runs on all
    architectures that do not have ldbl-96.
    
    Also drop the HANDLE_PSEUDO_NUMBERS macro since it is not used
    anywhere.

Diff:
---
 math/libm-test-driver.c                     | 5 ++---
 math/libm-test-fpclassify.inc               | 4 ++--
 math/libm-test-isinf.inc                    | 4 ++--
 math/libm-test-isnan.inc                    | 4 ++--
 math/libm-test-issignaling.inc              | 4 ++--
 sysdeps/ieee754/ldbl-96/nan-pseudo-number.h | 4 +---
 sysdeps/x86/fpu/nan-pseudo-number.h         | 1 -
 7 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/math/libm-test-driver.c b/math/libm-test-driver.c
index 87f2793061..f7c0861c39 100644
--- a/math/libm-test-driver.c
+++ b/math/libm-test-driver.c
@@ -19,7 +19,6 @@
 #include "libm-test-support.h"
 
 #include <math-tests-arch.h>
-#include <nan-pseudo-number.h>
 
 /* Flags set by the including file.  */
 const int flag_test_errno = TEST_ERRNO;
@@ -124,7 +123,7 @@ const char qtype_str[] = TYPE_STR;
 #define snan_value_ld	__builtin_nansl ("")
 
 /* For pseudo-normal number tests.  */
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 # include <math_ldbl.h>
 #define pseudo_inf { .parts = { 0x00000000, 0x00000000, 0x7fff }}
 #define pseudo_zero { .parts = { 0x00000000, 0x00000000, 0x0100 }}
@@ -328,7 +327,7 @@ struct test_f_i_data
   } rd, rn, rz, ru;
 };
 /* Used for RUN_TEST_LOOP_f_i_tg_u and RUN_TEST_LOOP_f_b_tg_u.  */
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 struct test_f_i_data_u
 {
   const char *arg_str;
diff --git a/math/libm-test-fpclassify.inc b/math/libm-test-fpclassify.inc
index 39728d0771..c1c7e1ead1 100644
--- a/math/libm-test-fpclassify.inc
+++ b/math/libm-test-fpclassify.inc
@@ -37,7 +37,7 @@ static const struct test_f_i_data fpclassify_test_data[] =
     TEST_f_i (fpclassify, -min_subnorm_value, FP_SUBNORMAL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 static const struct test_f_i_data_u fpclassify_test_data_u[] =
   {
     TEST_f_i (fpclassify, pseudo_zero, FP_NAN, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -52,7 +52,7 @@ static void
 fpclassify_test (void)
 {
   ALL_RM_TEST (fpclassify, 1, fpclassify_test_data, RUN_TEST_LOOP_f_i_tg, END);
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
   ALL_RM_TEST (fpclassify, 1, fpclassify_test_data_u, RUN_TEST_LOOP_f_i_tg_u, END);
 #endif
 }
diff --git a/math/libm-test-isinf.inc b/math/libm-test-isinf.inc
index 38f973ba38..7d4b27a45c 100644
--- a/math/libm-test-isinf.inc
+++ b/math/libm-test-isinf.inc
@@ -37,7 +37,7 @@ static const struct test_f_i_data isinf_test_data[] =
     TEST_f_b (isinf, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 static const struct test_f_i_data_u isinf_test_data_u[] =
   {
     TEST_f_b (isinf, pseudo_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -52,7 +52,7 @@ static void
 isinf_test (void)
 {
   ALL_RM_TEST (isinf, 1, isinf_test_data, RUN_TEST_LOOP_f_b_tg, END);
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
   ALL_RM_TEST (isinf, 1, isinf_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END);
 #endif
 }
diff --git a/math/libm-test-isnan.inc b/math/libm-test-isnan.inc
index 948a3afdec..501bb1856f 100644
--- a/math/libm-test-isnan.inc
+++ b/math/libm-test-isnan.inc
@@ -37,7 +37,7 @@ static const struct test_f_i_data isnan_test_data[] =
     TEST_f_b (isnan, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 static const struct test_f_i_data_u isnan_test_data_u[] =
   {
     TEST_f_b (isnan, pseudo_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -52,7 +52,7 @@ static void
 isnan_test (void)
 {
   ALL_RM_TEST (isnan, 1, isnan_test_data, RUN_TEST_LOOP_f_b_tg, END);
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
   ALL_RM_TEST (isnan, 1, isnan_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END);
 #endif
 }
diff --git a/math/libm-test-issignaling.inc b/math/libm-test-issignaling.inc
index cc7c801e29..bea61a3664 100644
--- a/math/libm-test-issignaling.inc
+++ b/math/libm-test-issignaling.inc
@@ -39,7 +39,7 @@ static const struct test_f_i_data issignaling_test_data[] =
     TEST_f_b (issignaling, -snan_value_MACRO, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
 static const struct test_f_i_data_u issignaling_test_data_u[] =
   {
     TEST_f_b (issignaling, pseudo_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -54,7 +54,7 @@ static void
 issignaling_test (void)
 {
   ALL_RM_TEST (issignaling, 1, issignaling_test_data, RUN_TEST_LOOP_f_b_tg, END);
-#if HANDLE_PSEUDO_NUMBERS
+#if TEST_COND_intel96
   ALL_RM_TEST (issignaling, 1, issignaling_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END);
 #endif
 }
diff --git a/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h b/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h
index 771515a546..4df3b2e4de 100644
--- a/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h
+++ b/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h
@@ -19,9 +19,7 @@
 #ifndef NAN_PSEUDO_NUMBER_H
 #define NAN_PSEUDO_NUMBER_H	1
 
-/* Set this macro and override the definition of IS_PSEUDO_SIGNALING if pseudo
-   numbers need special handling.  */
-#define HANDLE_PSEUDO_NUMBERS 0
+/* Default is to assume that pseudo numbers are not signaling.  */
 static inline int
 is_pseudo_signaling (uint32_t exi, uint32_t hxi)
 {
diff --git a/sysdeps/x86/fpu/nan-pseudo-number.h b/sysdeps/x86/fpu/nan-pseudo-number.h
index e4e015b09f..84a05ea040 100644
--- a/sysdeps/x86/fpu/nan-pseudo-number.h
+++ b/sysdeps/x86/fpu/nan-pseudo-number.h
@@ -19,7 +19,6 @@
 #ifndef NAN_PSEUDO_NUMBER_H
 #define NAN_PSEUDO_NUMBER_H	1
 
-#define HANDLE_PSEUDO_NUMBERS 1
 /* Pseudo numbers on x86 are always signaling.  */
 static inline int
 is_pseudo_signaling (uint32_t exi, uint32_t hxi)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-18 21:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 21:38 [glibc/maskray/lld] Drop nan-pseudo-number.h usage from tests Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).