Gentoo Archives: gentoo-commits

From: "Mark Loeser (halcy0n)" <halcy0n@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.3.3/gentoo: 93_all_gcc43-pr37179.patch README.history
Date: Sat, 20 Jun 2009 18:52:39
Message-Id: E1MI5g4-0004q5-Kr@stork.gentoo.org
1 halcy0n 09/06/20 18:52:36
2
3 Modified: README.history
4 Added: 93_all_gcc43-pr37179.patch
5 Log:
6 Add patches to fix -march=native on geode CPUs; bug #270409
7
8 Revision Changes Path
9 1.8 src/patchsets/gcc/4.3.3/gentoo/README.history
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.3/gentoo/README.history?rev=1.8&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.3/gentoo/README.history?rev=1.8&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.3/gentoo/README.history?r1=1.7&r2=1.8
14
15 Index: README.history
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.3.3/gentoo/README.history,v
18 retrieving revision 1.7
19 retrieving revision 1.8
20 diff -u -r1.7 -r1.8
21 --- README.history 24 May 2009 19:37:04 -0000 1.7
22 +++ README.history 20 Jun 2009 18:52:36 -0000 1.8
23 @@ -1,3 +1,6 @@
24 +1.3 pending
25 + + 93_all_gcc43-pr37179.patch
26 +
27 1.2 24.05.2009
28 + 79_all_arm-PR37436.patch
29 + 92_all_gcc43-pr40105.patch
30
31
32
33 1.1 src/patchsets/gcc/4.3.3/gentoo/93_all_gcc43-pr37179.patch
34
35 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.3/gentoo/93_all_gcc43-pr37179.patch?rev=1.1&view=markup
36 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.3/gentoo/93_all_gcc43-pr37179.patch?rev=1.1&content-type=text/plain
37
38 Index: 93_all_gcc43-pr37179.patch
39 ===================================================================
40 Index: branches/gcc-4_3-branch/gcc/ChangeLog
41 ===================================================================
42 --- branches/gcc-4_3-branch/gcc/ChangeLog (revision 147521)
43 +++ branches/gcc-4_3-branch/gcc/ChangeLog (revision 147522)
44 @@ -1,3 +1,12 @@
45 +2009-05-14 Uros Bizjak <ubizjak@×××××.com>
46 +
47 + PR target/37179
48 + * config/i386/driver-i386.c (vendor_signatures): New enum.
49 + (processor_signatures): Ditto.
50 + (host_detect_local_cpu): Use vendor_signatures and
51 + processor_signatures enums. For SIG_AMD vendor, check for
52 + SIG_GEODE processor signature to detect geode processor.
53 +
54 2009-05-12 Tobias Burnus <burnus@×××××.de>
55
56 PR bootstrap/40061
57 Index: branches/gcc-4_3-branch/gcc/config/i386/driver-i386.c
58 ===================================================================
59 --- branches/gcc-4_3-branch/gcc/config/i386/driver-i386.c (revision 147521)
60 +++ branches/gcc-4_3-branch/gcc/config/i386/driver-i386.c (revision 147522)
61 @@ -1,5 +1,5 @@
62 /* Subroutines for the gcc driver.
63 - Copyright (C) 2006, 2007 Free Software Foundation, Inc.
64 + Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
65
66 This file is part of GCC.
67
68 @@ -151,6 +151,17 @@
69 return describe_cache (l1_sizekb, l1_line, assoc);
70 }
71
72 +enum vendor_signatures
73 +{
74 + SIG_INTEL = 0x756e6547 /* Genu */,
75 + SIG_AMD = 0x68747541 /* Auth */
76 +};
77 +
78 +enum processor_signatures
79 +{
80 + SIG_GEODE = 0x646f6547 /* Geod */
81 +};
82 +
83 /* This will be called by the spec parser in gcc.c when it sees
84 a %:local_cpu_detect(args) construct. Currently it will be called
85 with either "arch" or "tune" as argument depending on if -march=native
86 @@ -231,27 +242,35 @@
87
88 if (!arch)
89 {
90 - if (vendor == *(unsigned int*) "Auth")
91 + if (vendor == SIG_AMD)
92 cache = detect_caches_amd (ext_level);
93 - else if (vendor == *(unsigned int*) "Genu")
94 + else if (vendor == SIG_INTEL)
95 cache = detect_caches_intel (max_level);
96 }
97
98 - if (vendor == *(unsigned int*) "Auth")
99 + if (vendor == SIG_AMD)
100 {
101 - processor = PROCESSOR_PENTIUM;
102 + unsigned int name;
103
104 - if (has_mmx)
105 + /* Detect geode processor by its processor signature. */
106 + if (ext_level > 0x80000001)
107 + __cpuid (0x80000002, name, ebx, ecx, edx);
108 + else
109 + name = 0;
110 +
111 + if (name == SIG_GEODE)
112 + processor = PROCESSOR_GEODE;
113 + else if (has_sse4a)
114 + processor = PROCESSOR_AMDFAM10;
115 + else if (has_sse2 || has_longmode)
116 + processor = PROCESSOR_K8;
117 + else if (has_3dnowp)
118 + processor = PROCESSOR_ATHLON;
119 + else if (has_mmx)
120 processor = PROCESSOR_K6;
121 - if (has_3dnowp)
122 - processor = PROCESSOR_ATHLON;
123 - if (has_sse2 || has_longmode)
124 - processor = PROCESSOR_K8;
125 - if (has_sse4a)
126 - processor = PROCESSOR_AMDFAM10;
127 + else
128 + processor = PROCESSOR_PENTIUM;
129 }
130 - else if (vendor == *(unsigned int*) "Geod")
131 - processor = PROCESSOR_GEODE;
132 else
133 {
134 switch (family)