[PATCH] powerpc64le: Fix TFtype in sqrtf128 when using -mabi=ieeelongdouble

Gabriel F. T. Gomes gabriel@inconstante.eti.br
Fri Jun 1 19:59:00 GMT 2018


On Mon, 28 May 2018, Tulio Magno Quites Machado Filho wrote:

>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.

OK.

>	* sysdeps/powerpc/powerpc64le/fpu/e_sqrtf128.c
                          ~~~~~~~~~~~
Missing the slash, i.e.: powerpc64/le.
 
>--- a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
>+++ b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c
>@@ -26,9 +26,12 @@
>    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
>+/* Unavoidable hacks since TFmode is assumed to be binary128 when
>+   -mabi=ibmlongdouble is used.  */
>+#if __HAVE_FLOAT128_UNLIKE_LDBL

Don't you have to include bits/floatn.h to get the definition of
__HAVE_FLOAT128_UNLIKE_LDBL?


Looks good to me with these changes.



More information about the Libc-alpha mailing list