diff mbox

[1,of,5] , Add suport for PowerPC IEEE 128-bit floating point

Message ID 20140715182853.GA3263@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner July 15, 2014, 6:28 p.m. UTC
This patch is the machine independent patch for libgcc to add IEEE 128-bit
floating point to the PowerPC.

This patch allows the PowerPC port to override the TFtype in quad.h to allow it
to use __float128 instead of attribute ((TF)).  On most of the PowerPC systems,
TFmode by default is the IBM extended double format.

2014-07-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* soft-fp/quad.h (TFtype): Allow TFmode to be overridden by the
	machine dependent files.

Comments

Joseph Myers July 25, 2014, 9:38 p.m. UTC | #1
On Tue, 15 Jul 2014, Michael Meissner wrote:

> This patch is the machine independent patch for libgcc to add IEEE 128-bit
> floating point to the PowerPC.
> 
> This patch allows the PowerPC port to override the TFtype in quad.h to allow it
> to use __float128 instead of attribute ((TF)).  On most of the PowerPC systems,
> TFmode by default is the IBM extended double format.
> 
> 2014-07-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* soft-fp/quad.h (TFtype): Allow TFmode to be overridden by the
> 	machine dependent files.

soft-fp patches need to go in glibc first, with libgcc's soft-fp copy then 
being updated from glibc.
Michael Meissner July 28, 2014, 5:21 p.m. UTC | #2
On Fri, Jul 25, 2014 at 09:38:49PM +0000, Joseph S. Myers wrote:
> On Tue, 15 Jul 2014, Michael Meissner wrote:
> 
> > This patch is the machine independent patch for libgcc to add IEEE 128-bit
> > floating point to the PowerPC.
> > 
> > This patch allows the PowerPC port to override the TFtype in quad.h to allow it
> > to use __float128 instead of attribute ((TF)).  On most of the PowerPC systems,
> > TFmode by default is the IBM extended double format.
> > 
> > 2014-07-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
> > 
> > 	* soft-fp/quad.h (TFtype): Allow TFmode to be overridden by the
> > 	machine dependent files.
> 
> soft-fp patches need to go in glibc first, with libgcc's soft-fp copy then 
> being updated from glibc.

Yes, but I wanted to make sure the compiler side of things were acceptable
before going down the route.

In this case, I can actually work around it, by defining 'TF' to be 'KF', but
that is ugly.
diff mbox

Patch

Index: libgcc/soft-fp/quad.h
===================================================================
--- libgcc/soft-fp/quad.h	(.../svn+ssh://meissner@gcc.gnu.org/svn/gcc/trunk)	(revision 212529)
+++ libgcc/soft-fp/quad.h	(working copy)
@@ -66,7 +66,13 @@ 
 #define _FP_HIGHBIT_DW_Q	\
   ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_Q - 1) % _FP_W_TYPE_SIZE)
 
+/* Allow machine to override the name of the 128-bit floating point type.
+   PowerPC long double historically used a pair of doubles on Linux/BSD
+   systems, so use the __float128 type if it is available, instead of
+   TFmode.  */
+#ifndef TFtype
 typedef float TFtype __attribute__ ((mode (TF)));
+#endif
 
 #if _FP_W_TYPE_SIZE < 64