about summary refs log tree commit diff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-06-08 14:37:15 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-06-08 14:37:15 -0500
commit9c665e085f092d2fd1c0c159532d94191b8e2aec (patch)
treec1603caf0e6366d2e2532c2ebd76c76c5506a890 /math/libm-test.inc
parent89385134849a9a4aa66f5b2ebaedaad7d63a11db (diff)
downloadglibc-9c665e085f092d2fd1c0c159532d94191b8e2aec.tar.gz
glibc-9c665e085f092d2fd1c0c159532d94191b8e2aec.tar.xz
glibc-9c665e085f092d2fd1c0c159532d94191b8e2aec.zip
Remove CHOOSE() macro from libm-tests.inc
Use gen-libm-test.pl to generate a list of macros
mapping to libm-test-ulps.h as this simplifies adding new
types without having to modify a growing number of
static headers each time a type is added.

This also removes the final usage of the TEST_(DOUBLE|FLOAT|LDOUBLE)
macros.  Thus, they too are removed.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc13
1 files changed, 3 insertions, 10 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 3218cefd7a..ef869a7979 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -26,7 +26,6 @@
    name with correct suffix (e.g. cosl or cosf)
    FLOAT:	   floating point type to test
    - TEST_MSG:	   informal message to be displayed
-   CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat):
    chooses one of the parameters as delta for testing
    equality
    PRINTF_EXPR	   Floating point conversion specification to print a variable
@@ -131,14 +130,6 @@
 #include <math-tests.h>
 #include <math-tests-arch.h>
 
-/* Structure for ulp data for a function, or the real or imaginary
-   part of a function.  */
-struct ulp_data
-{
-  const char *name;
-  FLOAT max_ulp;
-};
-
 /* This header defines func_ulps, func_real_ulps and func_imag_ulps
    arrays.  */
 #include "libm-test-ulps.h"
@@ -202,8 +193,10 @@ struct ulp_data
 #define FSTR_MAX (128)
 
 #if TEST_INLINE
+# define ULP_IDX __CONCATX (ULP_I_, PREFIX)
 # define QTYPE_STR "i" TYPE_STR
 #else
+# define ULP_IDX __CONCATX (ULP_, PREFIX)
 # define QTYPE_STR TYPE_STR
 #endif
 
@@ -369,7 +362,7 @@ find_ulps (const char *name, const struct ulp_data *data, size_t nmemb)
   if (entry == NULL)
     return 0;
   else
-    return entry->max_ulp;
+    return entry->max_ulp[ULP_IDX];
 }
 
 static void