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
This commit is contained in:
Segher Boessenkool 2017-12-02 02:23:41 +01:00 committed by Segher Boessenkool
parent dff125ebb5
commit 81094bcb45
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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