diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-12-02 02:23:41 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-12-02 02:23:41 +0100 |
commit | 81094bcb458cd005474156b5e0bc0c7c72387bbc (patch) | |
tree | cdcd4fecad61e8dda6c9355a0de6a641a311f28c /gcc | |
parent | dff125ebb56f4b21a5b40d3aa6f9ccb7446cbdb4 (diff) | |
download | gcc-81094bcb458cd005474156b5e0bc0c7c72387bbc.zip gcc-81094bcb458cd005474156b5e0bc0c7c72387bbc.tar.gz gcc-81094bcb458cd005474156b5e0bc0c7c72387bbc.tar.bz2 |
rs6000: Set rs6000_cpu correctly (PR43871)
We set rs6000_cpu based on tune_index, but it should be cpu_index.
This patch fixes it.
PR target/43871
* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
rs6000_cpu based on cpu_index, not tune_index.
From-SVN: r255349
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11ccbfb..da0c32e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2017-12-01 Segher Boessenkool <segher@kernel.crashing.org> + PR target/43871 + * config/rs6000/rs6000.c (rs6000_option_override_internal): Set + rs6000_cpu based on cpu_index, not tune_index. + +2017-12-01 Segher Boessenkool <segher@kernel.crashing.org> + * final.c (output_asm_name): Print insn_cost. Shorten output. Print which_alternative instead of which_alternative + 1. (output_asm_insn): Print an extra tab if the template is short. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5f5f6d5..2adf406 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4184,8 +4184,8 @@ rs6000_option_override_internal (bool global_init_p) } } - gcc_assert (tune_index >= 0); - rs6000_cpu = processor_target_table[tune_index].processor; + gcc_assert (cpu_index >= 0); + rs6000_cpu = processor_target_table[cpu_index].processor; if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3 || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64 |