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]

Re: c/547: __i686__ macros have disappeared


On Mon, Sep 18, 2000 at 09:18:00AM +0000, Joseph Myers wrote:
> When building on x86 with -mcpu=pentiumpro -march=pentiumpro, GCC
> predefines macros including __pentiumpro__ and __tune_pentiumpro__.
> However, CVS GCC does not define __i686__ or __i686, which were
> defined by GCC 2.95.2.  Glibc uses the macro __i686__.
> 
> I think the macros __i686__ and __i686 should be defined again when
> building for arch=i686, and the macros __i586__ and __i586 for
> arch=i586 (in addition to the current __pentiumpro__ and __pentium__
> macros).

I agree.



r~


        * config/i386/i386.h (CPP_CPU_SPEC): Define i586 and i686 symbols 
        in addition to pentium and pentiumpro symbols.
        (CPP_CPU_DEFAULT_SPEC): Likewise.

Index: i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.130
diff -c -p -d -r1.130 i386.h
*** i386.h	2000/09/18 09:50:19	1.130
--- i386.h	2000/09/19 14:39:53
*************** extern int ix86_arch;
*** 382,391 ****
  #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__"
--- 382,391 ----
  #define CPP_CPU_DEFAULT_SPEC "-D__tune_i486__"
  #endif
  #if TARGET_CPU_DEFAULT == 2
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_i586__ -D__tune_pentium__"
  #endif
  #if TARGET_CPU_DEFAULT == 3
! #define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__"
  #endif
  #if TARGET_CPU_DEFAULT == 4
  #define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__"
*************** extern int ix86_arch;
*** 404,419 ****
  %{!ansi:-Di386} -D__i386 -D__i386__ \
  %{march=i386:%{!mcpu*:-D__tune_i386__ }}\
  %{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\
! %{march=pentium|march=i586:-D__pentium -D__pentium__ \
!   %{!mcpu*:-D__tune_pentium__ }}\
! %{march=pentiumpro|march=i686:-D__pentiumpro -D__pentiumpro__ \
!   %{!mcpu*:-D__tune_pentiumpro__ }}\
  %{march=k6:-D__k6 -D__k6__ %{!mcpu*:-D__tune_k6__ }}\
  %{march=athlon:-D__athlon -D__athlon__ %{!mcpu*:-D__tune_athlon__ }}\
  %{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=athlon:-D__tune_athlon__ }\
  %{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}"
--- 404,420 ----
  %{!ansi:-Di386} -D__i386 -D__i386__ \
  %{march=i386:%{!mcpu*:-D__tune_i386__ }}\
  %{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\
! %{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__ \
!   %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ }}\
! %{march=pentiumpro|march=i686:-D__i686 -D__i686__ \
!   -D__pentiumpro -D__pentiumpro__ \
!   %{!mcpu*:-D__tune_i686__ -D__tune_pentiumpro__ }}\
  %{march=k6:-D__k6 -D__k6__ %{!mcpu*:-D__tune_k6__ }}\
  %{march=athlon:-D__athlon -D__athlon__ %{!mcpu*:-D__tune_athlon__ }}\
  %{m386|mcpu=i386:-D__tune_i386__ }\
  %{m486|mcpu=i486:-D__tune_i486__ }\
! %{mpentium|mcpu=pentium|mcpu=i586:-D__tune_i586__ -D__tune_pentium__ }\
! %{mpentiumpro|mcpu=pentiumpro|mcpu=i686:-D__tune_i686__ -D__tune_pentiumpro__ }\
  %{mcpu=k6:-D__tune_k6__ }\
  %{mcpu=athlon:-D__tune_athlon__ }\
  %{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}"

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