This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Support for the K6 as default cpu
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Support for the K6 as default cpu
- From: kthomas at gwdg dot de (Philipp Thomas)
- Date: Sat, 10 Apr 1999 04:22:07 GMT
Here is the patch that adds support for the K6 as default cpu. One
question though: I guess it's correct that I don't send the diff
of the regenerated gcc/configure ?
Sat Apr 10 04:50:00 1999 Philipp Thomas (kthomas@gwdg.de)
* egcs/config.sub: set basic_machine to i586 when
target_alias = k6-*
* egcs/gcc/configure.in: set target_cpu_default2=4 for
target_alias = k6-*
* egcs/gcc/configure/i386/i386.h (TARGET_SWITCHES): add
k6/no-k6, add no-pentium and no-pentiumpro
* egcs/gcc/configure/i386/i386.h (CC1_CPU_SPEC): add
specs for k6
* egcs/gcc/configure/i386/i386.h (CPP_K6_SPEC): New define
* egcs/gcc/configure/i386/i386.h (CPP_CPU_SPEC): include K6
* egcs/gcc/configure/i386/i386.h (EXTRA_SPECS): add cpp_k6
set to CPP_CPU_SPEC
* egcs/gcc/configure/i386/i386.h (CPP_CPU_DEFAULT_SPEC): set
to cpp_k6 for TARGET_CPU_DEFAULT=4
Index: egcs/config.sub
===================================================================
RCS file: /var/adm/cvsroot/cygnus/egcs/config.sub,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- egcs/config.sub 1999/04/06 19:26:03 1.1
+++ egcs/config.sub 1999/04/10 01:56:41 1.2
@@ -641,19 +641,19 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | nexen)
+ pentium | p5 | k5 | k6 | nexen)
basic_machine=i586-pc
;;
- pentiumpro | p6 | k6 | 6x86)
+ pentiumpro | p6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
- pentium-* | p5-* | k5-* | nexen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed
's/^[^-]*-//'`
;;
- pentiumpro-* | p6-* | k6-* | 6x86-*)
+ pentiumpro-* | p6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed
's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
Index: egcs/gcc/configure.in
===================================================================
RCS file: /var/adm/cvsroot/cygnus/egcs/gcc/configure.in,v
retrieving revision 1.1
diff -u -r1.1 configure.in
--- egcs/gcc/configure.in 1999/04/06 19:26:05 1.1
+++ egcs/gcc/configure.in 1999/04/10 02:40:21
@@ -3266,7 +3266,14 @@
target_cpu_default2=1
;;
i586-*-*)
- target_cpu_default2=2
+ case $target_alias in
+ k6-*-*)
+ target_cpu_default2=4
+ ;;
+ *)
+ target_cpu_default2=2
+ ;;
+ esac
;;
i686-*-* | i786-*-*)
target_cpu_default2=3
@@ -3657,7 +3664,7 @@
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
-ALL_LINGUAS="en_UK"
+ALL_LINGUAS="en_UK de"
# NLS support is still experimental, so disable it by default for
now.
AC_ARG_ENABLE(nls,
Index: egcs/gcc/config/i386/i386.h
===================================================================
RCS file: /var/adm/cvsroot/cygnus/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- egcs/gcc/config/i386/i386.h 1999/04/06 19:26:20 1.1
+++ egcs/gcc/config/i386/i386.h 1999/04/10 02:16:38 1.2
@@ -186,8 +186,12 @@
{ "no-386", 0, "" },
\
{ "486", 0, "Optimize for i80486" },
\
{ "no-486", 0, "" },
\
+ { "k6", 0, "Optimize for K6/K6-2/K6 III" },
\
+ { "no-k6", 0, "" },
\
{ "pentium", 0, "Optimize for Pentium" },
\
+ { "no-pentium", 0, "" },
\
{ "pentiumpro", 0, "Optimize for Pentium Pro, Pentium
II" },\
+ { "no-pentiumpro", 0, "" },
\
{ "rtd", MASK_RTD, "Alternate calling
convention" },\
{ "no-rtd", -MASK_RTD, "Use normal calling
convention" },\
{ "align-double", MASK_ALIGN_DOUBLE, "Align some
doubles on dword boundary" },\
@@ -298,6 +302,8 @@
%{mno-486:-mcpu=i386 -march=i386} \
%{m486:-mcpu=i486 -march=i486} \
%{mno-386:-mcpu=i486 -march=i486} \
+%{mno-k6:-mcpu=i486 -march=i486} \
+%{mk6:-mcpu=k6} \
%{mno-pentium:-mcpu=i486 -march=i486} \
%{mpentium:-mcpu=pentium} \
%{mno-pentiumpro:-mcpu=pentium} \
@@ -307,6 +313,8 @@
#define CPP_486_SPEC "%{!ansi:-Di486} -D__i486 -D__i486__"
#define CPP_586_SPEC "%{!ansi:-Di586 -Dpentium} \
-D__i586 -D__i586__ -D__pentium -D__pentium__"
+#define CPP_K6_SPEC "%{!ansi:-Di586 -Dk6} \
+ -D__i586 -D__i586__ -D__k6 -D__k6__"
#define CPP_686_SPEC "%{!ansi:-Di686 -Dpentiumpro} \
-D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__"
@@ -320,10 +328,14 @@
#if TARGET_CPU_DEFAULT == 3
#define CPP_CPU_DEFAULT_SPEC "%(cpp_686)"
#else
+#if TARGET_CPU_DEFAULT == 4
+#define CPP_CPU_DEFAULT_SPEC "%(cpp_k6)"
+#else
#define CPP_CPU_DEFAULT_SPEC ""
#endif
#endif
#endif
+#endif
#endif /* CPP_CPU_DEFAULT_SPEC */
#ifndef CPP_CPU_SPEC
@@ -331,9 +343,10 @@
-Acpu(i386) -Amachine(i386) \
%{!ansi:-Di386} -D__i386 -D__i386__ \
%{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} \
+%{mk6:%(cpp_k6)} %{mcpu=k6:%(cpp_k6)} \
%{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} \
%{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} \
-%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}"
+%{!mcpu*:%{!m486:%{!mk6:%{!mpentium*:%(cpp_cpu_default)}}}}"
#endif
#ifndef CC1_SPEC
@@ -357,6 +370,7 @@
#define EXTRA_SPECS
\
{ "cpp_486", CPP_486_SPEC},
\
{ "cpp_586", CPP_586_SPEC},
\
+ { "cpp_k6", CPP_K6_SPEC},
\
{ "cpp_686", CPP_686_SPEC},
\
{ "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC },
\
{ "cpp_cpu", CPP_CPU_SPEC },
\
Philipp Thomas
--
caffeine low .... brain halted