From: Segher Boessenkool Date: Sat, 14 Apr 2018 21:13:20 +0000 (+0200) Subject: rs6000: Disable -m[no-]direct-move (PR85293) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57f108f5a1e1b2eacb9033b22f3c76f9faf3503b;p=gcc.git rs6000: Disable -m[no-]direct-move (PR85293) The -mno-direct-move option causes a lot of problems, since it forces us to be able to generate code for p8 and up with some crucial instructions missing. This patch removes the -m[no-]direct-move options so that the user cannot put us into this unexpected situation anymore. Internally we still have all the same flags, and they are automatically set based on -mcpu; getting rid of that is a lot more work and will have to wait for GCC 9 (in some places the flag is used to see if we are compiling for a p8 _at all_). PR target/85293 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated. * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move and -mno-direct-move. gcc/testsuite/ PR target/85293 * gcc.target/powerpc/pr80098-2.c: Remove -mdirect-move. Remove the corresponding dg-error clause. * gcc.target/powerpc/pr80098-3.c: Ditto. * gcc.target/powerpc/pr80103-1.c: Delete. From-SVN: r259386 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbd731bc415..9b7f84582a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-04-14 Segher Boessenkool + + PR target/85293 + * config/rs6000/rs6000.opt (mdirect-move): Make deprecated. + * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move + and -mno-direct-move. + 2018-04-13 Paul A. Clarke PR target/83402 diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 006f16cbe3e..ace8a477550 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -534,8 +534,7 @@ Target Report Mask(CRYPTO) Var(rs6000_isa_flags) Use ISA 2.07 Category:Vector.AES and Category:Vector.SHA2 instructions. mdirect-move -Target Report Mask(DIRECT_MOVE) Var(rs6000_isa_flags) -Use ISA 2.07 direct move between GPR & VSX register instructions. +Target Undocumented Mask(DIRECT_MOVE) Var(rs6000_isa_flags) Ignore Warn(%qs is deprecated) mhtm Target Report Mask(HTM) Var(rs6000_isa_flags) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0194f48aced..8c0d275626f 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1101,7 +1101,7 @@ See RS/6000 and PowerPC Options. -mpointers-to-nested-functions -mno-pointers-to-nested-functions @gol -msave-toc-indirect -mno-save-toc-indirect @gol -mpower8-fusion -mno-mpower8-fusion -mpower8-vector -mno-power8-vector @gol --mcrypto -mno-crypto -mhtm -mno-htm -mdirect-move -mno-direct-move @gol +-mcrypto -mno-crypto -mhtm -mno-htm @gol -mquad-memory -mno-quad-memory @gol -mquad-memory-atomic -mno-quad-memory-atomic @gol -mcompat-align-parm -mno-compat-align-parm @gol @@ -23359,7 +23359,7 @@ following options: -mpopcntb -mpopcntd -mpowerpc64 @gol -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol -msimple-fpu -mmulhw -mdlmzb -mmfpgpr -mvsx @gol --mcrypto -mdirect-move -mhtm -mpower8-fusion -mpower8-vector @gol +-mcrypto -mhtm -mpower8-fusion -mpower8-vector @gol -mquad-memory -mquad-memory-atomic -mfloat128 -mfloat128-hardware} The particular options set for any particular CPU varies between @@ -23501,14 +23501,6 @@ Enable the use (disable) of the built-in functions that allow direct access to the cryptographic instructions that were added in version 2.07 of the PowerPC ISA. -@item -mdirect-move -@itemx -mno-direct-move -@opindex mdirect-move -@opindex mno-direct-move -Generate code that uses (does not use) the instructions to move data -between the general purpose registers and the vector/scalar (VSX) -registers that were added in version 2.07 of the PowerPC ISA. - @item -mhtm @itemx -mno-htm @opindex mhtm diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1369288a803..38920451dd8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-04-14 Segher Boessenkool + + PR target/85293 + * gcc.target/powerpc/pr80098-2.c: Remove -mdirect-move. Remove the + corresponding dg-error clause. + * gcc.target/powerpc/pr80098-3.c: Ditto. + * gcc.target/powerpc/pr80103-1.c: Delete. + 2018-04-14 Andre Vehreschild PR fortran/81773 diff --git a/gcc/testsuite/gcc.target/powerpc/pr80098-2.c b/gcc/testsuite/gcc.target/powerpc/pr80098-2.c index 88f7ee49398..5a6421b3844 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr80098-2.c +++ b/gcc/testsuite/gcc.target/powerpc/pr80098-2.c @@ -1,9 +1,8 @@ /* { dg-do compile { target { powerpc64*-*-* } } } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ -/* { dg-options "-mcpu=power8 -mno-power8-vector -mdirect-move -mcrypto" } */ +/* { dg-options "-mcpu=power8 -mno-power8-vector -mcrypto" } */ int i; -/* { dg-error "'-mno-power8-vector' turns off '-mdirect-move'" "PR80098" { target *-*-* } 0 } */ /* { dg-error "'-mno-power8-vector' turns off '-mcrypto'" "PR80098" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr80098-3.c b/gcc/testsuite/gcc.target/powerpc/pr80098-3.c index aae8fa18114..e62418bd061 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr80098-3.c +++ b/gcc/testsuite/gcc.target/powerpc/pr80098-3.c @@ -1,9 +1,8 @@ /* { dg-do compile { target { powerpc64*-*-* } } } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-mcpu=power7 -mno-vsx -mdirect-move -mcrypto" } */ +/* { dg-options "-mcpu=power7 -mno-vsx -mcrypto" } */ int i; -/* { dg-error "'-mno-vsx' turns off '-mdirect-move'" "PR80098" { target *-*-* } 0 } */ /* { dg-error "'-mno-vsx' turns off '-mcrypto'" "PR80098" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr80103-1.c b/gcc/testsuite/gcc.target/powerpc/pr80103-1.c deleted file mode 100644 index a25d617ae8b..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/pr80103-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ -/* { dg-require-effective-target powerpc_p9vector_ok } */ -/* { dg-options "-mpower9-minmax -mno-direct-move" } */ -/* { dg-excess-errors "expect error due to conflicting target options" } */ -/* Since the error message is not associated with a particular line - number, we cannot use the dg-error directive and cannot specify a - regexp to describe the expected error message. The expected error - message is: "-mpower9-minmax requires -mdirect-move" */ - -int a; -void b (__attribute__ ((__vector_size__ (16))) char c) -{ - a = ((__attribute__ ((__vector_size__ (2 * sizeof (long)))) long) c)[0]; -}