aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorPeter Bergner <bergner@linux.ibm.com>2022-03-04 09:03:44 -0600
committerPeter Bergner <bergner@linux.ibm.com>2022-03-04 09:04:21 -0600
commitcb16bc3b5f34733ef9bbf8d2e3acacdecb099a62 (patch)
treeb1614c76bd39cb049682a22f202139ad285e0f6a /gcc/config
parente28eb86c18ed765dceb3c56471a848e9f0e120ff (diff)
downloadgcc-cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62.zip
gcc-cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62.tar.gz
gcc-cb16bc3b5f34733ef9bbf8d2e3acacdecb099a62.tar.bz2
rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble [PR104208, PR87496]
The glibc build is showing a build error due to extra "error" checking from my PR87496 fix. That checking was overeager, disallowing setting the long double size to 64-bits if the 128-bit long double ABI had already been specified. Now we only emit an error if we specify a 128-bit long double ABI if our long double size is not 128 bits. This also fixes an erroneous error when -mabi=ieeelongdouble is used and ISA 2.06 is not enabled, but the long double size has been changed to 64 bits. 2022-03-04 Peter Bergner <bergner@linux.ibm.com> gcc/ PR target/87496 PR target/104208 * config/rs6000/rs6000.cc (rs6000_option_override_internal): Make the ISA 2.06 requirement for -mabi=ieeelongdouble conditional on -mlong-double-128. Move the -mabi=ieeelongdouble and -mabi=ibmlongdouble error checking from here... * common/config/rs6000/rs6000-common.cc (rs6000_handle_option): ... to here. gcc/testsuite/ PR target/87496 PR target/104208 * gcc.target/powerpc/pr104208-1.c: New test. * gcc.target/powerpc/pr104208-2.c: Likewise. * gcc.target/powerpc/pr87496-2.c: Swap long double options to trigger the expected error. * gcc.target/powerpc/pr87496-3.c: Likewise.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/rs6000.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index a855e8c..5b100a8 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -4178,13 +4178,6 @@ rs6000_option_override_internal (bool global_init_p)
; /* The option value can be seen when cl_target_option_restore is called. */
else if (rs6000_long_double_type_size == 128)
rs6000_long_double_type_size = FLOAT_PRECISION_TFmode;
- else if (OPTION_SET_P (rs6000_ieeequad))
- {
- if (global_options.x_rs6000_ieeequad)
- error ("%qs requires %qs", "-mabi=ieeelongdouble", "-mlong-double-128");
- else
- error ("%qs requires %qs", "-mabi=ibmlongdouble", "-mlong-double-128");
- }
/* Set -mabi=ieeelongdouble on some old targets. In the future, power server
systems will also set long double to be IEEE 128-bit. AIX and Darwin
@@ -4194,13 +4187,13 @@ rs6000_option_override_internal (bool global_init_p)
if (!OPTION_SET_P (rs6000_ieeequad))
rs6000_ieeequad = TARGET_IEEEQUAD_DEFAULT;
- else
+ else if (TARGET_LONG_DOUBLE_128)
{
if (global_options.x_rs6000_ieeequad
&& (!TARGET_POPCNTD || !TARGET_VSX))
error ("%qs requires full ISA 2.06 support", "-mabi=ieeelongdouble");
- if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128)
+ if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT)
{
/* Determine if the user can change the default long double type at
compilation time. You need GLIBC 2.32 or newer to be able to