Date: Wed, 16 Mar 2011 12:40:58 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219697 - head/contrib/gcc/config/i386 Message-ID: <201103161240.p2GCewjA086783@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Wed Mar 16 12:40:58 2011 New Revision: 219697 URL: http://svn.freebsd.org/changeset/base/219697 Log: Fix -march/-mtune=native autodetection for Intel Core 2 CPUs Obtained from: gcc 4.3 (partial rev. 119454; GPLv2) MFC after: 2 weeks Modified: head/contrib/gcc/config/i386/driver-i386.c Modified: head/contrib/gcc/config/i386/driver-i386.c ============================================================================== --- head/contrib/gcc/config/i386/driver-i386.c Wed Mar 16 08:58:09 2011 (r219696) +++ head/contrib/gcc/config/i386/driver-i386.c Wed Mar 16 12:40:58 2011 (r219697) @@ -39,6 +39,7 @@ const char *host_detect_local_cpu (int a #define bit_SSE2 (1 << 26) #define bit_SSE3 (1 << 0) +#define bit_SSSE3 (1 << 9) #define bit_CMPXCHG16B (1 << 13) #define bit_3DNOW (1 << 31) @@ -66,7 +67,7 @@ const char *host_detect_local_cpu (int a unsigned int vendor; unsigned int ext_level; unsigned char has_mmx = 0, has_3dnow = 0, has_3dnowp = 0, has_sse = 0; - unsigned char has_sse2 = 0, has_sse3 = 0, has_cmov = 0; + unsigned char has_sse2 = 0, has_sse3 = 0, has_ssse3 = 0, has_cmov = 0; unsigned char has_longmode = 0, has_cmpxchg8b = 0; unsigned char is_amd = 0; unsigned int family = 0; @@ -107,6 +108,7 @@ const char *host_detect_local_cpu (int a has_sse = !!(edx & bit_SSE); has_sse2 = !!(edx & bit_SSE2); has_sse3 = !!(ecx & bit_SSE3); + has_ssse3 = !!(ecx & bit_SSSE3); /* We don't care for extended family. */ family = (eax >> 8) & ~(1 << 4); @@ -148,7 +150,9 @@ const char *host_detect_local_cpu (int a /* We have no idea. Use something reasonable. */ if (arch) { - if (has_sse3) + if (has_ssse3) + cpu = "core2"; + else if (has_sse3) { if (has_longmode) cpu = "nocona"; @@ -230,6 +234,9 @@ const char *host_detect_local_cpu (int a cpu = "generic"; } break; + case PROCESSOR_GEODE: + cpu = "geode"; + break; case PROCESSOR_K6: if (has_3dnow) cpu = "k6-3";
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103161240.p2GCewjA086783>