[PATCH] add __amd64__ predefined symbols

Jan Hubicka jh@suse.cz
Sat Apr 26 22:15:00 GMT 2003


> On Sat, Apr 26, 2003 at 12:39:37PM -0700, David O'Brien wrote:
> > I'd like to commit this to mainline, and the appropriate patch for 3.3
> > branch also.  FreeBSD is calling the platform by the AMD marketing name.
> > 
> > 
> > 2003-04-27  David O'Brien  <obrien@FreeBSD.org>
> > 
> > 	* config/i386/i386.h (builtin_define): Add __amd64 and __amd64__.
> > 
> > Index: config/i386/i386.h
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
> > retrieving revision 1.333
> > diff -u -r1.333 i386.h
> > --- config/i386/i386.h	17 Apr 2003 23:18:55 -0000	1.333
> > +++ config/i386/i386.h	26 Apr 2003 19:37:39 -0000
> > @@ -520,6 +520,8 @@
> >  	  builtin_assert ("machine=x86_64");			\
> >  	  builtin_define ("__x86_64");				\
> >  	  builtin_define ("__x86_64__");			\
> > +	  builtin_define ("__amd64");				\
> > +	  builtin_define ("__amd64__");				\
> 
> Why do we need both flags?  Isn't __amd64__ enough?
The naming change is bit problematic.  We still have only one choice to
define for "machine" and I don't think we can change it from "x86_64"
settings at this stage.  Still I guess it is least confusing to the user
if both of the macors were defined.

Adding __amd64 only is OK for mainlnie and branch.
Andreas, we also probably can update ABI document regarding that...

Honza
> 
> Andreas
> -- 
>  Andreas Jaeger
>   SuSE Labs aj@suse.de
>    private aj@arthur.inka.de
>     http://www.suse.de/~aj



More information about the Gcc-patches mailing list