diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2019-07-08 23:14:33 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2019-07-08 23:14:33 +0200 |
commit | c83faba13da6d67e6784b3781419cd0605700daf (patch) | |
tree | 7f72d03e9ff5409df427379540cd6774fcb7e799 /gcc | |
parent | 9d9171550a399cac1d1717cf1bd31ec3750b0dfd (diff) | |
download | gcc-c83faba13da6d67e6784b3781419cd0605700daf.zip gcc-c83faba13da6d67e6784b3781419cd0605700daf.tar.gz gcc-c83faba13da6d67e6784b3781419cd0605700daf.tar.bz2 |
rs6000: Ignore GFXOPT (and GPOPT) for choosing machine
The function rs6000_machine_from_flags chooses what .machine string to
used based on the rs6000_isa_flags flags. For that it checks for each
ISA level if something for its ISA_*_MASKS is selected.
This does not work for GFXOPT and GPOPT: these are set as flags in
ISA_2_5_MASKS_SERVER, but they aren't actually new there, they just
are not selected by default for older ISAs (they were optional).
This patch makes OPTION_MASK_PPC_GFXOPT and OPTION_MASK_PPC_GPOPT not
influence the .machine selection.
* config/rs6000/rs6000.c (rs6000_machine_from_flags): Ignore
OPTION_MASK_PPC_GFXOPT and OPTION_MASK_PPC_GPOPT for selecting the
.machine string.
From-SVN: r273246
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 22 |
2 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d86ec3f..db0cf7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-07-08 Segher Boessenkool <segher@kernel.crashing.org> + * config/rs6000/rs6000.c (rs6000_machine_from_flags): Ignore + OPTION_MASK_PPC_GFXOPT and OPTION_MASK_PPC_GPOPT for selecting the + .machine string. + +2019-07-08 Segher Boessenkool <segher@kernel.crashing.org> + PR rtl-optimization/88233 * common.opt (fsplit-wide-types-early): New option. * common/config/rs6000/rs6000-common.c diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f59f3a9..bec3436 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5547,22 +5547,26 @@ const char *rs6000_machine; const char * rs6000_machine_from_flags (void) { - if ((rs6000_isa_flags & (ISA_FUTURE_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) - != 0) + HOST_WIDE_INT flags = rs6000_isa_flags; + + /* Disable the flags that should never influence the .machine selection. */ + flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT); + + if ((flags & (ISA_FUTURE_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0) return "future"; - if ((rs6000_isa_flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) != 0) + if ((flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) != 0) return "power9"; - if ((rs6000_isa_flags & (ISA_2_7_MASKS_SERVER & ~ISA_2_6_MASKS_SERVER)) != 0) + if ((flags & (ISA_2_7_MASKS_SERVER & ~ISA_2_6_MASKS_SERVER)) != 0) return "power8"; - if ((rs6000_isa_flags & (ISA_2_6_MASKS_SERVER & ~ISA_2_5_MASKS_SERVER)) != 0) + if ((flags & (ISA_2_6_MASKS_SERVER & ~ISA_2_5_MASKS_SERVER)) != 0) return "power7"; - if ((rs6000_isa_flags & (ISA_2_5_MASKS_SERVER & ~ISA_2_4_MASKS)) != 0) + if ((flags & (ISA_2_5_MASKS_SERVER & ~ISA_2_4_MASKS)) != 0) return "power6"; - if ((rs6000_isa_flags & (ISA_2_4_MASKS & ~ISA_2_1_MASKS)) != 0) + if ((flags & (ISA_2_4_MASKS & ~ISA_2_1_MASKS)) != 0) return "power5"; - if ((rs6000_isa_flags & ISA_2_1_MASKS) != 0) + if ((flags & ISA_2_1_MASKS) != 0) return "power4"; - if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) != 0) + if ((flags & OPTION_MASK_POWERPC64) != 0) return "ppc64"; return "ppc"; } |