aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/soft-fp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-01-07 09:04:29 -0800
committerH.J. Lu <hjl.tools@gmail.com>2019-01-07 09:04:39 -0800
commit69da3c9e87e0a692e79db0615a53782e4198dbf0 (patch)
tree19a3b5f1b84b36f78421a364ce4d29bbdfa0cb94 /sysdeps/ieee754/soft-fp
parent2ef427168818ce04b03cecb7b739f9db0156e3e4 (diff)
downloadglibc-69da3c9e87e0a692e79db0615a53782e4198dbf0.zip
glibc-69da3c9e87e0a692e79db0615a53782e4198dbf0.tar.gz
glibc-69da3c9e87e0a692e79db0615a53782e4198dbf0.tar.bz2
soft-fp: Properly check _FP_W_TYPE_SIZE [BZ #24066]
quad.h have #if _FP_W_TYPE_SIZE < 64 union _FP_UNION_Q { Use 4 _FP_W_TYPEs } #else union _FP_UNION_Q { Use 2 _FP_W_TYPEs } #endif Replace #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q with #if _FP_W_TYPE_SIZE < 64 to check whether 4 or 2 _FP_W_TYPEs are used for IEEE quad precision. Tested with build-many-glibcs.py. [BZ #24066] * soft-fp/extenddftf2.c: Use "_FP_W_TYPE_SIZE < 64" to check if 4_FP_W_TYPEs are used for IEEE quad precision. * soft-fp/extendhftf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/extendxftf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfhf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * soft-fp/trunctfxf2.c: Likewise. * sysdeps/alpha/ots_cvttx.c: Likewise. * sysdeps/alpha/ots_cvtxt.c: Likewise. * sysdeps/ieee754/soft-fp/s_daddl.c: Likewise. * sysdeps/ieee754/soft-fp/s_ddivl.c: Likewise. * sysdeps/ieee754/soft-fp/s_dmull.c: Likewise. * sysdeps/ieee754/soft-fp/s_dsubl.c: Likewise. * sysdeps/ieee754/soft-fp/s_faddl.c: Likewise. * sysdeps/ieee754/soft-fp/s_fdivl.c: Likewise. * sysdeps/ieee754/soft-fp/s_fmull.c: Likewise. * sysdeps/ieee754/soft-fp/s_fsubl.c: Likewise. * sysdeps/sparc/sparc32/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/q_stoq.c: Likewise. * sysdeps/sparc/sparc64/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/qp_stoq.c: Likewise.
Diffstat (limited to 'sysdeps/ieee754/soft-fp')
-rw-r--r--sysdeps/ieee754/soft-fp/s_daddl.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_ddivl.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_dmull.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_dsubl.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_faddl.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_fdivl.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_fmull.c2
-rw-r--r--sysdeps/ieee754/soft-fp/s_fsubl.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/ieee754/soft-fp/s_daddl.c b/sysdeps/ieee754/soft-fp/s_daddl.c
index 7f217a8..dc909a1 100644
--- a/sysdeps/ieee754/soft-fp/s_daddl.c
+++ b/sysdeps/ieee754/soft-fp/s_daddl.c
@@ -46,7 +46,7 @@ __daddl (_Float128 x, _Float128 y)
FP_UNPACK_SEMIRAW_Q (X, x);
FP_UNPACK_SEMIRAW_Q (Y, y);
FP_ADD_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (D, Q, 2, 4, RN, R);
#else
FP_TRUNC (D, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_ddivl.c b/sysdeps/ieee754/soft-fp/s_ddivl.c
index d792b70..8e469c5 100644
--- a/sysdeps/ieee754/soft-fp/s_ddivl.c
+++ b/sysdeps/ieee754/soft-fp/s_ddivl.c
@@ -46,7 +46,7 @@ __ddivl (_Float128 x, _Float128 y)
FP_UNPACK_Q (X, x);
FP_UNPACK_Q (Y, y);
FP_DIV_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC_COOKED (D, Q, 2, 4, RN, R);
#else
FP_TRUNC_COOKED (D, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_dmull.c b/sysdeps/ieee754/soft-fp/s_dmull.c
index 9841f81..437c55b 100644
--- a/sysdeps/ieee754/soft-fp/s_dmull.c
+++ b/sysdeps/ieee754/soft-fp/s_dmull.c
@@ -46,7 +46,7 @@ __dmull (_Float128 x, _Float128 y)
FP_UNPACK_Q (X, x);
FP_UNPACK_Q (Y, y);
FP_MUL_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC_COOKED (D, Q, 2, 4, RN, R);
#else
FP_TRUNC_COOKED (D, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_dsubl.c b/sysdeps/ieee754/soft-fp/s_dsubl.c
index 14cc769..699ff44 100644
--- a/sysdeps/ieee754/soft-fp/s_dsubl.c
+++ b/sysdeps/ieee754/soft-fp/s_dsubl.c
@@ -46,7 +46,7 @@ __dsubl (_Float128 x, _Float128 y)
FP_UNPACK_SEMIRAW_Q (X, x);
FP_UNPACK_SEMIRAW_Q (Y, y);
FP_SUB_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (D, Q, 2, 4, RN, R);
#else
FP_TRUNC (D, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_faddl.c b/sysdeps/ieee754/soft-fp/s_faddl.c
index 4b16984..23dfcc0 100644
--- a/sysdeps/ieee754/soft-fp/s_faddl.c
+++ b/sysdeps/ieee754/soft-fp/s_faddl.c
@@ -42,7 +42,7 @@ __faddl (_Float128 x, _Float128 y)
FP_UNPACK_SEMIRAW_Q (X, x);
FP_UNPACK_SEMIRAW_Q (Y, y);
FP_ADD_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (S, Q, 1, 4, RN, R);
#else
FP_TRUNC (S, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_fdivl.c b/sysdeps/ieee754/soft-fp/s_fdivl.c
index df7a017..4792b23 100644
--- a/sysdeps/ieee754/soft-fp/s_fdivl.c
+++ b/sysdeps/ieee754/soft-fp/s_fdivl.c
@@ -42,7 +42,7 @@ __fdivl (_Float128 x, _Float128 y)
FP_UNPACK_Q (X, x);
FP_UNPACK_Q (Y, y);
FP_DIV_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC_COOKED (S, Q, 1, 4, RN, R);
#else
FP_TRUNC_COOKED (S, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_fmull.c b/sysdeps/ieee754/soft-fp/s_fmull.c
index 1ae0e1a..8d98bf9 100644
--- a/sysdeps/ieee754/soft-fp/s_fmull.c
+++ b/sysdeps/ieee754/soft-fp/s_fmull.c
@@ -42,7 +42,7 @@ __fmull (_Float128 x, _Float128 y)
FP_UNPACK_Q (X, x);
FP_UNPACK_Q (Y, y);
FP_MUL_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC_COOKED (S, Q, 1, 4, RN, R);
#else
FP_TRUNC_COOKED (S, Q, 1, 2, RN, R);
diff --git a/sysdeps/ieee754/soft-fp/s_fsubl.c b/sysdeps/ieee754/soft-fp/s_fsubl.c
index bafc820..bca0060 100644
--- a/sysdeps/ieee754/soft-fp/s_fsubl.c
+++ b/sysdeps/ieee754/soft-fp/s_fsubl.c
@@ -42,7 +42,7 @@ __fsubl (_Float128 x, _Float128 y)
FP_UNPACK_SEMIRAW_Q (X, x);
FP_UNPACK_SEMIRAW_Q (Y, y);
FP_SUB_Q (R, X, Y);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (S, Q, 1, 4, RN, R);
#else
FP_TRUNC (S, Q, 1, 2, RN, R);