This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fixes for some ix86 problems in gcc-2.95.2.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fixes for some ix86 problems in gcc-2.95.2.
- From: Niels Kristian Bech Jensen <nkbj at image dot dk>
- Date: Wed, 27 Oct 1999 13:55:13 +0200 (CEST)
This patch makes gcc-2.95.2 behave as documented on the ix86 platform.
For gcc/ChangeLog:
Tue Oct 26 13:29:29 1999 Niels Kristian Bech Jensen (nkbj@image.dk)
* config/i386/i386.c (override_options): Let ix86_arch_string
default to PROCESSOR_DEFAULT_STRING (as documented.)
* config/i386/i386.h (CC1_CPU_SPEC): Define -m386 and -m486 as
-mcpu=i386 and -mcpu=i486 respectively (as documented.)
(CPP_CPU_SPEC): Make sure -mcpu=<xxx> and -march=<xxx> flags are
handled correctly for preprocessor.
(CC1_SPEC): Define as cc1_cpu.
diff -x de.gmo -x fr.gmo -Nrc3p gcc-2.95.2-release/gcc/config/i386/i386.c gcc-2.95.2/gcc/config/i386/i386.c
*** gcc-2.95.2-release/gcc/config/i386/i386.c Tue Oct 26 13:05:52 1999
--- gcc-2.95.2/gcc/config/i386/i386.c Tue Oct 26 13:29:29 1999
*************** override_options ()
*** 291,297 ****
if (ix86_arch_string == 0)
{
! ix86_arch_string = PROCESSOR_PENTIUM_STRING;
if (ix86_cpu_string == 0)
ix86_cpu_string = PROCESSOR_DEFAULT_STRING;
}
--- 291,297 ----
if (ix86_arch_string == 0)
{
! ix86_arch_string = PROCESSOR_DEFAULT_STRING;
if (ix86_cpu_string == 0)
ix86_cpu_string = PROCESSOR_DEFAULT_STRING;
}
*************** override_options ()
*** 308,314 ****
if (i == ptt_size)
{
error ("bad value (%s) for -march= switch", ix86_arch_string);
! ix86_arch_string = PROCESSOR_PENTIUM_STRING;
ix86_arch = PROCESSOR_DEFAULT;
}
--- 308,314 ----
if (i == ptt_size)
{
error ("bad value (%s) for -march= switch", ix86_arch_string);
! ix86_arch_string = PROCESSOR_DEFAULT_STRING;
ix86_arch = PROCESSOR_DEFAULT;
}
diff -x de.gmo -x fr.gmo -Nrc3p gcc-2.95.2-release/gcc/config/i386/i386.h gcc-2.95.2/gcc/config/i386/i386.h
*** gcc-2.95.2-release/gcc/config/i386/i386.h Sun Apr 25 13:43:49 1999
--- gcc-2.95.2/gcc/config/i386/i386.h Tue Oct 26 13:29:29 1999
*************** extern int ix86_arch;
*** 293,300 ****
#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
--- 293,300 ----
#ifndef CC1_CPU_SPEC
#define CC1_CPU_SPEC "\
%{!mcpu*: \
! %{m386:-mcpu=i386} \
! %{m486:-mcpu=i486} \
%{mpentium:-mcpu=pentium} \
%{mpentiumpro:-mcpu=pentiumpro}}"
#endif
*************** extern int ix86_arch;
*** 329,343 ****
#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
#ifndef CC1_SPEC
! #define CC1_SPEC "%(cc1_spec) "
#endif
/* This macro defines names of additional specifications to put in the
--- 329,350 ----
#define CPP_CPU_SPEC "\
-Acpu(i386) -Amachine(i386) \
%{!ansi:-Di386} -D__i386 -D__i386__ \
! %{march=i486:%(cpp_486)} \
! %{march=pentium:%(cpp_586)} %{march=i586:%(cpp_586)} \
! %{march=pentiumpro:%(cpp_686)} %{march=i686:%(cpp_686)} \
! %{march=k6:%(cpp_k6)} \
! %{!march*:%{mcpu=i486:%(cpp_486)} \
! %{mcpu=pentium:%(cpp_586)} %{mcpu=i586:%(cpp_586)} \
! %{mcpu=pentiumpro:%(cpp_686)} %{mcpu=i686:%(cpp_686)} \
%{mcpu=k6:%(cpp_k6)} \
! %{!mcpu*:%{m486:%(cpp_486)} \
! %{mpentium:%(cpp_586)} \
! %{mpentiumpro:%(cpp_686)} \
! %{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}"
#endif
#ifndef CC1_SPEC
! #define CC1_SPEC "%(cc1_cpu) "
#endif
/* This macro defines names of additional specifications to put in the
--
Niels Kristian Bech Jensen -- nkbj@image.dk -- http://www.image.dk/~nkbj/
----------->> Stop software piracy --- use free software! <<-----------