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/work106)] Revert patches
Date: Wed, 18 Jan 2023 15:57:57 +0000 (GMT)	[thread overview]
Message-ID: <20230118155757.DE7A33858D28@sourceware.org> (raw)

https://gcc.gnu.org/g:68ed94d070d5b216376052662f57532afa088c1d

commit 68ed94d070d5b216376052662f57532afa088c1d
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Jan 18 10:57:53 2023 -0500

    Revert patches

Diff:
---
 libgcc/config/rs6000/_divkc3.c        | 21 ++++--------------
 libgcc/config/rs6000/_mulkc3.c        | 20 ++++-------------
 libgcc/config/rs6000/float128-ifunc.c |  6 ++---
 libgcc/config/rs6000/quad-float128.h  | 42 +++++++++++------------------------
 4 files changed, 23 insertions(+), 66 deletions(-)

diff --git a/libgcc/config/rs6000/_divkc3.c b/libgcc/config/rs6000/_divkc3.c
index b1c9c9f6e3a..59ab2137d1d 100644
--- a/libgcc/config/rs6000/_divkc3.c
+++ b/libgcc/config/rs6000/_divkc3.c
@@ -26,19 +26,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include "soft-fp.h"
 #include "quad-float128.h"
 
-/* Use the correct built-ins depending on whether long double is IEEE 128-bit
-   or IBM 128-bit.  */
-#ifndef __LONG_DOUBLE_IEEE128__
 #define COPYSIGN(x,y) __builtin_copysignf128 (x, y)
 #define INFINITY __builtin_inff128 ()
 #define FABS __builtin_fabsf128
-
-#else
-#define COPYSIGN(x,y) __builtin_copysignl (x, y)
-#define INFINITY __builtin_infl ()
-#define FABS __builtin_fabsl
-#endif
-
 #define isnan __builtin_isnan
 #define isinf __builtin_isinf
 #define isfinite __builtin_isfinite
@@ -61,14 +51,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define RMAX2  (RBIG * RMIN2)
 #endif
 
-TCtype_cmuldiv
-__divkc3 (TFtype_cmuldiv a,
-	  TFtype_cmuldiv b,
-	  TFtype_cmuldiv c,
-	  TFtype_cmuldiv d)
+TCtype
+__divkc3 (TFtype a, TFtype b, TFtype c, TFtype d)
 {
-  TFtype_cmuldiv denom, ratio, x, y;
-  TCtype_cmuldiv res;
+  TFtype denom, ratio, x, y;
+  TCtype res;
 
   /* long double has significant potential underflow/overflow errors that
      can be greatly reduced with a limited number of tests and adjustments.
diff --git a/libgcc/config/rs6000/_mulkc3.c b/libgcc/config/rs6000/_mulkc3.c
index 05d2913439a..cfae81f8b5f 100644
--- a/libgcc/config/rs6000/_mulkc3.c
+++ b/libgcc/config/rs6000/_mulkc3.c
@@ -26,17 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include "soft-fp.h"
 #include "quad-float128.h"
 
-/* Use the correct built-ins depending on whether long double is IEEE 128-bit
-   or IBM 128-bit.  */
-#ifndef __LONG_DOUBLE_IEEE128__
 #define COPYSIGN(x,y) __builtin_copysignf128 (x, y)
 #define INFINITY __builtin_inff128 ()
-
-#else
-#define COPYSIGN(x,y) __builtin_copysignl (x, y)
-#define INFINITY __builtin_infl ()
-#endif
-
 #define isnan __builtin_isnan
 #define isinf __builtin_isinf
 
@@ -44,14 +35,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define __mulkc3 __mulkc3_sw
 #endif
 
-TCtype_cmuldiv
-__mulkc3 (TFtype_cmuldiv a,
-	  TFtype_cmuldiv b,
-	  TFtype_cmuldiv c,
-	  TFtype_cmuldiv d)
+TCtype
+__mulkc3 (TFtype a, TFtype b, TFtype c, TFtype d)
 {
-  TFtype_cmuldiv ac, bd, ad, bc, x, y;
-  TCtype_cmuldiv res;
+  TFtype ac, bd, ad, bc, x, y;
+  TCtype res;
 
   ac = a * c;
   bd = b * d;
diff --git a/libgcc/config/rs6000/float128-ifunc.c b/libgcc/config/rs6000/float128-ifunc.c
index 6ea8fdd82c3..73cbca2fc9a 100644
--- a/libgcc/config/rs6000/float128-ifunc.c
+++ b/libgcc/config/rs6000/float128-ifunc.c
@@ -354,10 +354,8 @@ IBM128_TYPE __extendkftf2 (TFtype)
 TFtype __trunctfkf2 (IBM128_TYPE)
   __attribute__ ((__ifunc__ ("__trunctfkf2_resolve")));
 
-TCtype_cmuldiv __mulkc3 (TFtype_cmuldiv, TFtype_cmuldiv,
-			 TFtype_cmuldiv, TFtype_cmuldiv)
+TCtype __mulkc3 (TFtype, TFtype, TFtype, TFtype)
   __attribute__ ((__ifunc__ ("__mulkc3_resolve")));
 
-TCtype_cmuldiv __divkc3 (TFtype_cmuldiv, TFtype_cmuldiv,
-			 TFtype_cmuldiv, TFtype_cmuldiv)
+TCtype __divkc3 (TFtype, TFtype, TFtype, TFtype)
   __attribute__ ((__ifunc__ ("__divkc3_resolve")));
diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h
index 6cfbee6e599..ae0622c744c 100644
--- a/libgcc/config/rs6000/quad-float128.h
+++ b/libgcc/config/rs6000/quad-float128.h
@@ -30,28 +30,18 @@
 /* quad.h defines the TFtype type by:
    typedef float TFtype __attribute__ ((mode (TF)));
 
-   These two defines override the machine independent files that use
-   __attribute__((mode(TF))) and __attribute__((mode(TC))) to create the IEEE
-   128-bit scalar and complex types.  */
+   This define forces it to use KFmode (aka, ieee 128-bit floating point).
+   However, when the compiler's default is changed so that long double is IEEE
+   128-bit floating point, we need to go back to using TFmode and TCmode.  */
 #ifndef __LONG_DOUBLE_IEEE128__
 #define TF KF
-#define TC KC
-#endif
 
-/* Special types for IEEE 128-bit floating point complex multiply/divide
-   support.  We need to use _Float128 or long double specifically so that the
-   compiler doesn't complain about different types when we do the declaration.
-   __mulkc3 and __divkc3 are built-in functions with pre-defined types.  Using
-   __attribute__ mode creates a different type internally, and the compiler
-   complains when you issue the declaration when the original type used
-   _Float128 or long double.  */
-#ifdef __LONG_DOUBLE_IEEE128__
-#define TFtype_cmuldiv long double
-#define TCtype_cmuldiv _Complex long double
+/* We also need TCtype to represent complex ieee 128-bit float for
+   __mulkc3 and __divkc3.  */
+typedef __complex float TCtype __attribute__ ((mode (KC)));
 
 #else
-#define TFtype_cmuldiv _Float128
-#define TCtype_cmuldiv _Complex _Float128
+typedef __complex float TCtype __attribute__ ((mode (TC)));
 #endif
 
 /* Force the use of the VSX instruction set.  */
@@ -110,10 +100,8 @@ extern UTItype_ppc __fixunskfti_sw (TFtype);
 #endif
 extern IBM128_TYPE __extendkftf2_sw (TFtype);
 extern TFtype __trunctfkf2_sw (IBM128_TYPE);
-extern TCtype_cmuldiv __mulkc3_sw (TFtype_cmuldiv, TFtype_cmuldiv,
-				   TFtype_cmuldiv, TFtype_cmuldiv);
-extern TCtype_cmuldiv __divkc3_sw (TFtype_cmuldiv, TFtype_cmuldiv,
-				   TFtype_cmuldiv, TFtype_cmuldiv);
+extern TCtype __mulkc3_sw (TFtype, TFtype, TFtype, TFtype);
+extern TCtype __divkc3_sw (TFtype, TFtype, TFtype, TFtype);
 
 #ifdef _ARCH_PPC64
 extern TItype_ppc __fixkfti (TFtype);
@@ -158,10 +146,8 @@ extern UTItype_ppc __fixunskfti_hw (TFtype);
 #endif
 extern IBM128_TYPE __extendkftf2_hw (TFtype);
 extern TFtype __trunctfkf2_hw (IBM128_TYPE);
-extern TCtype_cmuldiv __mulkc3_hw (TFtype_cmuldiv, TFtype_cmuldiv,
-				   TFtype_cmuldiv, TFtype_cmuldiv);
-extern TCtype_cmuldiv __divkc3_hw (TFtype_cmuldiv, TFtype_cmuldiv,
-				   TFtype_cmuldiv, TFtype_cmuldiv);
+extern TCtype __mulkc3_hw (TFtype, TFtype, TFtype, TFtype);
+extern TCtype __divkc3_hw (TFtype, TFtype, TFtype, TFtype);
 
 /* Ifunc function declarations, to automatically switch between software
    emulation and hardware support.  */
@@ -202,10 +188,8 @@ extern IBM128_TYPE __extendkftf2 (TFtype);
 extern TFtype __trunctfkf2 (IBM128_TYPE);
 
 /* Complex __float128 built on __float128 interfaces.  */
-extern TCtype_cmuldiv __mulkc3 (TFtype_cmuldiv, TFtype_cmuldiv,
-				TFtype_cmuldiv, TFtype_cmuldiv);
-extern TCtype_cmuldiv __divkc3 (TFtype_cmuldiv, TFtype_cmuldiv,
-				TFtype_cmuldiv, TFtype_cmuldiv);
+extern TCtype __mulkc3 (TFtype, TFtype, TFtype, TFtype);
+extern TCtype __divkc3 (TFtype, TFtype, TFtype, TFtype);
 
 /* Convert IEEE 128-bit floating point to/from string.  We explicitly use
    _Float128 instead of TFmode because _strtokf and _strfromkf must be compiled

             reply	other threads:[~2023-01-18 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 15:57 Michael Meissner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-18  8:10 Michael Meissner
2023-01-18  5:27 Michael Meissner
2023-01-18  1:57 Michael Meissner
2023-01-17 23:53 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=20230118155757.DE7A33858D28@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).