From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 389A93858424; Tue, 8 Feb 2022 21:46:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 389A93858424 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work078)] Use correct names for __ibm128 if long double is IEEE 128-bit. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work078 X-Git-Oldrev: 4015918720331c0379564313ab8461b559737e96 X-Git-Newrev: 71a7116e72859825a419efd6971a3bfff8f25697 Message-Id: <20220208214656.389A93858424@sourceware.org> Date: Tue, 8 Feb 2022 21:46:56 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2022 21:46:56 -0000 https://gcc.gnu.org/g:71a7116e72859825a419efd6971a3bfff8f25697 commit 71a7116e72859825a419efd6971a3bfff8f25697 Author: Michael Meissner Date: Tue Feb 8 16:46:01 2022 -0500 Use correct names for __ibm128 if long double is IEEE 128-bit. If you are on a PowerPC system where the default long double is IEEE 128-bit, GCC will use the wrong names for some of the conversion functions for the __ibm128 type. What is happening is when the defult long double is IEEE 128-bit, the various convert, truncation, and extend functions did not specify a default name for the conversion. The machine indepentent portions of the compiler would construct a call with an 'if' name (IFmode being the mode for IBM 128-bit floating point). This patch specifies to use the tradiational 'tf' name for these conversion functions. 2022-02-08 Michael Meissner gcc/ PR target/104253 * config/rs6000/rs6000.cc (init_float128_ibm): Use the TF names for builtin conversions between __ibm128 and DImode when long double uses the IEEE 128-bit format. gcc/testsuite/ PR target/104253 * gcc.target/powerpc/pr104253.c: New test. Diff: --- gcc/config/rs6000/rs6000.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index e2d94421ae9..f56cf66313a 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -10984,6 +10984,12 @@ init_float128_ibm (machine_mode mode) set_conv_libfunc (trunc_optab, DDmode, mode, "__dpd_trunctfdd"); set_conv_libfunc (sext_optab, TDmode, mode, "__dpd_extendtftd"); + set_conv_libfunc (sfix_optab, DImode, mode, "__fixtfdi"); + set_conv_libfunc (ufix_optab, DImode, mode, "__fixunstfdi"); + + set_conv_libfunc (sfloat_optab, mode, DImode, "__floatditf"); + set_conv_libfunc (ufloat_optab, mode, DImode, "__floatunditf"); + if (TARGET_POWERPC64) { set_conv_libfunc (sfix_optab, TImode, mode, "__fixtfti");