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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 26 Dec 2013 09:01:31 -0800
- 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> <CAFULd4bjm3=Pq2jtfo=F9VsS4d0G=2y=uywWtrPCK2=dLu4dZQ at mail dot gmail dot com> <CAMe9rOpArtBd3LvGYD2S9UdR=85Jr=3fsO_bkS-j+S9eTL8ceA at mail dot gmail dot com> <CAFULd4ZxXX397sA9NqRZP7rwRqwneT9DPzahn3MFHYFRfDHTWA at mail dot gmail dot com> <CAMe9rOrJqRBn1LyR_9cchRK_4WmeB6gDUFT1eiy6FujJkHa4sA at mail dot gmail dot com> <CAMe9rOqwjO4CJ1UjRR1-ANVqzrTMx1JSfmKSwmwjcYi7w=m=1A at mail dot gmail dot com> <CAFULd4aHtOb=xL43dRhTTJ-44rEeid-+gTchpoz4AZiyHzt3ZA at mail dot gmail dot com>
On Wed, Dec 25, 2013 at 12:49 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> TARGET_CPU_DEFAULT is left over for 32-bit target before --with-arch=
>> and --with-cpu= were added. Today, -mtune=xxx -march=xxx are
>> always passed to cc1 by GCC driver. If cc1 is run by hand and
>> -mtune=xxx -march=xxx aren't passed to cc1, we should do
>>
>> 1. For 64-bit, it should be the same as -mtune=generic -march=x86_64
>> are passed.
>> 2. For 32-bit, it should be the same as -mtune=cpu -march=cpu are
>> passed, where "cpu" is the target cpu used to configure GCC,
>> like i386 in i386-linux, i486 in i486-linux, .... But there is no i786
>> cpu. i786 is treated as i686. If SUBTARGET32_DEFAULT_CPU
>> is defined, it should be the same -mtune=SUBTARGET32_DEFAULT_CPU
>> -march=SUBTARGET32_DEFAULT_CPU.
>>
>> Here is the patch to implement this.
>
> Let's do one step at a time. So, let's split the patch back to target/59587 fix:
>
I am not formally submitting the patch to define target_cpu_default
for i[34567]86 targets:
http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=c5d2157c8c9181286441317cf55570d8e33741c2
since it has no impact on x86-64 nor when GCC driver
is used. It only changes the default arch/tune when
cc1/cc1plus is run by hand, which is very unusual.
I will leave the patch on hjl/arch branch just in case
someone is interested.
Thanks.
--
H.J.