diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0404-Support-unknown-Intel-family-0x6-CPUs.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0404-Support-unknown-Intel-family-0x6-CPUs.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0404-Support-unknown-Intel-family-0x6-CPUs.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0404-Support-unknown-Intel-family-0x6-CPUs.patch new file mode 100644 index 0000000000..df628a76e1 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0404-Support-unknown-Intel-family-0x6-CPUs.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From d70a1b2dbd4a959f37b5e3b3b4ca297960ac31fa Mon Sep 17 00:00:00 2001 | ||
2 | From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Wed, 8 Jun 2011 13:50:59 +0000 | ||
4 | Subject: [PATCH] Support unknown Intel family 0x6 CPUs. | ||
5 | |||
6 | 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> | ||
7 | |||
8 | Backport from mainline | ||
9 | 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> | ||
10 | |||
11 | * config/i386/driver-i386.c (host_detect_local_cpu): Support | ||
12 | unknown Intel family 0x6 CPUs. | ||
13 | |||
14 | |||
15 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174810 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
16 | |||
17 | index 4fc6b45..985a6ff 100644 | ||
18 | --- a/gcc/config/i386/driver-i386.c | ||
19 | +++ b/gcc/config/i386/driver-i386.c | ||
20 | @@ -587,9 +587,22 @@ const char *host_detect_local_cpu (int argc, const char **argv) | ||
21 | default: | ||
22 | if (arch) | ||
23 | { | ||
24 | - if (has_ssse3) | ||
25 | - /* If it is an unknown CPU with SSSE3, assume Core 2. */ | ||
26 | - cpu = "core2"; | ||
27 | + /* This is unknown family 0x6 CPU. */ | ||
28 | + if (has_avx) | ||
29 | + /* Assume Sandy Bridge. */ | ||
30 | + cpu = "corei7-avx"; | ||
31 | + else if (has_sse4_2) | ||
32 | + /* Assume Core i7. */ | ||
33 | + cpu = "corei7"; | ||
34 | + else if (has_ssse3) | ||
35 | + { | ||
36 | + if (has_movbe) | ||
37 | + /* Assume Atom. */ | ||
38 | + cpu = "atom"; | ||
39 | + else | ||
40 | + /* Assume Core 2. */ | ||
41 | + cpu = "core2"; | ||
42 | + } | ||
43 | else if (has_sse3) | ||
44 | /* It is Core Duo. */ | ||
45 | cpu = "pentium-m"; | ||
46 | -- | ||
47 | 1.7.0.4 | ||
48 | |||