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 <meiss...@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. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797
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)