diff mbox

, PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #03

Message ID 20151023173332.GD18348@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner Oct. 23, 2015, 5:33 p.m. UTC
This patch defines 3 macros to tell the user whether -mfloat128 is enabled or
not, and whether long double is IBM extended double or IEEE 128-bit floating
point.

I have built the compiler with this patch and the previous subpatches (1 and
2).  I have bootstrapped the compiler with all 16 subpatches installed, and
there were no regressions.  Is it ok to install in the trunk?

2015-10-22  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	__FLOAT128__ if -mfloat128. Define __LONG_DOUBLE_IEEE128__ if long
	double is IEEE 128-bit. Define __LONG_DOUBLE_IBM128__ if long
	double is IBM extended double.

Comments

David Edelsohn Oct. 29, 2015, 2:28 p.m. UTC | #1
On Fri, Oct 23, 2015 at 1:33 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> This patch defines 3 macros to tell the user whether -mfloat128 is enabled or
> not, and whether long double is IBM extended double or IEEE 128-bit floating
> point.
>
> I have built the compiler with this patch and the previous subpatches (1 and
> 2).  I have bootstrapped the compiler with all 16 subpatches installed, and
> there were no regressions.  Is it ok to install in the trunk?
>
> 2015-10-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
>         __FLOAT128__ if -mfloat128. Define __LONG_DOUBLE_IEEE128__ if long
>         double is IEEE 128-bit. Define __LONG_DOUBLE_IBM128__ if long
>         double is IBM extended double.

Okay.

Thanks, David
diff mbox

Patch

Index: gcc/config/rs6000/rs6000-c.c
===================================================================
--- gcc/config/rs6000/rs6000-c.c	(revision 229182)
+++ gcc/config/rs6000/rs6000-c.c	(working copy)
@@ -408,6 +408,8 @@  rs6000_cpu_cpp_builtins (cpp_reader *pfi
     builtin_define ("__RSQRTE__");
   if (TARGET_FRSQRTES)
     builtin_define ("__RSQRTEF__");
+  if (TARGET_FLOAT128)
+    builtin_define ("__FLOAT128__");
 
   if (TARGET_EXTRA_BUILTINS && cpp_get_options (pfile)->lang != CLK_ASM)
     {
@@ -481,6 +483,11 @@  rs6000_cpu_cpp_builtins (cpp_reader *pfi
     {
       builtin_define ("__LONG_DOUBLE_128__");
       builtin_define ("__LONGDOUBLE128");
+
+      if (TARGET_IEEEQUAD)
+	builtin_define ("__LONG_DOUBLE_IEEE128__");
+      else
+	builtin_define ("__LONG_DOUBLE_IBM128__");
     }
 
   switch (TARGET_CMODEL)