aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-06-06 12:27:39 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-06-06 12:27:39 -0300
commit1c09524e4db3efd797ebcfcd8241bdb78f0b06f0 (patch)
treea30c31d59c85f171985f29e9716c2d65a46a2842 /sysdeps/powerpc
parent0c1c33b2f5269cce6499ef8f8d1a291f2674a8fd (diff)
downloadglibc-1c09524e4db3efd797ebcfcd8241bdb78f0b06f0.tar
glibc-1c09524e4db3efd797ebcfcd8241bdb78f0b06f0.tar.gz
glibc-1c09524e4db3efd797ebcfcd8241bdb78f0b06f0.tar.bz2
glibc-1c09524e4db3efd797ebcfcd8241bdb78f0b06f0.zip
powerpc64le: Fix TFtype in sqrtf128 when using -mabi=ieeelongdouble
When building with -mlong-double-128 or -mabi=ibmlongdouble, TFtype represents the IBM 128-bit extended floating point type, while KFtype represents the IEEE 128-bit floating point type. The soft float implementation of e_sqrtf128 had to redefine TFtype and TF in order to workaround this issue. However, this behavior changes when -mabi=ieeelongdouble is used and the macros are not necessary. * sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c [__HAVE_FLOAT128_UNLIKE_LDBL] (TFtype, TF): Restrict TFtype and TF redirection to KFtype and KF only when the default long double type is not the IEEE 128-bit floating point type. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
index 0ff897bef3..f7c8ea33d3 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
+++ b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
@@ -26,9 +26,14 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-/* Unavoidable hacks since TFmode is assumed to be binary128. */
-#define TFtype KFtype
-#define TF KF
+#include <math.h>
+
+/* Unavoidable hacks since TFmode is assumed to be binary128 when
+ -mabi=ibmlongdouble is used. */
+#if __HAVE_FLOAT128_UNLIKE_LDBL
+# define TFtype KFtype
+# define TF KF
+#endif
#include <soft-fp.h>
#include <quad.h>