This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/59587: cpu_names in i386.c is accessed with wrong index
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Dec 2013 15:12:34 +0100
- Subject: Re: PATCH: PR target/59587: cpu_names in i386.c is accessed with wrong index
- Authentication-results: sourceware.org; auth=none
- References: <20131224130844 dot GA13233 at intel dot com>
On Tue, Dec 24, 2013 at 2:08 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> cpu_names in i386.c is only used by ix86_function_specific_print which
> accesses it with enum processor_type index. But cpu_names is defined as
> array with enum target_cpu_default index. This patch adds processor
> names to processor_target_table and uses processor_target_table instead
> of cpu_names. It removes cpu_names and target_cpu_default. Tested on
> Linux/x86-64. OK to install?
Wait a moment,
it looks to me that TARGET_CPU_DEFAULT has to be synchronized with
const processor_alias_table, so we are able to define various ISA
extensions by selecting TARGET_CPU_*. The TARGET_CPU_DEFAULT can then
be used to select extensions in the same way as PROCESSOR_* selects
tuning for certain processor.
Uros.