Patchwork [ix86/gcc-4_4-branch] PATCH: Properly detect Atom

login
register
mail settings
Submitter H.J. Lu
Date Oct. 30, 2010, 1:02 a.m.
Message ID <20101030010240.GA25221@intel.com>
Download mbox | patch
Permalink /patch/69642/
State New
Headers show

Comments

H.J. Lu - Oct. 30, 2010, 1:02 a.m.
Hi,

I checked in this patch into ix86/gcc-4_4-branch to properly detect
Atom.


H.J.
---

Patch

diff --git a/gcc/ChangeLog.ix86 b/gcc/ChangeLog.ix86
index 0111b68..4163e5c 100644
--- a/gcc/ChangeLog.ix86
+++ b/gcc/ChangeLog.ix86
@@ -1,3 +1,8 @@ 
+2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/i386/driver-i386.c (host_detect_local_cpu): Properly
+	detect Atom.
+
 2010-08-13  H.J. Lu  <hongjiu.lu@intel.com>
 
 	Backport from mainline
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 0364bea..768e854 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -520,7 +520,7 @@  const char *host_detect_local_cpu (int argc, const char **argv)
     case PROCESSOR_PENTIUMPRO:
       if (has_longmode)
 	/* It is Core 2 or Atom.  */
-	cpu = (model == 28) ? "atom" : "core2";
+	cpu = (model == 28 || model == 38) ? "atom" : "core2";
       else if (arch)
 	{
 	  if (has_sse3)