[gcc(refs/users/meissner/heads/work027)] PowerPC: Set long double size for IBM/IEEE.
Michael Meissner
meissner@gcc.gnu.org
Thu Nov 12 14:34:19 GMT 2020
https://gcc.gnu.org/g:47fad0773269fb7b50b526f5b0d20329c32d1e12
commit 47fad0773269fb7b50b526f5b0d20329c32d1e12
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Nov 12 09:32:47 2020 -0500
PowerPC: Set long double size for IBM/IEEE.
gcc/
2020-11-12 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (rs6000_option_override_internal): If the
user explicitly used -mabi=ieeelongdouble or -mabi=ibmlongdouble,
set the long double size to 128.
* doc/invoke.texi (PowerPC options): Document that an explicit
-mabi=ieeelongdouble or -mabi=ibmlongdouble implicitly sets
-mlong-double-128.
Diff:
---
gcc/config/rs6000/rs6000.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 35e9c844e17..6edd17a0b69 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4131,8 +4131,13 @@ rs6000_option_override_internal (bool global_init_p)
/* Use long double size to select the appropriate long double. We use
TYPE_PRECISION to differentiate the 3 different long double types. We map
- 128 into the precision used for TFmode. */
- int default_long_double_size = (RS6000_DEFAULT_LONG_DOUBLE_SIZE == 64
+ 128 into the precision used for TFmode.
+
+ If the user explicitly used -mabi=ieeelongdouble or -mabi=ibmlongdouble,
+ but the compiler was configured for default 64-bit long doubles, set the
+ long double to be 128. */
+ int default_long_double_size = ((RS6000_DEFAULT_LONG_DOUBLE_SIZE == 64
+ && !global_options_set.x_rs6000_ieeequad)
? 64
: FLOAT_PRECISION_TFmode);
More information about the Gcc-cvs
mailing list