public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: x86-64 as a subtarget of the i386 configuration
       [not found] <3CCD9BBC.69F92C9E@moene.indiv.nluug.nl.suse.lists.egcs>
@ 2002-04-29 13:14 ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2002-04-29 13:14 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc

Toon Moene <toon@moene.indiv.nluug.nl> writes:
> 
> 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) ?

i386 and x86-64 ports are fully merged.

When you have a x86-64 compiler you can switch between 64bit and 32bit
mode using the -m64/-m32 switches.

x86-64 support isn't the default however for the i386 compiler, because
the 64bit support causes the compiler to be significantly slower on 
a 32bit host (it then works then a lot with long long internally and 
gcc's long long code generation on 32bit/i386 isn't exactly great and
the slowdown is really visible at least on my athlon) 

With a 64bit host like an Alpha it shouldn't be an issue though. Just
build your compiler for a x86-64 target and use -m32 when you want to 
compile for 32bit. You can also do the same on a i386 host if you can
tolerate a slower compiler.


-Andi


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: x86-64 as a subtarget of the i386 configuration
  2002-04-29 12:20 Toon Moene
@ 2002-04-30  9:39 ` Jan Hubicka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Hubicka @ 2002-04-30  9:39 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc

> 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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* x86-64 as a subtarget of the i386 configuration
@ 2002-04-29 12:20 Toon Moene
  2002-04-30  9:39 ` Jan Hubicka
  0 siblings, 1 reply; 3+ messages in thread
From: Toon Moene @ 2002-04-29 12:20 UTC (permalink / raw)
  To: gcc

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) ?

-- 
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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-30 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3CCD9BBC.69F92C9E@moene.indiv.nluug.nl.suse.lists.egcs>
2002-04-29 13:14 ` x86-64 as a subtarget of the i386 configuration Andi Kleen
2002-04-29 12:20 Toon Moene
2002-04-30  9:39 ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).