]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Drop nan-pseudo-number.h usage from tests
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 4 Jan 2021 12:10:04 +0000 (17:40 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 4 Jan 2021 15:19:56 +0000 (20:49 +0530)
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.

math/libm-test-driver.c
math/libm-test-fpclassify.inc
math/libm-test-isinf.inc
math/libm-test-isnan.inc
math/libm-test-issignaling.inc
sysdeps/ieee754/ldbl-96/nan-pseudo-number.h
sysdeps/x86/fpu/nan-pseudo-number.h

index 87f27930614358b1629c384799cff33dd193d333..f7c0861c39a52cd7d1b5f72ae2ccb37ea568e06f 100644 (file)
@@ -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;
index 39728d07714f8517280db92b6745a34d83cf81d4..c1c7e1ead1f72c2c39632c176648c8c35eca8335 100644 (file)
@@ -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
 }
index 38f973ba38a3bc77cab218b85db20c8310953a50..7d4b27a45c6409572714bf76a67b5bdb767cdd3e 100644 (file)
@@ -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
 }
index 948a3afdec1a8eb526a6a6dc366beffdcf9dd7d5..501bb1856fde19d8014bac2303cc06d9135161eb 100644 (file)
@@ -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
 }
index cc7c801e29b7b194b2f5685b3934328e3d5fc061..bea61a36643a6ce0246e3f81827fc477c32f23e9 100644 (file)
@@ -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
 }
index 771515a54671915cc1663eb85606afcd582d4bac..4df3b2e4de0c4967b1de9f3bea842dbe71b477b9 100644 (file)
@@ -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)
 {
index e4e015b09fca4f1c5d1360f58598639c63c8c877..84a05ea04074731a4d8ffbc12d55f9831fa53ac5 100644 (file)
@@ -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)