This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Seeking doc on K6 code generation
- To: Steve Snyder <swsnyder at home dot com>, gcc at gcc dot gnu dot org
- Subject: Re: Seeking doc on K6 code generation
- From: Jean Francois Martinez <jfm2 at club-internet dot fr>
- Date: Sun, 3 Jun 2001 19:38:52 +0200
- References: <01060308291900.10597@mercury.snydernet.lan>
- Reply-To: jfm2 at club-internet dot fr
On Sunday 3 June 2001 17:29, Steve Snyder wrote:
> Hello.
>
> I am using the version of GCC that came with RedHat v7.1 and, yes, I know
> that compiler is not an official GCC release. That said, where can I find
> documentation of the code generation for the K6 (-mcpu=k6 / -march=k6)
> flavor of the x86 architecture?
>
> I am trying to decide whether "-march=i586" or "-march=k6" is most
> appropriate for my K6-2-based machine. So far I have been unable to find a
> reference describing what code generation is specific to the k6 switches.
>
> Pointers, anyone?
>
> Thanks.
AFAIK there is none (in whatever version of gcc), but you can run benchmarks.
I did it (on a K6/2) and I found that compiling with -march=i586 sucks, it
also sucks on PII, PIIIs. In fact on everything who is not a true Pentium it
will be even slower than -mcpu=i386.
I also found that using -march=k6 made no difference resprective to -mcpu=k6
(and code will run on every x86 box). It is possible that gcc 2.96 generates
little K6 specific instructions. Using -mcpu=k6 will allow code to run on
non-K6s.
I had surprisingly good results with -mcpu=i686. In some cases better than
with -march=k6. It is probable that this is due to the code generator for
686 being far more mature than the one for K6 (and possibly due to
architectural differences between K6/2 and true K6)
JFM
JFM