Message ID | EB4625145972F94C9680D8CADD651615787D3293@SATLEXDAG02.amd.com |
---|---|
State | New |
Headers | show |
On Thu, Jul 31, 2014 at 1:28 PM, Gopalasubramanian, Ganesh <Ganesh.Gopalasubramanian@amd.com> wrote: > The below patch handles the AMD's cpuid family information. > With the information from cpuid, BTVER2 cpu for -march=native flag is handled. But, looking to processor_alias_table in config/i386/i386.c, only PROCESSOR_BTVER2 defines PTA_MOVBE. According to this, the logic is already correct, so the patch is not needed. Uros.
> But, looking to processor_alias_table in config/i386/i386.c, only > PROCESSOR_BTVER2 defines PTA_MOVBE. According to this, the logic is already correct, so the patch is not needed. We are evaluating bdver4 cpu. Bdver4 also supports MOVBE. I will submit patch for bdver4 PTA after our evaluation. Ganesh.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6223bd6..3f8bb2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-31 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> + + * tree-sra.c (host_detect_local_cpu): Handle AMD's extended family + information. Handle BTVER2 cpu with cpuid family value. + 2014-07-30 Martin Jambor <mjambor@suse.cz> * tree-sra.c (sra_ipa_modify_assign): Change type of the first diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 1c6385f..21ae1f3 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -432,7 +432,8 @@ const char *host_detect_local_cpu (int argc, const char **argv) model = (eax >> 4) & 0x0f; family = (eax >> 8) & 0x0f; - if (vendor == signature_INTEL_ebx) + if ((vendor == signature_INTEL_ebx) || + (vendor == signature_AMD_ebx)) { unsigned int extended_model, extended_family; @@ -576,7 +577,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) if (name == signature_NSC_ebx) processor = PROCESSOR_GEODE; - else if (has_movbe) + else if (has_movbe && family == 22) processor = PROCESSOR_BTVER2; else if (has_avx2) processor = PROCESSOR_BDVER4;