This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix up -march=native handling under KVM (PR target/61570)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 22 Jun 2014 20:23:50 +0200
- Subject: Re: [PATCH] Fix up -march=native handling under KVM (PR target/61570)
- Authentication-results: sourceware.org; auth=none
- References: <20140620214224 dot GH31640 at tucnak dot redhat dot com> <CAMe9rOq01LH9rCJ--tG17xWXfJ5WPQeqDCP-=KwCrQuV1gbPJw at mail dot gmail dot com> <20140621180711 dot GJ31640 at tucnak dot redhat dot com>
On Sat, Jun 21, 2014 at 8:07 PM, Jakub Jelinek <email@example.com> wrote:
>> > --- gcc/config/i386/driver-i386.c.jj 2014-05-14 14:45:54.000000000 +0200
>> > +++ gcc/config/i386/driver-i386.c 2014-06-20 18:59:57.805006358 +0200
>> > @@ -745,6 +745,11 @@ const char *host_detect_local_cpu (int a
>> > /* Assume Core 2. */
>> > cpu = "core2";
>> > }
>> > + else if (has_longmode)
>> > + /* Perhaps some emulator? Assume x86-64, otherwise gcc
>> > + -march=native would be unusable for 64-bit compilations,
>> > + as all the CPUs below are 32-bit only. */
>> > + cpu = "x86-64";
>> > else if (has_sse3)
>> > /* It is Core Duo. */
>> > cpu = "pentium-m";
>> > Jakub
>> host_detect_local_cpu guesses the cpu based on the real processors.
>> It doesn't work with emulators due to some conflicts. This isn't the
>> only only place which has the same issue. I prefer something like
> I'm fine with your patch too. Let's wait what Uros (or other i?86
> maintainers) pick up.
This looks OK to me.