This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Make -m[34]86 behave as documented.


In the documentation (invoke.texi) -m[34]86 is described as synonyms for
-mcpu=i[34]86. In reality they act as synonyms for -march=i[34]86.

Another problem is that the compiler generates code for the Pentium
processor as default (sets -march=pentium) in stead of the processor type
chosen at config time (from the target basename; see configure.in.)

ChangeLog:

Wed Aug 25 09:31:37 CEST 1999 Niels Kristian Bech Jensen <nkbj@image.dk>
	* i386.c (override_options): Change PROCESSOR_PENTIUM_STRING to
	PROCESSOR_DEFAULT_STRING.
	* i386.h: Make -m[34]86 behave as -mcpu=i[34]86.

*** gcc-2.95/gcc/config/i386/i386.c~	Thu May 27 14:11:59 1999
--- gcc-2.95/gcc/config/i386/i386.c	Wed Aug 25 09:29:01 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;
      }
  
*** gcc-2.95/gcc/config/i386/i386.h~	Sun Apr 25 13:43:49 1999
--- gcc-2.95/gcc/config/i386/i386.h	Wed Aug 25 09:30:06 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,335 ****
  #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)} \
--- 329,335 ----
  #define CPP_CPU_SPEC "\
  -Acpu(i386) -Amachine(i386) \
  %{!ansi:-Di386} -D__i386 -D__i386__ \
! %{m486:%(cpp_486)} %{mcpu=i486:%(cpp_486)} \
  %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} \
  %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} \
  %{mcpu=k6:%(cpp_k6)} \

-- 
Niels Kristian Bech Jensen -- nkbj@image.dk -- http://www.image.dk/~nkbj/

----------->>  Stop software piracy --- use free software!  <<-----------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]