AMD K6-2s and the -mcpu=xxx switch.

Tomislav Greguric greguric at
Tue Aug 8 17:47:45 PDT 2000

> >
> > > So, can we K6-2 owners use -mcpu=i686 -march=i686 ??  After spending a 3
> > > day weekend on LFS I need a break, so I'm not going to try it right
> > > away, if no one has tried it before I do I'll let you all know how it
> > > went.
> >
> > Yes I believe everbody does it that way and it seems to work just fine.
> >
> If the above is true I'd really wonder exactly how much PPro optimization
> gcc applies as the *entire* K6 line is definitly not a 6th generation
> processor but a 5th.  There's an easy way to prove this as well:  Get a hold
> of an Intel pentium 233MMX and any K6.  Now run most any benchmark you want
> making sure that that you clock each processor at the _same_ frequency  i.e.
> 233 MHZ @ 66MHZ Front Side Bus.
> Spoiler:  The Intel chip will win at least 95% of the time, this with your
> K6 having twice the amount of L1 cache
> At any rate I'd really be interested in how successfull you are and a good
> project would also be to benchmark the difference between binaries compiles
> i586 vs. i686
> Interestingly AMD touts thier wickedly fast Athlon as being 7th generation
> does gcc support i786?

Reading the pgcc mailinglist one thing I learned is that the AMD-K6-2
uses the same instruction set like the Pentium (in fact, it adds
3DNow! extension, but these instructions are not supported by gcc nor
pgcc), but it's scheduling is more like the one from the PentiumPro,
so one should use "-march=pentium -mcpu=pentiumpro" aka "-march=i586
-mcpu=i686". You may of course play with the scheduling (which is
specified with -mcpu=), but selecting anything higher than i586 aka
pentium for code-creation (-march=) will sooner or later result in
broken code or (more likely) error messages from the binutils about
illegal instructions.

> ~Jason


Mail archive:
IRC access: server: port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list