]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc64le: Fix TFtype in sqrtf128 when using -mabi=ieeelongdouble
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 6 Jun 2018 15:27:39 +0000 (12:27 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 6 Jun 2018 15:27:39 +0000 (12:27 -0300)
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>
ChangeLog
sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c

index a3bc2bf31ecd24863c11dc246970610a91795007..b1d694ad0cea9dfc70c82660859d0d433de8b11a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-06-06  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
+
+       * 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.
+
 2018-06-05  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_DIT): New
index 0ff897bef3f788972456ff9682e8f446a64c59eb..f7c8ea33d375cded2d1499e1e666bbd448f30e49 100644 (file)
    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>