about summary refs log tree commit diff
path: root/math/test-ldouble.h
diff options
context:
space:
mode:
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>2018-05-28 18:56:35 -0300
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-03-06 09:17:32 -0600
commit0059122aa0e53ff77ee58c5ff7589a814f1228e5 (patch)
tree9682413fd7199290e1e469e29be5ddad894250c9 /math/test-ldouble.h
parent1c252f0e7e5d78695f19450aa7c470bab445aa8e (diff)
downloadglibc-0059122aa0e53ff77ee58c5ff7589a814f1228e5.tar.gz
glibc-0059122aa0e53ff77ee58c5ff7589a814f1228e5.tar.xz
glibc-0059122aa0e53ff77ee58c5ff7589a814f1228e5.zip
ldbl-128ibm-compat: Add tests for IBM long double functions
This patch creates test-ibm128* tests from the long double function tests.
In order to explicitly test IBM long double functions -mabi=ibmlongdouble is
added to CFLAGS.

Likewise, update the test headers to correct choose ULPs when redirects
are enabled.

Co-authored-by: Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
Co-authored-by: Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
Diffstat (limited to 'math/test-ldouble.h')
-rw-r--r--math/test-ldouble.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/math/test-ldouble.h b/math/test-ldouble.h
index 17c526bd71..5b72915008 100644
--- a/math/test-ldouble.h
+++ b/math/test-ldouble.h
@@ -27,6 +27,13 @@
 # define TYPE_STR "double"
 # define ULP_IDX ULP_DBL
 # define ULP_I_IDX ULP_I_DBL
+/* On architectures which redirect long double to _Float128 ABI, we must
+   choose the float128 ulps.  Similarly, on such architectures, the ABI
+   used may be dependent on how the compiler was invoked.  */
+#elif __LONG_DOUBLE_USES_FLOAT128 == 1
+# define TYPE_STR "float128"
+# define ULP_IDX ULP_FLT128
+# define ULP_I_IDX ULP_I_FLT128
 #else
 # define TYPE_STR "ldouble"
 # define ULP_IDX ULP_LDBL