aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwarakanath Rajagopal <dwarak.rajagopal@amd.com>2007-02-09 16:56:45 +0000
committerHarsha Jagasia <hjagasia@gcc.gnu.org>2007-02-09 16:56:45 +0000
commit35a63f213123b668ffc007210f623fd36f91ad9a (patch)
tree13bf22c1ab4bcfb277920b4f7ee5d8d77c3fb9e0
parent3e19841a04bd4758706e7a387cf0c3ca311c9fb2 (diff)
downloadgcc-35a63f213123b668ffc007210f623fd36f91ad9a.zip
gcc-35a63f213123b668ffc007210f623fd36f91ad9a.tar.gz
gcc-35a63f213123b668ffc007210f623fd36f91ad9a.tar.bz2
driver-i386.c: Turn on -mtune=native for AMDFAM10.
2007-02-09 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> * config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10. (bit_SSE4a): New. From-SVN: r121763
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/driver-i386.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 92903f5..de6a753 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-09 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ * config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10.
+ (bit_SSE4a): New.
+
2007-02-09 Nathan Sidwell <nathan@codesourcery.com>
Richard Sandiford <richard@codesourcery.com>
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index d623c2c..df43512 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -1,5 +1,5 @@
/* Subroutines for the gcc driver.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
@@ -40,6 +40,7 @@ const char *host_detect_local_cpu (int argc, const char **argv);
#define bit_SSE3 (1 << 0)
#define bit_SSSE3 (1 << 9)
+#define bit_SSE4a (1 << 6)
#define bit_CMPXCHG16B (1 << 13)
#define bit_3DNOW (1 << 31)
@@ -68,7 +69,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
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_ssse3 = 0, has_cmov = 0;
- unsigned char has_longmode = 0, has_cmpxchg8b = 0;
+ unsigned char has_longmode = 0, has_cmpxchg8b = 0, has_sse4a = 0;
unsigned char is_amd = 0;
unsigned int family = 0;
bool arch;
@@ -120,6 +121,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
has_3dnow = !!(edx & bit_3DNOW);
has_3dnowp = !!(edx & bit_3DNOWP);
has_longmode = !!(edx & bit_LM);
+ has_sse4a = !!(ecx & bit_SSE4a);
}
is_amd = vendor == *(unsigned int*)"Auth";
@@ -132,6 +134,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
processor = PROCESSOR_ATHLON;
if (has_sse2 || has_longmode)
processor = PROCESSOR_K8;
+ if (has_sse4a)
+ processor = PROCESSOR_AMDFAM10;
}
else
{
@@ -266,6 +270,9 @@ const char *host_detect_local_cpu (int argc, const char **argv)
case PROCESSOR_NOCONA:
cpu = "nocona";
break;
+ case PROCESSOR_AMDFAM10:
+ cpu = "amdfam10";
+ break;
case PROCESSOR_GENERIC32:
case PROCESSOR_GENERIC64:
cpu = "generic";