+2018-12-07 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/87496
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
+ -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
+ Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
+ * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
+ require -mlong-double-128.
+
2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
}
else if (rs6000_long_double_type_size == 128)
rs6000_long_double_type_size = FLOAT_PRECISION_TFmode;
+ else if (global_options_set.x_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
else
{
- if (!TARGET_POPCNTD || !TARGET_VSX)
+ 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)
This is not likely to work if your system defaults to using IEEE
extended-precision long double. If you change the long double type
from IEEE extended-precision, the compiler will issue a warning unless
-you use the @option{-Wno-psabi} option.
+you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
+to be enabled.
@item -mabi=ieeelongdouble
@opindex mabi=ieeelongdouble
This is not likely to work if your system defaults to using IBM
extended-precision long double. If you change the long double type
from IBM extended-precision, the compiler will issue a warning unless
-you use the @option{-Wno-psabi} option.
+you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
+to be enabled.
@item -mabi=elfv1
@opindex mabi=elfv1
This is not likely to work if your system defaults to using IEEE
extended-precision long double. If you change the long double type
from IEEE extended-precision, the compiler will issue a warning unless
-you use the @option{-Wno-psabi} option.
+you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
+to be enabled.
@item -mabi=ieeelongdouble
@opindex mabi=ieeelongdouble
This is not likely to work if your system defaults to using IBM
extended-precision long double. If you change the long double type
from IBM extended-precision, the compiler will issue a warning unless
-you use the @option{-Wno-psabi} option.
+you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128}
+to be enabled.
@item -mabi=elfv1
@opindex mabi=elfv1
+2018-12-07 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/87496
+ * gcc.target/powerpc/pr87496.c: Rename from this...
+ * gcc.target/powerpc/pr87496-1.c: ...to this. Update comment.
+ * gcc.target/powerpc/pr87496-2.c: New test.
+ * gcc.target/powerpc/pr87496-3.c: New test.
+
2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/sve/override_sve_width_1.c: New test.
-/* PR target/87496.c */
+/* PR target/87496 */
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
--- /dev/null
+/* PR target/87496 */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
+/* { dg-options "-O2 -mcpu=power7 -mabi=ieeelongdouble -mlong-double-64 -Wno-psabi" } */
+
+int i;
+
+/* { dg-error "'-mabi=ieeelongdouble' requires '-mlong-double-128'" "PR87496" { target *-*-* } 0 } */
--- /dev/null
+/* PR target/87496 */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-options "-O2 -mabi=ibmlongdouble -mlong-double-64 -Wno-psabi" } */
+
+int i;
+
+/* { dg-error "'-mabi=ibmlongdouble' requires '-mlong-double-128'" "PR87496" { target *-*-* } 0 } */