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/work107)] Revert patches
Date: Fri, 27 Jan 2023 16:53:59 +0000 (GMT)	[thread overview]
Message-ID: <20230127165359.9E86F3858C00@sourceware.org> (raw)

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

commit cdf2510d393f3dbec1cea0fa2da151791e3125ac
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jan 27 11:53:55 2023 -0500

    Revert patches

Diff:
---
 gcc/ChangeLog.meissner              | 71 ++-----------------------------------
 gcc/config/rs6000/rs6000-builtin.cc | 34 ++++++++++--------
 2 files changed, 22 insertions(+), 83 deletions(-)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 6ae64a62d3b..63b9325d363 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,73 +1,8 @@
-==================== work107, patch #22 ====================
+==================== work107, patch #22 was reverted ====================
 
-Update fp conversions #2
+==================== work107, patch #22 was reverted ====================
 
-2022-01-24   Michael Meissner  <meissner@linux.ibm.com>
-
-gcc/
-
-	* config/rs6000/rs6000.md (any_fp_cvt): New code iterator.
-	(fp_cvt): New code attribute.
-	(extendkftf2): Replace with <fp_cvt>kftf2.
-	(trunctfkf2): Replace with <fp_cvt>tfkf2.
-	(extendiftf2): Replace with <fp_cvt>iftf2.
-	(trunctfif2): Replace with <fp_cvt>tfif2.
-	(<fp_cvt>kftf2): Add both float_extend and float_truncate versions to
-	convert between 128-bit floating point types with the same format..
-	(<fp_cvt>tfkf2): Likewise.
-	(<fp_cvt>iftf2): Likewise.
-	(<fp_cvt>tfif2): Likewise.
-
-==================== work107, patch #21 ====================
-
-Update float 128-bit conversions, PR target/107299.
-
-This patch is a rewrite of the patch submitted on August 18th:
-
-| https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599988.html
-
-This patch reworks the conversions between 128-bit binary floating point types.
-Previously, we would call rs6000_expand_float128_convert to do all conversions.
-Now, we only define the conversions between the same representation that turn
-into a NOP.  The appropriate extend or truncate insn is generated, and after
-register allocation, it is converted to a move.
-
-This patch also fixes two places where we want to override the external name
-for the conversion function, and the wrong optab was used.  Previously,
-rs6000_expand_float128_convert would handle the move or generate the call as
-needed.  Now, it lets the machine independent code generate the call.  But if
-we use the machine independent code to generate the call, we need to update the
-name for two optabs where a truncate would be used in terms of converting
-between the modes.  This patch updates those two optabs.
-
-This patch was previously submitted on December 14th, 2022.  This patch changes
-one built-in function from a FLOAT_TRUNCATE to a FLOAT_EXTEND, which is needed
-by the previous patch to genmodes.cc to allow allow the same precision to be
-used for various modes.
-
-2022-01-24   Michael Meissner  <meissner@linux.ibm.com>
-
-gcc/
-
-	PR target/107299
-	* config/rs6000/rs6000.cc (init_float128_ieee): Use the correct
-	float_extend or float_truncate optab based on how the machine converts
-	between IEEE 128-bit and IBM 128-bit.
-	* config/rs6000/rs6000.md (IFKF): Delete.
-	(IFKF_reg): Delete.
-	(extendiftf2): Rewrite to be a move if IFmode and TFmode are both IBM
-	128-bit.  Do not run if TFmode is IEEE 128-bit.
-	(extendifkf2): Delete.
-	(extendtfkf2): Delete.
-	(extendtfif2): Delete.
-	(trunciftf2): Delete.
-	(truncifkf2): Delete.
-	(trunckftf2): Delete.
-	(extendkftf2): Implement conversion of IEEE 128-bit types as a move.
-	(trunctfif2): Delete.
-	(trunctfkf2): Implement conversion of IEEE 128-bit types as a move.
-	(extend<mode>tf2_internal): Delete.
-	(extendtf<mode>2_internal): Delete.
+==================== work107, patch #21 was reverted ====================
 
 ==================== work107, patch #20 ====================
 
diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc
index 873ae7ce875..737a5c42bfb 100644
--- a/gcc/config/rs6000/rs6000-builtin.cc
+++ b/gcc/config/rs6000/rs6000-builtin.cc
@@ -730,21 +730,25 @@ rs6000_init_builtins (void)
 
   if (TARGET_FLOAT128_TYPE)
     {
-      /* For C we only need to register the __ieee128 name for it.  For C++, we
-	 create a distinct type which will mangle differently (u9__ieee128)
-	 vs. _Float128 (DF128_) and behave backwards compatibly.
-
-	 In the past we used the long double type if long double was IEEE
-	 128-bit.  This leads to differences if _Float128 and __float128 are
-	 not compatible types.  In particular, it showed up in generating
-	 signaling NaNs with __builtin_nansf128 and storing it into __float128,
-	 which at the time was based on long double.  Because they were
-	 different types, the signaling part of the NaN was lost in the
-	 conversion.  */
-      if (float128t_type_node == NULL_TREE)
-	float128t_type_node = build_variant_type_copy (float128_type_node);
-
-      ieee128_float_type_node = float128t_type_node;
+      if (TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128)
+	ieee128_float_type_node = long_double_type_node;
+      else
+	{
+	  /* For C we only need to register the __ieee128 name for
+	     it.  For C++, we create a distinct type which will mangle
+	     differently (u9__ieee128) vs. _Float128 (DF128_) and behave
+	     backwards compatibly.  */
+	  if (float128t_type_node == NULL_TREE)
+	    {
+	      float128t_type_node = make_node (REAL_TYPE);
+	      TYPE_PRECISION (float128t_type_node)
+		= TYPE_PRECISION (float128_type_node);
+	      layout_type (float128t_type_node);
+	      SET_TYPE_MODE (float128t_type_node,
+			     TYPE_MODE (float128_type_node));
+	    }
+	  ieee128_float_type_node = float128t_type_node;
+	}
       t = build_qualified_type (ieee128_float_type_node, TYPE_QUAL_CONST);
       lang_hooks.types.register_builtin_type (ieee128_float_type_node,
 					      "__ieee128");

             reply	other threads:[~2023-01-27 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 16:53 Michael Meissner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-25  4:56 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=20230127165359.9E86F3858C00@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).