diff options
author | Peter Bergner <bergner@linux.ibm.com> | 2018-12-12 17:14:13 +0000 |
---|---|---|
committer | Peter Bergner <bergner@linux.ibm.com> | 2018-12-12 17:14:13 +0000 |
commit | 42633dd04c2766d777ed797137130b4f9e5f9a2f (patch) | |
tree | 110c6564733d96a24cdc15f743364e4664a69efe | |
parent | 81a211808431285eb18d5990e142c6f0c2e688dd (diff) |
gcc/
Backport from mainline
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.
gcc/testsuite/
Backport from mainline
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@267061 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-1.c (renamed from gcc/testsuite/gcc.target/powerpc/pr87496.c) | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-2.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-3.c | 8 |
7 files changed, 59 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e13c2ecd130..88b180ab7e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,20 @@ +2018-12-12 Peter Bergner <bergner@linux.ibm.com> + + Backport from mainline + 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-05 Richard Biener <rguenther@suse.de> Backport from mainline 2018-09-20 Richard Sandiford <richard.sandiford@arm.com> - + PR tree-optimization/87288 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS into account when determining PEELING_FOR_NITERS. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0db729c0cbb..4d49930c39d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4631,6 +4631,13 @@ rs6000_option_override_internal (bool global_init_p) } 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 @@ -4642,7 +4649,8 @@ rs6000_option_override_internal (bool global_init_p) 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) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8944ad505ec..4675f9fb2f0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -22689,7 +22689,8 @@ Change the current ABI to use IBM extended-precision long double. 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 @@ -22697,7 +22698,8 @@ Change the current ABI to use IEEE extended-precision long double. 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 @@ -23990,7 +23992,8 @@ Change the current ABI to use IBM extended-precision long double. 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 @@ -23998,7 +24001,8 @@ Change the current ABI to use IEEE extended-precision long double. 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3758064c36b..789c9ee2013 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2018-12-12 Peter Bergner <bergner@linux.ibm.com> + + Backport from mainline + 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-11 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/88155 diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496.c b/gcc/testsuite/gcc.target/powerpc/pr87496-1.c index b2ebc467902..37ca8bb979a 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr87496.c +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-1.c @@ -1,4 +1,4 @@ -/* 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" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496-2.c b/gcc/testsuite/gcc.target/powerpc/pr87496-2.c new file mode 100644 index 00000000000..032c9549e4a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-2.c @@ -0,0 +1,9 @@ +/* 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 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496-3.c b/gcc/testsuite/gcc.target/powerpc/pr87496-3.c new file mode 100644 index 00000000000..1be39975f64 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-3.c @@ -0,0 +1,8 @@ +/* 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 } */ |