1 |
commit: 391ec5099ee6d0c678943b70641d2b3e3c82ced4 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 31 14:57:20 2020 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 18:38:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=391ec509 |
7 |
|
8 |
catalyst: Enable and fix CPU_FLAGS_X86 |
9 |
|
10 |
In commit be6d7f0b7f0a (use profile for CPU_FLAGS_X86 where appropriate) |
11 |
we disabled setting CPU_FLAGS_X86 to avoid overriding the profile's |
12 |
defaults (and in some cases, overriding incorrectly). |
13 |
|
14 |
While that is undoubtedly the correct thing to do for the generic |
15 |
classes (e.g., arch_amd64) it does not make sense for the classes |
16 |
specific to a particular microarchitecture, unless we expect the |
17 |
defaults of CPU_FLAGS_X86 to change in the future, which seems highly |
18 |
unlikely. |
19 |
|
20 |
It also is the wrong thing to do for x86, which does not have a default |
21 |
CPU_FLAGS_X86. |
22 |
|
23 |
Fixes: be6d7f0b7f0a (use profile for CPU_FLAGS_X86 where appropriate) |
24 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
25 |
|
26 |
catalyst/arch/amd64.py | 14 +++++--------- |
27 |
catalyst/arch/x86.py | 13 ++++++------- |
28 |
2 files changed, 11 insertions(+), 16 deletions(-) |
29 |
|
30 |
diff --git a/catalyst/arch/amd64.py b/catalyst/arch/amd64.py |
31 |
index 73bf8b18..980be552 100644 |
32 |
--- a/catalyst/arch/amd64.py |
33 |
+++ b/catalyst/arch/amd64.py |
34 |
@@ -11,51 +11,47 @@ class arch_amd64(generic_amd64): |
35 |
def __init__(self,myspec): |
36 |
generic_amd64.__init__(self,myspec) |
37 |
self.settings["COMMON_FLAGS"]="-O2 -pipe" |
38 |
- #lines like this appears to be trying to set the profile default, better to use the profile |
39 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
40 |
|
41 |
class arch_nocona(generic_amd64): |
42 |
"improved version of Intel Pentium 4 CPU with 64-bit extensions, MMX, SSE, SSE2 and SSE3 support" |
43 |
def __init__(self,myspec): |
44 |
generic_amd64.__init__(self,myspec) |
45 |
self.settings["COMMON_FLAGS"]="-O2 -march=nocona -pipe" |
46 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
47 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse","sse2","sse3"]} |
48 |
|
49 |
-# Requires gcc 4.3 to use this class |
50 |
class arch_core2(generic_amd64): |
51 |
"Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 support" |
52 |
def __init__(self,myspec): |
53 |
generic_amd64.__init__(self,myspec) |
54 |
self.settings["COMMON_FLAGS"]="-O2 -march=core2 -pipe" |
55 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","ssse3"]} |
56 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse","sse2","sse3","ssse3"]} |
57 |
|
58 |
class arch_k8(generic_amd64): |
59 |
"generic k8, opteron and athlon64 support" |
60 |
def __init__(self,myspec): |
61 |
generic_amd64.__init__(self,myspec) |
62 |
self.settings["COMMON_FLAGS"]="-O2 -march=k8 -pipe" |
63 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]} |
64 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","3dnow","3dnowext","sse","sse2"]} |
65 |
|
66 |
class arch_k8_sse3(generic_amd64): |
67 |
"improved versions of k8, opteron and athlon64 with SSE3 support" |
68 |
def __init__(self,myspec): |
69 |
generic_amd64.__init__(self,myspec) |
70 |
self.settings["COMMON_FLAGS"]="-O2 -march=k8-sse3 -pipe" |
71 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]} |
72 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","3dnow","3dnowext","sse","sse2","sse3"]} |
73 |
|
74 |
class arch_amdfam10(generic_amd64): |
75 |
"AMD Family 10h core based CPUs with x86-64 instruction set support" |
76 |
def __init__(self,myspec): |
77 |
generic_amd64.__init__(self,myspec) |
78 |
self.settings["COMMON_FLAGS"]="-O2 -march=amdfam10 -pipe" |
79 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2","3dnow"]} |
80 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","3dnow","3dnowext","sse","sse2","sse3","sse4a"]} |
81 |
|
82 |
class arch_x32(generic_amd64): |
83 |
"builder class for generic x32 (Intel and AMD)" |
84 |
def __init__(self,myspec): |
85 |
generic_amd64.__init__(self,myspec) |
86 |
self.settings["COMMON_FLAGS"]="-O2 -pipe" |
87 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
88 |
|
89 |
def register(): |
90 |
"inform main catalyst program of the contents of this plugin" |
91 |
|
92 |
diff --git a/catalyst/arch/x86.py b/catalyst/arch/x86.py |
93 |
index de9142f7..4e50fea9 100644 |
94 |
--- a/catalyst/arch/x86.py |
95 |
+++ b/catalyst/arch/x86.py |
96 |
@@ -63,29 +63,28 @@ class arch_pentium3(generic_x86): |
97 |
def __init__(self,myspec): |
98 |
generic_x86.__init__(self,myspec) |
99 |
self.settings["COMMON_FLAGS"]="-O2 -march=pentium3 -pipe" |
100 |
- self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse"]} |
101 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse"]} |
102 |
|
103 |
class arch_pentium4(generic_x86): |
104 |
"Intel Pentium 4 CPU with MMX, SSE and SSE2 support" |
105 |
def __init__(self,myspec): |
106 |
generic_x86.__init__(self,myspec) |
107 |
self.settings["COMMON_FLAGS"]="-O2 -march=pentium4 -pipe" |
108 |
- #lines like this appears to be trying to set the profile default, better to use the profile |
109 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
110 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse","sse2"]} |
111 |
|
112 |
class arch_pentium_m(generic_x86): |
113 |
"Intel Pentium M CPU with MMX, SSE and SSE2 support" |
114 |
def __init__(self,myspec): |
115 |
generic_x86.__init__(self,myspec) |
116 |
self.settings["COMMON_FLAGS"]="-O2 -march=pentium-m -pipe" |
117 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
118 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse","sse2"]} |
119 |
|
120 |
class arch_prescott(generic_x86): |
121 |
"improved version of Intel Pentium 4 CPU with MMX, SSE, SSE2 and SSE3 support" |
122 |
def __init__(self,myspec): |
123 |
generic_x86.__init__(self,myspec) |
124 |
self.settings["COMMON_FLAGS"]="-O2 -march=prescott -pipe" |
125 |
- #self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","sse","sse2"]} |
126 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","sse","sse2","sse3"]} |
127 |
|
128 |
class arch_k6(generic_x86): |
129 |
"AMD K6 CPU with MMX support" |
130 |
@@ -106,14 +105,14 @@ class arch_athlon(generic_x86): |
131 |
def __init__(self,myspec): |
132 |
generic_x86.__init__(self,myspec) |
133 |
self.settings["COMMON_FLAGS"]="-O2 -march=athlon -pipe" |
134 |
- self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow"]} |
135 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","3dnow","3dnowext"]} |
136 |
|
137 |
class arch_athlon_xp(generic_x86): |
138 |
"improved AMD Athlon CPU with MMX, 3DNow!, Enhanced 3DNow! and full SSE support" |
139 |
def __init__(self,myspec): |
140 |
generic_x86.__init__(self,myspec) |
141 |
self.settings["COMMON_FLAGS"]="-O2 -march=athlon-xp -pipe" |
142 |
- self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","3dnow","sse"]} |
143 |
+ self.settings["HOSTUSEEXPAND"]={"CPU_FLAGS_X86":["mmx","mmxext","3dnow","3dnowext","sse"]} |
144 |
|
145 |
def register(): |
146 |
"Inform main catalyst program of the contents of this plugin." |