public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/dmf004)] Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
@ 2022-11-17 21:52 Michael Meissner
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2022-11-17 21:52 UTC (permalink / raw)
  To: gcc-cvs

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

commit c9901d4ca789c1170083e85f863bbc4255e4abd4
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 9 00:32:15 2022 -0500

    Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
    
    2022-11-09   Michael Meissner  <meissner@linux.ibm.com>
    
    libgcc/
    
            * config/rs6000/quad-float128.h (TF): Delete definition.
            (TFtype): Define to be _Float128.
            (TCtype): Change to be _Complex _Float128.
            * libgcc2.h (TFtype): Allow MD code to override definition.
            (TCtype): Likewise.
            * soft-fp/quad.h (TFtype): Likewise.

Diff:
---
 libgcc/config/rs6000/quad-float128.h | 19 +++----------------
 libgcc/libgcc2.h                     |  5 +++++
 libgcc/soft-fp/quad.h                |  2 ++
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h
index ae0622c744c..3fa70d0e0a8 100644
--- a/libgcc/config/rs6000/quad-float128.h
+++ b/libgcc/config/rs6000/quad-float128.h
@@ -27,22 +27,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* quad.h defines the TFtype type by:
-   typedef float TFtype __attribute__ ((mode (TF)));
-
-   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
-
-/* We also need TCtype to represent complex ieee 128-bit float for
-   __mulkc3 and __divkc3.  */
-typedef __complex float TCtype __attribute__ ((mode (KC)));
-
-#else
-typedef __complex float TCtype __attribute__ ((mode (TC)));
-#endif
+/* Override quad.h's definitions for 128-bit floating point type.  */
+#define TFtype _Float128
+#define TCtype _Complex _Float128
 
 /* Force the use of the VSX instruction set.  */
 #if defined(_ARCH_PPC) && (!defined(__VSX__) || !defined(__FLOAT128__))
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h
index fc24ac34502..a39c365d904 100644
--- a/libgcc/libgcc2.h
+++ b/libgcc/libgcc2.h
@@ -156,9 +156,14 @@ typedef		float XFtype	__attribute__ ((mode (XF)));
 typedef _Complex float XCtype	__attribute__ ((mode (XC)));
 #endif
 #if LIBGCC2_HAS_TF_MODE
+/* PowerPC would like to override this to be _Float128.  */
+#ifndef TFtype
 typedef		float TFtype	__attribute__ ((mode (TF)));
+#endif
+#ifndef TCtype
 typedef _Complex float TCtype	__attribute__ ((mode (TC)));
 #endif
+#endif
 
 typedef int cmp_return_type __attribute__((mode (__libgcc_cmp_return__)));
 typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__)));
diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h
index 3889bb44f1f..71f87d36ba9 100644
--- a/libgcc/soft-fp/quad.h
+++ b/libgcc/soft-fp/quad.h
@@ -65,7 +65,9 @@
 #define _FP_HIGHBIT_DW_Q	\
   ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_Q - 1) % _FP_W_TYPE_SIZE)
 
+#ifndef TFtype
 typedef float TFtype __attribute__ ((mode (TF)));
+#endif
 
 #if _FP_W_TYPE_SIZE < 64

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/meissner/heads/dmf004)] Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
@ 2022-11-09  5:32 Michael Meissner
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2022-11-09  5:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1eac951db23de63c706d495a6038ed6b91e20d6d

commit 1eac951db23de63c706d495a6038ed6b91e20d6d
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Nov 9 00:32:15 2022 -0500

    Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC.
    
    2022-11-09   Michael Meissner  <meissner@linux.ibm.com>
    
    libgcc/
    
            * config/rs6000/quad-float128.h (TF): Delete definition.
            (TFtype): Define to be _Float128.
            (TCtype): Change to be _Complex _Float128.
            * libgcc2.h (TFtype): Allow MD code to override definition.
            (TCtype): Likewise.
            * soft-fp/quad.h (TFtype): Likewise.

Diff:
---
 libgcc/config/rs6000/quad-float128.h | 19 +++----------------
 libgcc/libgcc2.h                     |  5 +++++
 libgcc/soft-fp/quad.h                |  2 ++
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h
index ae0622c744c..3fa70d0e0a8 100644
--- a/libgcc/config/rs6000/quad-float128.h
+++ b/libgcc/config/rs6000/quad-float128.h
@@ -27,22 +27,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* quad.h defines the TFtype type by:
-   typedef float TFtype __attribute__ ((mode (TF)));
-
-   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
-
-/* We also need TCtype to represent complex ieee 128-bit float for
-   __mulkc3 and __divkc3.  */
-typedef __complex float TCtype __attribute__ ((mode (KC)));
-
-#else
-typedef __complex float TCtype __attribute__ ((mode (TC)));
-#endif
+/* Override quad.h's definitions for 128-bit floating point type.  */
+#define TFtype _Float128
+#define TCtype _Complex _Float128
 
 /* Force the use of the VSX instruction set.  */
 #if defined(_ARCH_PPC) && (!defined(__VSX__) || !defined(__FLOAT128__))
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h
index fc24ac34502..a39c365d904 100644
--- a/libgcc/libgcc2.h
+++ b/libgcc/libgcc2.h
@@ -156,9 +156,14 @@ typedef		float XFtype	__attribute__ ((mode (XF)));
 typedef _Complex float XCtype	__attribute__ ((mode (XC)));
 #endif
 #if LIBGCC2_HAS_TF_MODE
+/* PowerPC would like to override this to be _Float128.  */
+#ifndef TFtype
 typedef		float TFtype	__attribute__ ((mode (TF)));
+#endif
+#ifndef TCtype
 typedef _Complex float TCtype	__attribute__ ((mode (TC)));
 #endif
+#endif
 
 typedef int cmp_return_type __attribute__((mode (__libgcc_cmp_return__)));
 typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__)));
diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h
index 3889bb44f1f..71f87d36ba9 100644
--- a/libgcc/soft-fp/quad.h
+++ b/libgcc/soft-fp/quad.h
@@ -65,7 +65,9 @@
 #define _FP_HIGHBIT_DW_Q	\
   ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_Q - 1) % _FP_W_TYPE_SIZE)
 
+#ifndef TFtype
 typedef float TFtype __attribute__ ((mode (TF)));
+#endif
 
 #if _FP_W_TYPE_SIZE < 64

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-17 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 21:52 [gcc(refs/users/meissner/heads/dmf004)] Patch libgcc to always use _Float128 and _Complex _Float128 on PowerPC Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
2022-11-09  5:32 Michael Meissner

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