This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86-64 as a subtarget of the i386 configuration
- From: Jan Hubicka <jh at suse dot cz>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 30 Apr 2002 18:23:52 +0200
- Subject: Re: x86-64 as a subtarget of the i386 configuration
- References: <3CCD9BBC.69F92C9E@moene.indiv.nluug.nl>
> L.S.,
>
> Yesterday, a poster to the comp.lang.fortran news group urged compiler
> writers to work on (Fortran) compilers for the upcoming AMD Hammer
> series of CPU's.
>
> Naturally, I answered that request with: "Done."
>
> To show him (and others) that g77 does (as of 3.1) support the Hammer
> series, I built a cross-compiler on my Alpha box and generated some
> assembler from that.
>
> However, rethinking this, if I can get Pentium 4 SSE code from my
> standard native build of GCC on i686-pc-linux-gnu by using the flags
> -march=pentium4 -mfpmath=sse, it cannot be that hard to get Hammer code
> using -march=x86-64 ?
>
> Alas, I can't find a suitable subtarget switch (in config/i386/i386.h).
>
> Does it exist ? If not, is there a fundamental reason why it can't
> exist (e.g., because the Hammer is a 64-bit processor) ?
There will be -march switch once the hammers specs will be out, so we
can do the tunning, but thats just tunning. IE you can generate 32bit
code tuned for hammer.
To generate 64bit code, use -m64. By default i386 compiler is configured to
not support -m64, so you need to configure compiler with
--target=x86_64-unknown-linux.
At the moment -march=athlon is best choice for hammers I guess as the
microarchitecture is supposed to be similar.
Honza
>
> --
> Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
> Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
> Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)