public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/meissner/heads/work077)] Use correct names for __ibm128 if long double is IEEE 128-bit.
Date: Thu, 27 Jan 2022 18:35:30 +0000 (GMT)	[thread overview]
Message-ID: <20220127183530.A2F8E3850428@sourceware.org> (raw)

https://gcc.gnu.org/g:f7e25436afcb4233dda8c439698d57ed78975869

commit f7e25436afcb4233dda8c439698d57ed78975869
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Thu Jan 27 13:35:12 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
    tradiation 'tf' name for these conversion functions.
    
    2022-01-27  Michael Meissner  <meissner@the-meissners.org>
    
    gcc/
            PR target/104253
            * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the
            compiler used to build the current compiler defaults to IEEE
            128-bit long double,  make that the default for this build.

Diff:
---
 gcc/config/rs6000/rs6000.cc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index f5c089a2a26..4fa0540c6af 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -11106,6 +11106,14 @@ init_float128_ibm (machine_mode mode)
      names.  */
   if (mode == IFmode)
     {
+      set_conv_libfunc (sext_optab, mode, SFmode, "__extendsftf2");
+      set_conv_libfunc (sext_optab, mode, DFmode, "__extenddftf2");
+      set_conv_libfunc (trunc_optab, SFmode, mode, "__trunctfsf2");
+      set_conv_libfunc (trunc_optab, DFmode, mode, "__trunctfdf2");
+
+      set_conv_libfunc (sext_optab, mode, IFmode, "__trunctftf2");
+      set_conv_libfunc (trunc_optab, IFmode, mode, "__extendtftf2");
+
       set_conv_libfunc (sext_optab, mode, SDmode, "__dpd_extendsdtf");
       set_conv_libfunc (sext_optab, mode, DDmode, "__dpd_extendddtf");
       set_conv_libfunc (trunc_optab, mode, TDmode, "__dpd_trunctdtf");
@@ -11113,6 +11121,16 @@ 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, SImode, mode, "__fixtfsi");
+      set_conv_libfunc (ufix_optab, SImode, mode, "__fixunstfsi");
+      set_conv_libfunc (sfix_optab, DImode, mode, "__fixtfdi");
+      set_conv_libfunc (ufix_optab, DImode, mode, "__fixunstfdi");
+
+      set_conv_libfunc (sfloat_optab, mode, SImode, "__floatsitf");
+      set_conv_libfunc (ufloat_optab, mode, SImode, "__floatunsitf");
+      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");


             reply	other threads:[~2022-01-27 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 18:35 Michael Meissner [this message]
2022-01-28 17:37 Michael Meissner
2022-01-28 21:27 Michael Meissner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220127183530.A2F8E3850428@sourceware.org \
    --to=meissner@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).