This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 2.91.66 ix86 problems...
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: egcs 2.91.66 ix86 problems...
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 1 Jul 1999 20:43:47 -0700
- Cc: Richard Henderson <rth at twiddle dot net>, Cristian Gafton <gafton at redhat dot com>, egcs-patches at egcs dot cygnus dot com, drepper at cygnus dot com
- References: <19990625010313.A21198@twiddle.net> <8005.930298310@upchuck.cygnus.com>
On Fri, Jun 25, 1999 at 02:11:50AM -0600, Jeffrey A Law wrote:
> In message <19990625010313.A21198@twiddle.net>you write:
> > I'm thinking that the safest thing is to make the existing
> > tokens (__i586__ et al) control ISA, and the new token
> > control tuning. This makes existing practice correct if
> > not efficient.
> Sounds good.
How about this.
r~
* i386.h (CC1_CPU_SPEC): Don't add -march=foo.
(CPP_486_SPEC, CPP_586_SPEC): Delete.
(CPP_K6_SPEC, CPP_686_SPEC): Delete.
(CPP_CPU_DEFAULT_SPEC): Define to __tune_foo__.
(CPP_CPU_SPEC): Make -mcpu=foo define __tune_foo__. Make -march=bar
define __bar__ and related symbols.
(EXTRA_SPECS): Remove deleted specs.
Index: config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.61
diff -c -p -d -r1.61 i386.h
*** i386.h 1999/04/25 11:43:49 1.61
--- i386.h 1999/07/02 03:40:10
*************** extern int ix86_arch;
*** 293,327 ****
#ifndef CC1_CPU_SPEC
#define CC1_CPU_SPEC "\
%{!mcpu*: \
! %{m386:-mcpu=i386 -march=i386} \
! %{m486:-mcpu=i486 -march=i486} \
%{mpentium:-mcpu=pentium} \
%{mpentiumpro:-mcpu=pentiumpro}}"
#endif
- #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__"
-
#ifndef CPP_CPU_DEFAULT_SPEC
#if TARGET_CPU_DEFAULT == 1
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_486)"
#endif
#if TARGET_CPU_DEFAULT == 2
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_586)"
#endif
#if TARGET_CPU_DEFAULT == 3
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_686)"
#endif
#if TARGET_CPU_DEFAULT == 4
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_k6)"
#endif
#ifndef CPP_CPU_DEFAULT_SPEC
! #define CPP_CPU_DEFAULT_SPEC ""
#endif
#endif /* CPP_CPU_DEFAULT_SPEC */
--- 293,319 ----
#ifndef CC1_CPU_SPEC
#define CC1_CPU_SPEC "\
%{!mcpu*: \
! %{m386:-mcpu=i386} \
! %{m486:-mcpu=i486} \
%{mpentium:-mcpu=pentium} \
%{mpentiumpro:-mcpu=pentiumpro}}"
#endif
#ifndef CPP_CPU_DEFAULT_SPEC
#if TARGET_CPU_DEFAULT == 1
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_i486__"
#endif
#if TARGET_CPU_DEFAULT == 2
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_pentium__"
#endif
#if TARGET_CPU_DEFAULT == 3
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_pentiumpro__"
#endif
#if TARGET_CPU_DEFAULT == 4
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__"
#endif
#ifndef CPP_CPU_DEFAULT_SPEC
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_i386__"
#endif
#endif /* CPP_CPU_DEFAULT_SPEC */
*************** extern int ix86_arch;
*** 329,338 ****
#define CPP_CPU_SPEC "\
-Acpu(i386) -Amachine(i386) \
%{!ansi:-Di386} -D__i386 -D__i386__ \
! %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} \
! %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} \
! %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} \
! %{mcpu=k6:%(cpp_k6)} \
%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}"
#endif
--- 321,335 ----
#define CPP_CPU_SPEC "\
-Acpu(i386) -Amachine(i386) \
%{!ansi:-Di386} -D__i386 -D__i386__ \
! %{march=i486:-D__i486 -D__i486__} \
! %{march=pentium|march=i586:-D__pentium -D__pentium__} \
! %{march=pentiumpro|march=i686:-D__pentiumpro -D__pentiumpro__} \
! %{march=k6:-D__k6 -D__k6__} \
! %{m386|mcpu=i386:-D__tune_i386__} \
! %{m486|mcpu=i486:-D__tune_i486__} \
! %{mpentium|mcpu=pentium|mcpu=i586:-D__tune_pentium__} \
! %{mpentiumpro|mcpu=pentiumpro|mcpu=i686:-D__tune_pentiumpro__} \
! %{mcpu=k6:-D__tune_k6__} \
%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}"
#endif
*************** extern int ix86_arch;
*** 355,364 ****
#endif
#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 }, \
{ "cc1_cpu", CC1_CPU_SPEC }, \
--- 352,357 ----