This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Correcting Athlon (SSE3 and Fx) support for configure/build of gcc
- From: Felyza Wishbringer <felyza at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jan 2010 14:40:19 -0500
- Subject: Correcting Athlon (SSE3 and Fx) support for configure/build of gcc
Presently, support for the k8/Athlon64/Opteron SSE3 enhanced AMD
processors and the Athlon-fx is in the compiler. This is wonderful,
however, when trying to use them during compile of gcc itself, they
aren't recognized as valid options by the configure and build. The
present configure scripts do not recognize them as options, although
they are listed in
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
It appears that when the amdfam10 models were added to configure, that
sse3 support was overlooked. Regarding the fx model, it was added to the
messages regarding supported processors, however when the script is
supposed to be setting up the flags, it is not being set up.
Regarding stability outlooks, all instruction set options used by the
SSE3 family processors are used in the amdfam10 and barcelona models.
The amdfam10 and barcelona models are fully supported by the configure
scripts already, therefor any stability issues found in the SSE3 family
would be present in the already-fully-supported-by-configure amdfam10 cpus.
Having this applied allows building with the *-sse3 or athlon-fx cpu
types listed in documentation. The athlon64-sse3 models of note are the
Athlon 64X2 5000+ Black Edition and Athlon 64X2 6400+ Black Edition
which were top sellers for several months; and they support SSE3 but not
SSE4 or ABM. Due to lack of SSE4 or ABM, they should not use the
amdfam10 cpu type during configure.
For reference, relevant bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42786
* 2010-01-19 Felyza Wishbringer <fwishbringer@gmail.com>
- fix support for configure with athlon-fx cpu type (42786)
- add support for configure with *-sse3 cpu types (42786)
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 156045)
+++ gcc/config.gcc (working copy)
@@ -1144,7 +1144,7 @@
tmake_file="${tmake_file} i386/t-linux64"
need_64bit_hwint=yes
case X"${with_cpu}" in
-
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;;
X)
if test x$with_cpu_64 = x; then
@@ -1153,7 +1153,7 @@
;;
*)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported
values:" 1>&2
- echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8
opteron athlon64 athlon-fx" 1>&2
+ echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8
opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1
;;
esac
@@ -1260,7 +1260,7 @@
need_64bit_hwint=yes
use_gcc_stdint=wrap
case X"${with_cpu}" in
-
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;;
X)
if test x$with_cpu_64 = x; then
@@ -1269,7 +1269,7 @@
;;
*)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported
values:" 1>&2
- echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron
athlon64 athlon-fx" 1>&2
+ echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron
athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1
;;
esac
@@ -1339,7 +1339,7 @@
if test x$enable_targets = xall; then
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
case X"${with_cpu}" in
-
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;;
X)
if test x$with_cpu_64 = x; then
@@ -1348,7 +1348,7 @@
;;
*)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported
values:" 1>&2
- echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8
opteron athlon64 athlon-fx" 1>&2
+ echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8
opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1
;;
esac
@@ -2629,8 +2629,11 @@
case ${target_noncanonical} in
amdfam10-*|barcelona-*)
with_cpu=amdfam10
+ ;;
+ k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
+ with_cpu=k8-sse3
;;
- k8-*|opteron-*|athlon_64-*)
+ k8-*|opteron-*|athlon64-*|athlon_fx-*)
with_cpu=k8
;;
athlon_xp-*|athlon_mp-*|athlon_4-*)
@@ -2676,7 +2679,10 @@
amdfam10-*|barcelona-*)
with_cpu=amdfam10
;;
- k8-*|opteron-*|athlon_64-*)
+ k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
+ with_cpu=k8-sse3
+ ;;
+ k8-*|opteron-*|athlon64-*|athlon_fx-*)
with_cpu=k8
;;
nocona-*)
@@ -2970,7 +2976,7 @@
esac
# OK
;;
- "" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx |
nocona | core2 | atom | generic)
+ "" | amdfam10 | barcelona | k8-sse3 | opteron-sse3 | athlon64-sse3 |
k8 | opteron | athlon64 | athlon-fx | nocona | core2 | atom | generic)
# OK
;;
*)